From abeba698a10d122bf3652b15fff6a2c7c8110960 Mon Sep 17 00:00:00 2001 From: Morten Kristensen Date: Sat, 9 Jun 2018 23:29:43 +0200 Subject: [PATCH 1/3] Fixed warning: Unused captured this in lambda --- src/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 5060e7a3..f4323b64 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -96,7 +96,7 @@ MainWindow::MainWindow(WSClient *client, DbMasterController *mc, QWidget *parent refreshAppLangCb(); ui->checkBoxLongPress->setChecked(s.value("settings/long_press_cancel", true).toBool()); - connect(ui->checkBoxLongPress, &QCheckBox::toggled, [this](bool checked) + connect(ui->checkBoxLongPress, &QCheckBox::toggled, [](bool checked) { QSettings settings; settings.setValue("settings/long_press_cancel", checked); From 882019d6f9ba3bbe67ee08983ec8dc1f9bcf0047 Mon Sep 17 00:00:00 2001 From: Morten Kristensen Date: Sat, 9 Jun 2018 23:33:42 +0200 Subject: [PATCH 2/3] Added missing override keywords --- src/CredentialModelFilter.h | 4 ++-- src/ItemDelegate.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/CredentialModelFilter.h b/src/CredentialModelFilter.h index f8a90a4d..301deb6d 100644 --- a/src/CredentialModelFilter.h +++ b/src/CredentialModelFilter.h @@ -22,8 +22,8 @@ class CredentialModelFilter : public QSortFilterProxyModel QModelIndexList getNextRow(const QModelIndex &rowIdx); protected: - virtual bool filterAcceptsRow(int iSrcRow, const QModelIndex &srcParent) const; - virtual bool lessThan(const QModelIndex &srcLeft, const QModelIndex &srcRight) const; + virtual bool filterAcceptsRow(int iSrcRow, const QModelIndex &srcParent) const override; + virtual bool lessThan(const QModelIndex &srcLeft, const QModelIndex &srcRight) const override; private: bool acceptRow(int iSrcRow, const QModelIndex &srcParent) const; diff --git a/src/ItemDelegate.h b/src/ItemDelegate.h index 6029729e..e623798b 100644 --- a/src/ItemDelegate.h +++ b/src/ItemDelegate.h @@ -12,7 +12,8 @@ class ItemDelegate : public QStyledItemDelegate { public: explicit ItemDelegate(QWidget* parent = nullptr); - virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; + virtual QSize sizeHint(const QStyleOptionViewItem &option, + const QModelIndex &index) const override; virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; void emitSizeHintChanged(const QModelIndex &index); From c539f4fe2a7a994fa31e9e22bb898eb332dd5141 Mon Sep 17 00:00:00 2001 From: Morten Kristensen Date: Sat, 9 Jun 2018 23:36:47 +0200 Subject: [PATCH 3/3] Mark captured this as unused on macOS --- src/AppGui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AppGui.cpp b/src/AppGui.cpp index 0bcb3dc2..b2115a2a 100644 --- a/src/AppGui.cpp +++ b/src/AppGui.cpp @@ -139,6 +139,7 @@ bool AppGui::initialize() mainWindowHide(); } #else + Q_UNUSED(this) Q_UNUSED(reason) #endif });