diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index ec990059e62..6d4b8eb7bd9 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -297,7 +297,7 @@ void AccountSettings::slotRemoveCurrentFolder(Folder *folder) messageBox->setAttribute(Qt::WA_DeleteOnClose); QPushButton *yesButton = messageBox->addButton(tr("Remove Folder Sync Connection"), QMessageBox::YesRole); messageBox->addButton(tr("Cancel"), QMessageBox::NoRole); - connect(messageBox, &QMessageBox::finished, this, [messageBox, yesButton, folder, this] { + connect(messageBox, &QMessageBox::finished, this, [messageBox, yesButton, folder] { if (messageBox->clickedButton() == yesButton) { FolderMan::instance()->removeFolder(folder); } @@ -335,7 +335,7 @@ void AccountSettings::slotDisableVfsCurrentFolder(Folder *folder) "This action will abort any currently running synchronization.")); auto acceptButton = msgBox->addButton(tr("Disable support"), QMessageBox::AcceptRole); msgBox->addButton(tr("Cancel"), QMessageBox::RejectRole); - connect(msgBox, &QMessageBox::finished, msgBox, [this, msgBox, folder, acceptButton] { + connect(msgBox, &QMessageBox::finished, msgBox, [msgBox, folder, acceptButton] { msgBox->deleteLater(); if (msgBox->clickedButton() != acceptButton || !folder) { return; diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h index bd603401b3c..428dc1c50d2 100644 --- a/src/gui/folderstatusmodel.h +++ b/src/gui/folderstatusmodel.h @@ -59,7 +59,7 @@ class FolderStatusModel : public QAbstractTableModel FolderStatusUrl, Folder }; - Q_ENUMS(Roles); + Q_ENUMS(Roles) FolderStatusModel(QObject *parent = nullptr); ~FolderStatusModel() override; diff --git a/src/gui/folderwizard/folderwizard.h b/src/gui/folderwizard/folderwizard.h index 6bd3be237da..04e5e7c8d33 100644 --- a/src/gui/folderwizard/folderwizard.h +++ b/src/gui/folderwizard/folderwizard.h @@ -14,12 +14,11 @@ #pragma once +#include #include #include "accountfwd.h" -#include "gui/folder.h" - class QCheckBox; class QTreeWidgetItem; @@ -43,7 +42,7 @@ class FolderWizard : public QWizard Page_Target, Page_SelectiveSync }; - Q_ENUM(PageType); + Q_ENUM(PageType) struct Result { @@ -87,7 +86,7 @@ class FolderWizard : public QWizard Result result(); - Q_DECLARE_PRIVATE(FolderWizard); + Q_DECLARE_PRIVATE(FolderWizard) private: QScopedPointer d_ptr; diff --git a/src/gui/folderwizard/folderwizard_p.h b/src/gui/folderwizard/folderwizard_p.h index ccd3f1e8d24..7b9f87fddfd 100644 --- a/src/gui/folderwizard/folderwizard_p.h +++ b/src/gui/folderwizard/folderwizard_p.h @@ -23,6 +23,7 @@ #include "libsync/accountfwd.h" #include +#include #include namespace OCC { @@ -50,7 +51,7 @@ class FolderWizardPrivate const AccountStatePtr &accountState(); private: - Q_DECLARE_PUBLIC(FolderWizard); + Q_DECLARE_PUBLIC(FolderWizard) FolderWizard *q_ptr; AccountStatePtr _account; diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index b966bb285db..b3f98f0a736 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -238,7 +238,7 @@ void ownCloudGui::slotTrayMessageIfServerUnsupported(Account *account) void ownCloudGui::slotComputeOverallSyncStatus() { auto getIcon = [this](const SyncResult &result) { return Theme::instance()->themeTrayIcon(result, contextMenuVisible()); }; - auto getIconFromStatus = [getIcon, this](const SyncResult::Status &status) { return getIcon(SyncResult{status}); }; + auto getIconFromStatus = [getIcon](const SyncResult::Status &status) { return getIcon(SyncResult{status}); }; bool allSignedOut = true; bool allPaused = true; bool allDisconnected = true; diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index 87da9dd7bcf..528df8e168f 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -665,7 +665,7 @@ void SocketApi::command_OPEN_PRIVATE_LINK_VERSIONS(const QString &localFile, Soc Utility::openBrowser(queryUrl, nullptr); }); } else { - fetchPrivateLinkUrlHelper(localFile, [this](const QUrl &link) { + fetchPrivateLinkUrlHelper(localFile, [](const QUrl &link) { Utility::openBrowser(Utility::concatUrlPath(link, {}, {{QStringLiteral("details"), QStringLiteral("versionsTabView")}}), nullptr); }); } diff --git a/src/gui/spaces/spacesmodel.cpp b/src/gui/spaces/spacesmodel.cpp index 13dba41b8f5..4021a27e996 100644 --- a/src/gui/spaces/spacesmodel.cpp +++ b/src/gui/spaces/spacesmodel.cpp @@ -13,24 +13,12 @@ */ #include "spacesmodel.h" -#include "common/utility.h" -#include "networkjobs.h" - -#include "libsync/account.h" - #include "libsync/graphapi/spacesmanager.h" -#include "resources/resources.h" - #include #include #include -namespace { -constexpr QSize ImageSizeC(128, 128); -constexpr QSize ImageMarginC(ImageSizeC * 0.1); -} - using namespace OCC::Spaces; SpacesModel::SpacesModel(QObject *parent) diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index 68782c70c6d..165f8cecc80 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -41,7 +41,7 @@ auto NOTIFICATIONS_IFACE_C() namespace OCC { -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS void *createOsXNotificationCenterDelegate(); void releaseOsXNotificationCenterDelegate(void *delegate); void sendOsXUserNotification(const QString &title, const QString &message); @@ -57,7 +57,7 @@ Systray::Systray(QObject *parent) Systray::~Systray() { -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS if (delegate) { releaseOsXNotificationCenterDelegate(delegate); } @@ -66,7 +66,7 @@ Systray::~Systray() void Systray::showMessage(const QString &title, const QString &message, const QIcon &icon, int millisecondsTimeoutHint) { -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS Q_UNUSED(icon) Q_UNUSED(millisecondsTimeoutHint) @@ -85,7 +85,7 @@ void Systray::showMessage(const QString &title, const QString &message, const QI { QSystemTrayIcon::showMessage(title, message, icon, millisecondsTimeoutHint); } -#endif // Q_OS_OSX +#endif // Q_OS_MACOS } void Systray::setToolTip(const QString &tip) diff --git a/src/libsync/account.h b/src/libsync/account.h index fd94685aaed..29f4c2e8087 100644 --- a/src/libsync/account.h +++ b/src/libsync/account.h @@ -185,7 +185,7 @@ class OWNCLOUDSYNC_EXPORT Account : public QObject Unknown, Unsupported }; - Q_ENUMS(ServerSupportLevel); + Q_ENUMS(ServerSupportLevel) ServerSupportLevel serverSupportLevel() const; /** True when the server connection is using HTTP2 */ diff --git a/src/libsync/accountfwd.h b/src/libsync/accountfwd.h index 77fc76328d0..ea343f88bdc 100644 --- a/src/libsync/accountfwd.h +++ b/src/libsync/accountfwd.h @@ -15,6 +15,7 @@ #ifndef SERVERFWD_H #define SERVERFWD_H +#include #include namespace OCC { diff --git a/src/libsync/platform_mac.h b/src/libsync/platform_mac.h index d431141f187..007297cc45c 100644 --- a/src/libsync/platform_mac.h +++ b/src/libsync/platform_mac.h @@ -34,7 +34,7 @@ class MacPlatform : public Platform void startServices() override; private: - Q_DECLARE_PRIVATE(MacPlatform); + Q_DECLARE_PRIVATE(MacPlatform) QScopedPointer d_ptr; };