Skip to content

Commit

Permalink
clean up compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dannagle committed Jun 29, 2020
1 parent 22075d0 commit 5549b5c
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 31 deletions.
4 changes: 0 additions & 4 deletions src/cloudui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,6 @@ void CloudUI::on_importPacketsButton_clicked()



void CloudUI::on_makePublicCheck_clicked(bool checked)
{
//ui->descriptionExportEdit->setEnabled(checked);
}

void CloudUI::on_createAccountButton_clicked()
{
Expand Down
2 changes: 0 additions & 2 deletions src/cloudui.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ class CloudUI : public QDialog

void replyFinished(QNetworkReply *request);

void on_makePublicCheck_clicked(bool checked);

void on_createAccountButton_clicked();

void on_privacyButton_clicked();
Expand Down
2 changes: 0 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ int main(int argc, char *argv[])
}

out.flush();
QCoreApplication::flush();

}
sock.disconnectFromHost();
Expand Down Expand Up @@ -701,7 +700,6 @@ int main(int argc, char *argv[])
}

out.flush();
QCoreApplication::flush();
}
}

Expand Down
19 changes: 3 additions & 16 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);

timeSinceLaunch();

QSettings settings(SETTINGSFILE, QSettings::IniFormat);

Expand Down Expand Up @@ -368,8 +367,6 @@ MainWindow::MainWindow(QWidget *parent) :

//on_actionExport_Packets_JSON_triggered();

QDEBUG() << "Load time:" << timeSinceLaunch();

QDEBUG() << "Settings file loaded" << SETTINGSFILE;
QDEBUG() << "Packets file loaded" << PACKETSFILE;

Expand Down Expand Up @@ -799,19 +796,6 @@ MainWindow::~MainWindow()
delete ui;
}

quint64 MainWindow::timeSinceLaunch()
{
static QTime launchTimer = QTime::currentTime();
if (launchTimer.isValid()) {
return launchTimer.elapsed();

} else {
launchTimer.start();
return 0;
}

}

void MainWindow::on_packetHexEdit_lostFocus()
{

Expand Down Expand Up @@ -962,6 +946,7 @@ void MainWindow::on_savePacketButton_clicked()

void MainWindow::saveSession(Packet sessionPacket)
{
Q_UNUSED(sessionPacket)

QSettings settings(SETTINGSFILE, QSettings::IniFormat);

Expand Down Expand Up @@ -2343,6 +2328,8 @@ void MainWindow::on_udptcpComboBox_currentIndexChanged(const QString &arg1)
{


Q_UNUSED(arg1)

for (int i = 0; i < ui->requestLayout->count(); ++i) {
QWidget *w = ui->requestLayout->itemAt(i)->widget();
if(w != nullptr) {
Expand Down
1 change: 0 additions & 1 deletion src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class MainWindow : public QMainWindow
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();

quint64 timeSinceLaunch();
QString ASCIITohex(QString &ascii);
QString hexToASCII(QString &hex);

Expand Down
2 changes: 1 addition & 1 deletion src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget">
<widget class="QWidget" name="layoutWidget1">
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_16">
Expand Down
5 changes: 2 additions & 3 deletions src/packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,12 @@ bool comparePacketsByTime(const Packet &packetA, const Packet &packetB)
void Packet::sortByName(QList<Packet> &packetList)
{

qSort(packetList.begin(), packetList.end(), comparePacketsByName);
std::sort(packetList.begin(), packetList.end(), comparePacketsByName);

}
void Packet::sortByTime(QList<Packet> &packetList)
{
qSort(packetList.begin(), packetList.end(), comparePacketsByTime);
std::sort(packetList.begin(), packetList.end(), comparePacketsByTime);


}
Expand Down Expand Up @@ -921,7 +921,6 @@ QString Packet::ASCIITohex(QString &ascii)

QString asciiText = ascii;
QString hexText = "";
QChar tempChar1, tempChar2;
QChar charTest;
QString convertTest;
bool msb = false;
Expand Down
4 changes: 4 additions & 0 deletions src/packetlogmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ QVariant PacketLogModel::data(const QModelIndex &index, int role) const

bool PacketLogModel::setData(const QModelIndex &index, const QVariant &value, int role)
{

Q_UNUSED(index)
Q_UNUSED(value)

if (role == Qt::EditRole)
{
//do nothing.
Expand Down
2 changes: 1 addition & 1 deletion src/settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<layout class="QHBoxLayout" name="horizontalLayout_121">
<item>
<widget class="QLabel" name="label_18">
<property name="text">
Expand Down
1 change: 0 additions & 1 deletion src/subnetcalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ QList<QNetworkAddressEntry> SubnetCalc::nonLoopBackAddresses()
ethOut << "\nFor " << eth.humanReadableName() << " (" << eth.hardwareAddress() << ")" << ":\n";
QNetworkAddressEntry entry;

int nonLoopBack = 0;

foreach (entry, allEntries) {
if (!entry.ip().isLoopback()) {
Expand Down

0 comments on commit 5549b5c

Please sign in to comment.