]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
fix compilation with clazy and fully-qualified-moc-types checks enabled
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 7 Apr 2023 15:27:14 +0000 (17:27 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Tue, 11 Apr 2023 09:34:00 +0000 (11:34 +0200)
will make all signals and slots be using fully qualified data types

makes code safer

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
13 files changed:
src/common/syncjournaldb.h
src/gui/accountsettings.h
src/gui/accountsetupfromcommandlinejob.h
src/gui/editlocallyjob.h
src/gui/filedetails/shareemodel.h
src/gui/folderman.cpp
src/gui/folderman.h
src/gui/socketapi/socketapi.h
src/gui/systray.h
src/gui/tray/usermodel.h
src/libsync/clientsideencryption.h
src/libsync/syncengine.h
src/libsync/updatefiledropmetadata.h

index 07803084e66829047b7ce63cd617dd1bd47460a1..b83a33e2cc2e2bb807a608cd982446dc67f4cb27 100644 (file)
@@ -389,7 +389,7 @@ public:
 
 public slots:
     /// Store a new or updated record in the database
-    void setCaseConflictRecord(const ConflictRecord &record);
+    void setCaseConflictRecord(const OCC::ConflictRecord &record);
 
     /// Delete a case clash conflict record by path of the file with the conflict tag
     void deleteCaseClashConflictByPathRecord(const QString &path);
index 83e6ff02694bf327a613159f99d542f20431d0d2..0be744d7238e8c3dafc96de1cb7a5330d3e6b87e 100644 (file)
@@ -118,7 +118,7 @@ private slots:
 
 private slots:
     void displayMnemonic(const QString &mnemonic);
-    void disableEncryptionForAccount(const AccountPtr &account) const;
+    void disableEncryptionForAccount(const OCC::AccountPtr &account) const;
     void showConnectionLabel(const QString &message, QStringList errors = QStringList());
     void openIgnoredFilesDialog(const QString & absFolderPath);
     void customizeStyle();
index 8485c72a1207a3bb57f43ae227f8b9067e82e320..9885bc9dd2437e43ee24047d0bb0fb2da1009c35 100644 (file)
@@ -47,7 +47,7 @@ private slots:
 
     void accountSetupFromCommandLinePropfindHandleFailure();
 
-    void setupLocalSyncFolder(AccountState *accountState);
+    void setupLocalSyncFolder(OCC::AccountState *accountState);
 
     void printAccountSetupFromCommandLineStatusAndExit(const QString &status, bool isFailure);
 
index 14ca52da6b827378bbca1e43d51a44d96865516e..9b06aedbc16b1fc6f4f88c56ee19effe589e2a78 100644 (file)
@@ -76,7 +76,7 @@ private slots:
     void lockFile();
 
     void fileAlreadyLocked();
-    void fileLockSuccess(const SyncFileItemPtr &item);
+    void fileLockSuccess(const OCC::SyncFileItemPtr &item);
     void fileLockError(const QString &errorMessage);
     void fileLockProcedureComplete(const QString &notificationTitle,
                                    const QString &notificationMessage,
index edf085b3be1115c715dc739970084a19476dc420..0a8d82af520abd6b48c8e45fcd7e00e3ddd913b1 100644 (file)
@@ -88,7 +88,7 @@ public slots:
 
 private slots:
     void shareesFetched(const QJsonDocument &reply);
-    void insertSearchGloballyItem(const QVector<ShareePtr> &newShareesFetched);
+    void insertSearchGloballyItem(const QVector<OCC::ShareePtr> &newShareesFetched);
     void filterSharees();
     void slotDarkModeChanged();
 
index 677be03965914cde492f96dd0ddafc03d7374ae8..655c1c0b6278306dbaedbd11d02f99868d6fbe91 100644 (file)
@@ -1549,7 +1549,6 @@ void FolderMan::trayOverallStatus(const QList<Folder *> &folders,
         int goodSeen = 0;
         int abortOrPausedSeen = 0;
         int runSeen = 0;
-        int various = 0;
 
         for (const Folder *folder : qAsConst(folders)) {
             SyncResult folderResult = folder->syncResult();
@@ -1561,7 +1560,6 @@ void FolderMan::trayOverallStatus(const QList<Folder *> &folders,
                 switch (syncStatus) {
                 case SyncResult::Undefined:
                 case SyncResult::NotYetStarted:
-                    various++;
                     break;
                 case SyncResult::SyncPrepare:
                 case SyncResult::SyncRunning:
index 21e26035700f25e7aa100494714fed6ca834a189..6b9186b72e2da32ed4c5541956fc38521adf1d5d 100644 (file)
@@ -276,7 +276,7 @@ public slots:
 
     void forceSyncForFolder(OCC::Folder *folder);
 
-    void removeE2eFiles(const AccountPtr &account) const;
+    void removeE2eFiles(const OCC::AccountPtr &account) const;
 
 private slots:
     void slotFolderSyncPaused(OCC::Folder *, bool paused);
index afa5ef965e4e3dd7060742af1b7108d409b66fe8..8662fde9b70a9c23dbabd82154d7e99538c03fa9 100644 (file)
@@ -125,9 +125,9 @@ private:
 
     // The context menu actions
     Q_INVOKABLE void command_ACTIVITY(const QString &localFile, OCC::SocketListener *listener);
-    Q_INVOKABLE void command_ENCRYPT(const QString &localFile, SocketListener *listener);
+    Q_INVOKABLE void command_ENCRYPT(const QString &localFile, OCC::SocketListener *listener);
     Q_INVOKABLE void command_SHARE(const QString &localFile, OCC::SocketListener *listener);
-    Q_INVOKABLE void command_LEAVESHARE(const QString &localFile, SocketListener *listener);
+    Q_INVOKABLE void command_LEAVESHARE(const QString &localFile, OCC::SocketListener *listener);
     Q_INVOKABLE void command_MANAGE_PUBLIC_LINKS(const QString &localFile, OCC::SocketListener *listener);
     Q_INVOKABLE void command_COPY_SECUREFILEDROP_LINK(const QString &localFile, OCC::SocketListener *listener);
     Q_INVOKABLE void command_COPY_PUBLIC_LINK(const QString &localFile, OCC::SocketListener *listener);
index 99a18296dff1cdfce2bc3bb7975e0bb3977afb85..fdc9861752b48614b6425d66ee74230ee94c1ccd 100644 (file)
@@ -102,7 +102,7 @@ signals:
     void shutdown();
 
     void showFileDetailsPage(const QString &fileLocalPath, const OCC::Systray::FileDetailsPage page);
-    void showFileDetails(AccountState *accountState, const QString &localPath, const OCC::Systray::FileDetailsPage fileDetailsPage);
+    void showFileDetails(OCC::AccountState *accountState, const QString &localPath, const OCC::Systray::FileDetailsPage fileDetailsPage);
     void sendChatMessage(const QString &token, const QString &message, const QString &replyTo);
     void showErrorMessageDialog(const QString &error);
 
@@ -115,7 +115,7 @@ public slots:
 
     void showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon icon = Information);
     void showUpdateMessage(const QString &title, const QString &message, const QUrl &webUrl);
-    void showTalkMessage(const QString &title, const QString &message, const QString &replyTo, const QString &token, const AccountStatePtr &accountState);
+    void showTalkMessage(const QString &title, const QString &message, const QString &replyTo, const QString &token, const OCC::AccountStatePtr &accountState);
     void setToolTip(const QString &tip);
 
     void createCallDialog(const OCC::Activity &callNotification, const OCC::AccountStatePtr accountState);
index a9c7d1f2ec4916168bc75dbbdbf8c3a67405abc7..c287fe82c66e5515c2f962cabd3791b84369bcaa 100644 (file)
@@ -113,15 +113,15 @@ public slots:
 private slots:
     void slotPushNotificationsReady();
     void slotDisconnectPushNotifications();
-    void slotReceivedPushNotification(Account *account);
-    void slotReceivedPushActivity(Account *account);
+    void slotReceivedPushNotification(OCC::Account *account);
+    void slotReceivedPushActivity(OCC::Account *account);
     void slotCheckExpiredActivities();
 
     void checkNotifiedNotifications();
     void showDesktopNotification(const QString &title, const QString &message, const long notificationId);
-    void showDesktopNotification(const Activity &activity);
-    void showDesktopNotification(const ActivityList &activityList);
-    void showDesktopTalkNotification(const Activity &activity);
+    void showDesktopNotification(const OCC::Activity &activity);
+    void showDesktopNotification(const OCC::ActivityList &activityList);
+    void showDesktopTalkNotification(const OCC::Activity &activity);
 
 private:
     void connectPushNotifications() const;
index 212502a0a9a1f4de009c0204c3eb5bc38ddd3687..c2af28f7529a7c29c87a21fc23dc47ba4d4bf0f4 100644 (file)
@@ -137,12 +137,12 @@ signals:
     void mnemonicDeleted();
 
 public slots:
-    void initialize(const AccountPtr &account);
-    void forgetSensitiveData(const AccountPtr &account);
+    void initialize(const OCC::AccountPtr &account);
+    void forgetSensitiveData(const OCC::AccountPtr &account);
 
 private slots:
-    void generateKeyPair(const AccountPtr &account);
-    void encryptPrivateKey(const AccountPtr &account);    
+    void generateKeyPair(const OCC::AccountPtr &account);
+    void encryptPrivateKey(const OCC::AccountPtr &account);
 
     void publicKeyFetched(QKeychain::Job *incoming);
     void privateKeyFetched(QKeychain::Job *incoming);
@@ -153,15 +153,15 @@ private slots:
     void handleMnemonicDeleted(const QKeychain::Job* const incoming);
     void checkAllSensitiveDataDeleted();
 
-    void getPrivateKeyFromServer(const AccountPtr &account);
-    void getPublicKeyFromServer(const AccountPtr &account);
-    void fetchAndValidatePublicKeyFromServer(const AccountPtr &account);
-    void decryptPrivateKey(const AccountPtr &account, const QByteArray &key);
+    void getPrivateKeyFromServer(const OCC::AccountPtr &account);
+    void getPublicKeyFromServer(const OCC::AccountPtr &account);
+    void fetchAndValidatePublicKeyFromServer(const OCC::AccountPtr &account);
+    void decryptPrivateKey(const OCC::AccountPtr &account, const QByteArray &key);
 
-    void fetchFromKeyChain(const AccountPtr &account);
-    void writePrivateKey(const AccountPtr &account);
-    void writeCertificate(const AccountPtr &account);
-    void writeMnemonic(const AccountPtr &account);
+    void fetchFromKeyChain(const OCC::AccountPtr &account);
+    void writePrivateKey(const OCC::AccountPtr &account);
+    void writeCertificate(const OCC::AccountPtr &account);
+    void writeMnemonic(const OCC::AccountPtr &account);
 
 private:
     void generateCSR(const AccountPtr &account, PKey keyPair);
index 88e0cba8b1364f1afac95be9b3874000f7e6f334..1c60c6007294b897936e86b157f464546b6578cf 100644 (file)
@@ -128,7 +128,7 @@ public:
     [[nodiscard]] const SyncEngine::SingleItemDiscoveryOptions &singleItemDiscoveryOptions() const;
 
 public slots:
-    void setSingleItemDiscoveryOptions(const SingleItemDiscoveryOptions &singleItemDiscoveryOptions);
+    void setSingleItemDiscoveryOptions(const OCC::SyncEngine::SingleItemDiscoveryOptions &singleItemDiscoveryOptions);
 
     void startSync();
 
@@ -165,7 +165,7 @@ signals:
 
     void transmissionProgress(const OCC::ProgressInfo &progress);
 
-    void itemDiscovered(const SyncFileItemPtr &);
+    void itemDiscovered(const OCC::SyncFileItemPtr &);
 
     /// We've produced a new sync error of a type.
     void syncError(const QString &message, OCC::ErrorCategory category = OCC::ErrorCategory::Normal);
index 0f0fa1b3d206d29baa33a7e0c881a601da318e2f..8608cf08388c3b2e8fde5394e8454a90f6073acf 100644 (file)
@@ -51,7 +51,7 @@ private slots:
 signals:
     void folderUnlocked(const QByteArray &folderId, int httpStatus);
 
-    void fileDropMetadataParsedAndAdjusted(const FolderMetadata *const metadata);
+    void fileDropMetadataParsedAndAdjusted(const OCC::FolderMetadata *const metadata);
 
 private:
     QString _path;