diff options
author | Erik Verbruggen <erik@verbruggen.consulting> | 2022-06-10 12:28:05 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-07-01 15:35:54 +0300 |
commit | efac9f040127f0c3471ee051b4874500c3ee2969 (patch) | |
tree | 15d1581c88b4561f754cc60db81b16f09b078f0b /src/gui | |
parent | dfc2a03c40f73fa524f6c3f5bb37a84c8ef4494b (diff) |
Fix a bunch of compiler warnings
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/accountmanager.cpp | 1 | ||||
-rw-r--r-- | src/gui/connectionvalidator.cpp | 1 | ||||
-rw-r--r-- | src/gui/selectivesyncdialog.h | 4 | ||||
-rw-r--r-- | src/gui/spaces/spacesmodel.cpp | 11 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index 4aeaea983..32cc36710 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -51,7 +51,6 @@ const QString userUUIDC() static const char caCertsKeyC[] = "CaCertificates"; static const char accountsC[] = "Accounts"; static const char versionC[] = "version"; -static const char serverVersionC[] = "serverVersion"; auto capabilitesC() { diff --git a/src/gui/connectionvalidator.cpp b/src/gui/connectionvalidator.cpp index 7284f44ee..568844da4 100644 --- a/src/gui/connectionvalidator.cpp +++ b/src/gui/connectionvalidator.cpp @@ -109,6 +109,7 @@ void ConnectionValidator::slotCheckServerAndAuth() auto checkServerJob = CheckServerJobFactory(nam).startJob(_account->url()); connect(nam, &AccessManager::sslErrors, this, [this](QNetworkReply *reply, const QList<QSslError> &errors) { + Q_UNUSED(reply) Q_EMIT sslErrors(errors); }); diff --git a/src/gui/selectivesyncdialog.h b/src/gui/selectivesyncdialog.h index 6490a5212..fa96345f7 100644 --- a/src/gui/selectivesyncdialog.h +++ b/src/gui/selectivesyncdialog.h @@ -89,10 +89,10 @@ class SelectiveSyncDialog : public QDialog Q_OBJECT public: // Dialog for a specific folder (used from the account settings button) - explicit SelectiveSyncDialog(AccountPtr account, Folder *folder, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr); + explicit SelectiveSyncDialog(AccountPtr account, Folder *folder, QWidget *parent = nullptr, Qt::WindowFlags f = {}); // Dialog for the whole account (Used from the wizard) - explicit SelectiveSyncDialog(AccountPtr account, const QString &folder, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr); + explicit SelectiveSyncDialog(AccountPtr account, const QString &folder, QWidget *parent = nullptr, Qt::WindowFlags f = {}); void accept() override; diff --git a/src/gui/spaces/spacesmodel.cpp b/src/gui/spaces/spacesmodel.cpp index ca7388411..97fa78eac 100644 --- a/src/gui/spaces/spacesmodel.cpp +++ b/src/gui/spaces/spacesmodel.cpp @@ -103,7 +103,7 @@ QVariant SpacesModel::data(const QModelIndex &index, int role) const case Qt::DecorationRole: switch (column) { case Columns::Image: { - auto it = _images.find(item.getId()); + auto it = _images.constFind(item.getId()); if (it != _images.cend()) { return QVariant::fromValue(*it); } @@ -125,13 +125,16 @@ QVariant SpacesModel::data(const QModelIndex &index, int role) const }); job->start(); return _images[item.getId()]; - } break; + } + default: + return {}; } case Qt::SizeHintRole: { switch (column) { - case Columns::Image: { + case Columns::Image: return ImageSizeC; - } + default: + return {}; } } } |