summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <annejan@noprotocol.com>2015-11-24 11:12:03 +0100
committerAnne Jan Brouwer <annejan@noprotocol.com>2015-11-24 11:12:03 +0100
commit247f6ee799fc912b40928f85a7167fff438430cb (patch)
treeebac1d41d7513e8667b398cd7def235bcb421a2a
parentdcb2737cee1c18f462da3e7bb27267049db8d5ca (diff)
More linting (reinterpret_cast and empty {} etc)
-rw-r--r--keygendialog.h2
-rw-r--r--passworddialog.cpp4
-rw-r--r--qprogressindicator.h2
-rw-r--r--trayicon.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/keygendialog.h b/keygendialog.h
index 4beb148e..19d996ce 100644
--- a/keygendialog.h
+++ b/keygendialog.h
@@ -19,7 +19,7 @@ class KeygenDialog : public QDialog {
protected:
void closeEvent(QCloseEvent *event);
-private slots:
+ private slots:
void on_passphrase1_textChanged(const QString &arg1);
void on_passphrase2_textChanged(const QString &arg1);
void on_checkBox_stateChanged(int arg1);
diff --git a/passworddialog.cpp b/passworddialog.cpp
index d3067fe3..688bcefb 100644
--- a/passworddialog.cpp
+++ b/passworddialog.cpp
@@ -43,7 +43,7 @@ void PasswordDialog::setPassword(QString password) {
if (token.startsWith(widget->objectName() + ':')) {
tokens.removeAt(j);
QString value = token.remove(0, widget->objectName().length() + 1);
- ((QLineEdit *)widget)->setText(value);
+ reinterpret_cast<QLineEdit*>(widget)->setText(value);
}
}
previous = widget;
@@ -79,7 +79,7 @@ QString PasswordDialog::getPassword() {
if (item == NULL)
continue;
QWidget *widget = item->widget();
- QString text = ((QLineEdit *)widget)->text();
+ QString text = reinterpret_cast<QLineEdit*>(widget)->text();
if (text.isEmpty())
continue;
passFile += widget->objectName() + ":" + text + "\n";
diff --git a/qprogressindicator.h b/qprogressindicator.h
index 5856b862..980ebd7d 100644
--- a/qprogressindicator.h
+++ b/qprogressindicator.h
@@ -21,7 +21,7 @@ class QProgressIndicator : public QWidget {
Q_PROPERTY(QColor color READ color WRITE setColor)
public:
- QProgressIndicator(QWidget *parent = 0);
+ explicit QProgressIndicator(QWidget *parent = 0);
/*! Returns the delay between animation steps.
\return The number of milliseconds between animation steps. By default,
diff --git a/trayicon.cpp b/trayicon.cpp
index f8e28e31..f7cf7656 100644
--- a/trayicon.cpp
+++ b/trayicon.cpp
@@ -64,7 +64,7 @@ void TrayIcon::iconActivated(QSystemTrayIcon::ActivationReason reason) {
case QSystemTrayIcon::MiddleClick:
showMessage("test", "test msg", 1000);
break;
- default:;
+ default:{};
}
}