From 61c792c6f4be4083292cef3d963b8ae4557465a7 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 24 Oct 2022 16:00:50 +0200 Subject: [PATCH] fully qualify types in signals and slots Signed-off-by: Matthieu Gallien --- src/common/vfs.h | 4 +- src/gui/accountmanager.h | 12 ++-- src/gui/accountsettings.h | 12 ++-- src/gui/accountstate.h | 8 +-- src/gui/application.h | 6 +- src/gui/cloudproviders/cloudproviderwrapper.h | 6 +- src/gui/connectionvalidator.h | 4 +- src/gui/creds/flow2auth.h | 4 +- src/gui/filedetails/shareemodel.h | 4 +- src/gui/filedetails/sharemodel.h | 36 ++++++------ src/gui/filedetails/sortedsharemodel.h | 2 +- src/gui/folder.h | 20 +++---- src/gui/folderman.h | 28 +++++----- src/gui/folderstatusmodel.h | 6 +- src/gui/owncloudgui.h | 6 +- src/gui/remotewipe.h | 6 +- src/gui/settingsdialog.h | 6 +- src/gui/sharemanager.h | 8 +-- src/gui/socketapi/socketapi.cpp | 4 +- src/gui/socketapi/socketapi.h | 56 +++++++++---------- src/gui/systray.h | 8 +-- src/gui/tray/activitylistmodel.h | 16 +++--- src/gui/tray/notificationhandler.h | 4 +- src/gui/tray/sortedactivitylistmodel.h | 2 +- src/gui/tray/usermodel.h | 12 ++-- src/gui/userinfo.h | 2 +- src/gui/userstatusselectormodel.h | 6 +- src/gui/wizard/owncloudwizard.h | 4 +- src/libsync/account.h | 12 ++-- src/libsync/bandwidthmanager.h | 4 +- src/libsync/bulkpropagatorjob.h | 16 +++--- src/libsync/discoveryphase.cpp | 2 +- src/libsync/discoveryphase.h | 10 ++-- src/libsync/localdiscoverytracker.h | 2 +- src/libsync/networkjobs.h | 2 +- src/libsync/owncloudpropagator.h | 22 ++++---- src/libsync/progressdispatcher.h | 8 +-- src/libsync/propagateupload.h | 4 +- src/libsync/pushnotifications.h | 6 +- src/libsync/syncengine.h | 24 ++++---- src/libsync/syncfilestatustracker.h | 6 +- src/libsync/userstatusconnector.h | 6 +- src/libsync/vfs/cfapi/vfs_cfapi.h | 2 +- src/libsync/vfs/suffix/vfs_suffix.h | 2 +- src/libsync/vfs/xattr/vfs_xattr.h | 2 +- test/syncenginetestutils.cpp | 4 +- test/testpermissions.cpp | 2 +- test/testsyncfileitem.cpp | 2 +- 48 files changed, 215 insertions(+), 215 deletions(-) diff --git a/src/common/vfs.h b/src/common/vfs.h index f0d717079..39bf0c03a 100644 --- a/src/common/vfs.h +++ b/src/common/vfs.h @@ -258,7 +258,7 @@ public slots: * via the vfs plugin. The connection to SyncFileStatusTracker allows both to be based * on the same data. */ - virtual void fileStatusChanged(const QString &systemFileName, SyncFileStatus fileStatus) = 0; + virtual void fileStatusChanged(const QString &systemFileName, OCC::SyncFileStatus fileStatus) = 0; signals: /// Emitted when a user-initiated hydration starts @@ -320,7 +320,7 @@ public: AvailabilityResult availability(const QString &) override { return VfsItemAvailability::AlwaysLocal; } public slots: - void fileStatusChanged(const QString &, SyncFileStatus) override {} + void fileStatusChanged(const QString &, OCC::SyncFileStatus) override {} protected: void startImpl(const VfsSetupParams &) override {} diff --git a/src/gui/accountmanager.h b/src/gui/accountmanager.h index 948e1de4a..574197af9 100644 --- a/src/gui/accountmanager.h +++ b/src/gui/accountmanager.h @@ -108,16 +108,16 @@ private: public slots: /// Saves account data, not including the credentials - void saveAccount(Account *a); + void saveAccount(OCC::Account *a); /// Saves account state data, not including the account - void saveAccountState(AccountState *a); + void saveAccountState(OCC::AccountState *a); Q_SIGNALS: - void accountAdded(AccountState *account); - void accountRemoved(AccountState *account); - void accountSyncConnectionRemoved(AccountState *account); - void removeAccountFolders(AccountState *account); + void accountAdded(OCC::AccountState *account); + void accountRemoved(OCC::AccountState *account); + void accountSyncConnectionRemoved(OCC::AccountState *account); + void removeAccountFolders(OCC::AccountState *account); }; } diff --git a/src/gui/accountsettings.h b/src/gui/accountsettings.h index f875be0d1..cf32bc737 100644 --- a/src/gui/accountsettings.h +++ b/src/gui/accountsettings.h @@ -62,9 +62,9 @@ public: signals: void folderChanged(); void openFolderAlias(const QString &); - void showIssuesList(AccountState *account); + void showIssuesList(OCC::AccountState *account); void requestMnemonic(); - void removeAccountFolders(AccountState *account); + void removeAccountFolders(OCC::AccountState *account); void styleChanged(); public slots: @@ -72,7 +72,7 @@ public slots: void slotUpdateQuota(qint64 total, qint64 used); void slotAccountStateChanged(); void slotStyleChanged(); - AccountState *accountsState() { return _accountState; } + OCC::AccountState *accountsState() { return _accountState; } void slotHideSelectiveSyncWidget(); protected slots: @@ -89,14 +89,14 @@ protected slots: void slotEditCurrentLocalIgnoredFiles(); void slotEnableVfsCurrentFolder(); void slotDisableVfsCurrentFolder(); - void slotSetCurrentFolderAvailability(PinState state); - void slotSetSubFolderAvailability(Folder *folder, const QString &path, PinState state); + void slotSetCurrentFolderAvailability(OCC::PinState state); + void slotSetSubFolderAvailability(OCC::Folder *folder, const QString &path, OCC::PinState state); void slotFolderWizardAccepted(); void slotFolderWizardRejected(); void slotDeleteAccount(); void slotToggleSignInState(); void refreshSelectiveSyncStatus(); - void slotMarkSubfolderEncrypted(FolderStatusModel::SubFolderInfo *folderInfo); + void slotMarkSubfolderEncrypted(OCC::FolderStatusModel::SubFolderInfo *folderInfo); void slotSubfolderContextMenuRequested(const QModelIndex& idx, const QPoint& point); void slotCustomContextMenuRequested(const QPoint &); void slotFolderListClicked(const QModelIndex &indx); diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h index 1c386e511..4e0621e33 100644 --- a/src/gui/accountstate.h +++ b/src/gui/accountstate.h @@ -193,21 +193,21 @@ private: void resetRetryCount(); signals: - void stateChanged(State state); + void stateChanged(OCC::AccountState::State state); void isConnectedChanged(); void hasFetchedNavigationApps(); void statusChanged(); void desktopNotificationsAllowedChanged(); protected Q_SLOTS: - void slotConnectionValidatorResult(ConnectionValidator::Status status, const QStringList &errors); + void slotConnectionValidatorResult(OCC::ConnectionValidator::Status status, const QStringList &errors); /// When client gets a 401 or 403 checks if server requested remote wipe /// before asking for user credentials again void slotHandleRemoteWipeCheck(); - void slotCredentialsFetched(AbstractCredentials *creds); - void slotCredentialsAsked(AbstractCredentials *creds); + void slotCredentialsFetched(OCC::AbstractCredentials *creds); + void slotCredentialsAsked(OCC::AbstractCredentials *creds); void slotNavigationAppsFetched(const QJsonDocument &reply, int statusCode); void slotEtagResponseHeaderReceived(const QByteArray &value, int statusCode); diff --git a/src/gui/application.h b/src/gui/application.h index a485eea89..5bd412077 100644 --- a/src/gui/application.h +++ b/src/gui/application.h @@ -94,7 +94,7 @@ protected: signals: void folderRemoved(); - void folderStateChanged(Folder *); + void folderStateChanged(OCC::Folder *); void isShowingSettingsDialog(); protected slots: @@ -102,8 +102,8 @@ protected slots: void slotCheckConnection(); void slotUseMonoIconsChanged(bool); void slotCleanup(); - void slotAccountStateAdded(AccountState *accountState); - void slotAccountStateRemoved(AccountState *accountState); + void slotAccountStateAdded(OCC::AccountState *accountState); + void slotAccountStateRemoved(OCC::AccountState *accountState); void slotSystemOnlineConfigurationChanged(QNetworkConfiguration); void slotGuiIsShowingSettings(); diff --git a/src/gui/cloudproviders/cloudproviderwrapper.h b/src/gui/cloudproviders/cloudproviderwrapper.h index 58d00336e..ab40e240b 100644 --- a/src/gui/cloudproviders/cloudproviderwrapper.h +++ b/src/gui/cloudproviders/cloudproviderwrapper.h @@ -49,9 +49,9 @@ public: public slots: void slotSyncStarted(); - void slotSyncFinished(const SyncResult &); - void slotUpdateProgress(const QString &folder, const ProgressInfo &progress); - void slotSyncPausedChanged(Folder*, bool); + void slotSyncFinished(const OCC::SyncResult &); + void slotUpdateProgress(const QString &folder, const OCC::ProgressInfo &progress); + void slotSyncPausedChanged(OCC::Folder*, bool); private: Folder *_folder; diff --git a/src/gui/connectionvalidator.h b/src/gui/connectionvalidator.h index 7915c654c..920f63175 100644 --- a/src/gui/connectionvalidator.h +++ b/src/gui/connectionvalidator.h @@ -108,7 +108,7 @@ public slots: void checkAuthentication(); signals: - void connectionResult(ConnectionValidator::Status status, const QStringList &errors); + void connectionResult(OCC::ConnectionValidator::Status status, const QStringList &errors); protected slots: void slotCheckServerAndAuth(); @@ -121,7 +121,7 @@ protected slots: void slotAuthSuccess(); void slotCapabilitiesRecieved(const QJsonDocument &); - void slotUserFetched(UserInfo *userInfo); + void slotUserFetched(OCC::UserInfo *userInfo); private: #ifndef TOKEN_AUTH_ONLY diff --git a/src/gui/creds/flow2auth.h b/src/gui/creds/flow2auth.h index 890a04f30..6b9440cfb 100644 --- a/src/gui/creds/flow2auth.h +++ b/src/gui/creds/flow2auth.h @@ -58,10 +58,10 @@ signals: * The state has changed. * when logged in, appPassword has the value of the app password. */ - void result(Flow2Auth::Result result, const QString &errorString = QString(), + void result(OCC::Flow2Auth::Result result, const QString &errorString = QString(), const QString &user = QString(), const QString &appPassword = QString()); - void statusChanged(const PollStatus status, int secondsLeft); + void statusChanged(const OCC::Flow2Auth::PollStatus status, int secondsLeft); public slots: void slotPollNow(); diff --git a/src/gui/filedetails/shareemodel.h b/src/gui/filedetails/shareemodel.h index 26a0b533e..3bc1ec83c 100644 --- a/src/gui/filedetails/shareemodel.h +++ b/src/gui/filedetails/shareemodel.h @@ -75,10 +75,10 @@ signals: void displayErrorMessage(const int code, const QString &message); public slots: - void setAccountState(AccountState *accountState); + void setAccountState(OCC::AccountState *accountState); void setShareItemIsFolder(const bool shareItemIsFolder); void setSearchString(const QString &searchString); - void setLookupMode(const LookupMode lookupMode); + void setLookupMode(const OCC::ShareeModel::LookupMode lookupMode); void setShareeBlocklist(const QVariantList shareeBlocklist); void fetch(); diff --git a/src/gui/filedetails/sharemodel.h b/src/gui/filedetails/sharemodel.h index abb94978b..0c2eb62dd 100644 --- a/src/gui/filedetails/sharemodel.h +++ b/src/gui/filedetails/sharemodel.h @@ -113,43 +113,43 @@ signals: void serverError(const int code, const QString &message); void passwordSetError(const QString &shareId, const int code, const QString &message); void requestPasswordForLinkShare(); - void requestPasswordForEmailSharee(const ShareePtr &sharee); + void requestPasswordForEmailSharee(const OCC::ShareePtr &sharee); void sharesChanged(); public slots: - void setAccountState(AccountState *accountState); + void setAccountState(OCC::AccountState *accountState); void setLocalPath(const QString &localPath); void createNewLinkShare() const; void createNewLinkShareWithPassword(const QString &password) const; - void createNewUserGroupShare(const ShareePtr &sharee); + void createNewUserGroupShare(const OCC::ShareePtr &sharee); void createNewUserGroupShareFromQml(const QVariant &sharee); - void createNewUserGroupShareWithPassword(const ShareePtr &sharee, const QString &password) const; + void createNewUserGroupShareWithPassword(const OCC::ShareePtr &sharee, const QString &password) const; void createNewUserGroupShareWithPasswordFromQml(const QVariant &sharee, const QString &password) const; - void deleteShare(const SharePtr &share) const; + void deleteShare(const OCC::SharePtr &share) const; void deleteShareFromQml(const QVariant &share) const; - void toggleShareAllowEditing(const SharePtr &share, const bool enable) const; + void toggleShareAllowEditing(const OCC::SharePtr &share, const bool enable) const; void toggleShareAllowEditingFromQml(const QVariant &share, const bool enable) const; - void toggleShareAllowResharing(const SharePtr &share, const bool enable) const; + void toggleShareAllowResharing(const OCC::SharePtr &share, const bool enable) const; void toggleShareAllowResharingFromQml(const QVariant &share, const bool enable) const; - void toggleSharePasswordProtect(const SharePtr &share, const bool enable); + void toggleSharePasswordProtect(const OCC::SharePtr &share, const bool enable); void toggleSharePasswordProtectFromQml(const QVariant &share, const bool enable); - void toggleShareExpirationDate(const SharePtr &share, const bool enable) const; + void toggleShareExpirationDate(const OCC::SharePtr &share, const bool enable) const; void toggleShareExpirationDateFromQml(const QVariant &share, const bool enable) const; - void toggleShareNoteToRecipient(const SharePtr &share, const bool enable) const; + void toggleShareNoteToRecipient(const OCC::SharePtr &share, const bool enable) const; void toggleShareNoteToRecipientFromQml(const QVariant &share, const bool enable) const; - void setLinkShareLabel(const QSharedPointer &linkShare, const QString &label) const; + void setLinkShareLabel(const QSharedPointer &linkShare, const QString &label) const; void setLinkShareLabelFromQml(const QVariant &linkShare, const QString &label) const; - void setShareExpireDate(const SharePtr &share, const qint64 milliseconds) const; + void setShareExpireDate(const OCC::SharePtr &share, const qint64 milliseconds) const; // Needed as ints in QML are 32 bits so we need to use a QVariant void setShareExpireDateFromQml(const QVariant &share, const QVariant milliseconds) const; - void setSharePassword(const SharePtr &share, const QString &password); + void setSharePassword(const OCC::SharePtr &share, const QString &password); void setSharePasswordFromQml(const QVariant &share, const QString &password); - void setShareNote(const SharePtr &share, const QString ¬e) const; + void setShareNote(const OCC::SharePtr &share, const QString ¬e) const; void setShareNoteFromQml(const QVariant &share, const QString ¬e) const; private slots: @@ -160,11 +160,11 @@ private slots: void slotPropfindReceived(const QVariantMap &result); void slotServerError(const int code, const QString &message); - void slotAddShare(const SharePtr &share); + void slotAddShare(const OCC::SharePtr &share); void slotRemoveShareWithId(const QString &shareId); - void slotSharesFetched(const QList &shares); - void slotAddSharee(const ShareePtr &sharee); - void slotRemoveSharee(const ShareePtr &sharee); + void slotSharesFetched(const QList &shares); + void slotAddSharee(const OCC::ShareePtr &sharee); + void slotRemoveSharee(const OCC::ShareePtr &sharee); void slotSharePermissionsSet(const QString &shareId); void slotSharePasswordSet(const QString &shareId); diff --git a/src/gui/filedetails/sortedsharemodel.h b/src/gui/filedetails/sortedsharemodel.h index a9acc1d58..9e9db90f5 100644 --- a/src/gui/filedetails/sortedsharemodel.h +++ b/src/gui/filedetails/sortedsharemodel.h @@ -33,7 +33,7 @@ signals: void shareModelChanged(); public slots: - void setShareModel(ShareModel *shareModel); + void setShareModel(OCC::ShareModel *shareModel); protected: [[nodiscard]] bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override; diff --git a/src/gui/folder.h b/src/gui/folder.h index 217668311..e5541460a 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -299,10 +299,10 @@ public: signals: void syncStateChange(); void syncStarted(); - void syncFinished(const SyncResult &result); - void progressInfo(const ProgressInfo &progress); + void syncFinished(const OCC::SyncResult &result); + void progressInfo(const OCC::ProgressInfo &progress); void newBigFolderDiscovered(const QString &); // A new folder bigger than the threshold was discovered - void syncPausedChanged(Folder *, bool paused); + void syncPausedChanged(OCC::Folder *, bool paused); void canSyncChanged(); /** @@ -319,7 +319,7 @@ public slots: void slotTerminateSync(); // connected to the corresponding signals in the SyncEngine - void slotAboutToRemoveAllFiles(SyncFileItem::Direction, std::function callback); + void slotAboutToRemoveAllFiles(OCC::SyncFileItem::Direction, std::function callback); /** * Starts a sync operation @@ -338,7 +338,7 @@ public slots: * changes. Needs to check whether this change should trigger a new * sync run to be scheduled. */ - void slotWatchedPathChanged(const QString &path, ChangeReason reason); + void slotWatchedPathChanged(const QString &path, OCC::Folder::ChangeReason reason); /** * Mark a virtual file as being requested for download, and start a sync. @@ -374,12 +374,12 @@ private slots: /** Adds a error message that's not tied to a specific item. */ - void slotSyncError(const QString &message, ErrorCategory category = ErrorCategory::Normal); + void slotSyncError(const QString &message, OCC::ErrorCategory category = OCC::ErrorCategory::Normal); - void slotAddErrorToGui(SyncFileItem::Status status, const QString &errorMessage, const QString &subject = {}); + void slotAddErrorToGui(OCC::SyncFileItem::Status status, const QString &errorMessage, const QString &subject = {}); - void slotTransmissionProgress(const ProgressInfo &pi); - void slotItemCompleted(const SyncFileItemPtr &); + void slotTransmissionProgress(const OCC::ProgressInfo &pi); + void slotItemCompleted(const OCC::SyncFileItemPtr &); void slotRunEtagJob(); void etagRetrieved(const QByteArray &, const QDateTime &tp); @@ -404,7 +404,7 @@ private slots: void slotFolderConflicts(const QString &folder, const QStringList &conflictPaths); /** Warn users if they create a file or folder that is selective-sync excluded */ - void warnOnNewExcludedItem(const SyncJournalFileRecord &record, const QStringRef &path); + void warnOnNewExcludedItem(const OCC::SyncJournalFileRecord &record, const QStringRef &path); /** Warn users about an unreliable folder watcher */ void slotWatcherUnreliable(const QString &message); diff --git a/src/gui/folderman.h b/src/gui/folderman.h index 6409cc8b4..37d91e4d7 100644 --- a/src/gui/folderman.h +++ b/src/gui/folderman.h @@ -221,7 +221,7 @@ signals: * * Attention: The folder may be zero. Do a general update of the state then. */ - void folderSyncStateChange(Folder *); + void folderSyncStateChange(OCC::Folder *); /** * Indicates when the schedule queue changes. @@ -231,12 +231,12 @@ signals: /** * Emitted whenever the list of configured folders changes. */ - void folderListChanged(const Folder::Map &); + void folderListChanged(const OCC::Folder::Map &); /** * Emitted once slotRemoveFoldersForAccount is done wiping */ - void wipeDone(AccountState *account, bool success); + void wipeDone(OCC::AccountState *account, bool success); public slots: @@ -260,18 +260,18 @@ public slots: void slotSyncOnceFileUnlocks(const QString &path); // slot to schedule an ETag job (from Folder only) - void slotScheduleETagJob(const QString &alias, RequestEtagJob *job); + void slotScheduleETagJob(const QString &alias, OCC::RequestEtagJob *job); /** Wipe folder */ - void slotWipeFolderForAccount(AccountState *accountState); + void slotWipeFolderForAccount(OCC::AccountState *accountState); - void forceSyncForFolder(Folder *folder); + void forceSyncForFolder(OCC::Folder *folder); private slots: - void slotFolderSyncPaused(Folder *, bool paused); + void slotFolderSyncPaused(OCC::Folder *, bool paused); void slotFolderCanSyncChanged(); void slotFolderSyncStarted(); - void slotFolderSyncFinished(const SyncResult &); + void slotFolderSyncFinished(const OCC::SyncResult &); void slotRunOneEtagJob(); void slotEtagJobDestroyed(QObject *); @@ -280,15 +280,15 @@ private slots: void slotStartScheduledFolderSync(); void slotEtagPollTimerTimeout(); - void slotAccountRemoved(AccountState *accountState); + void slotAccountRemoved(OCC::AccountState *accountState); - void slotRemoveFoldersForAccount(AccountState *accountState); + void slotRemoveFoldersForAccount(OCC::AccountState *accountState); // Wraps the Folder::syncStateChange() signal into the // FolderMan::folderSyncStateChange(Folder*) signal. void slotForwardFolderSyncStateChange(); - void slotServerVersionChanged(Account *account); + void slotServerVersionChanged(OCC::Account *account); /** * A file whose locks were being monitored has become unlocked. @@ -306,9 +306,9 @@ private slots: */ void slotScheduleFolderByTime(); - void slotSetupPushNotifications(const Folder::Map &); - void slotProcessFilesPushNotification(Account *account); - void slotConnectToPushNotifications(Account *account); + void slotSetupPushNotifications(const OCC::Folder::Map &); + void slotProcessFilesPushNotification(OCC::Account *account); + void slotConnectToPushNotifications(OCC::Account *account); private: /** Adds a new folder, does not add it to the account settings and diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h index 914406f3a..f5fe5018f 100644 --- a/src/gui/folderstatusmodel.h +++ b/src/gui/folderstatusmodel.h @@ -119,19 +119,19 @@ public: QModelIndex indexForPath(Folder *f, const QString &path) const; public slots: - void slotUpdateFolderState(Folder *); + void slotUpdateFolderState(OCC::Folder *); void slotApplySelectiveSync(); void resetFolders(); void slotSyncAllPendingBigFolders(); void slotSyncNoPendingBigFolders(); - void slotSetProgress(const ProgressInfo &progress); + void slotSetProgress(const OCC::ProgressInfo &progress); private slots: void slotUpdateDirectories(const QStringList &); void slotGatherPermissions(const QString &name, const QMap &properties); void slotGatherEncryptionStatus(const QString &href, const QMap &properties); void slotLscolFinishedWithError(QNetworkReply *r); - void slotFolderSyncStateChange(Folder *f); + void slotFolderSyncStateChange(OCC::Folder *f); void slotFolderScheduleQueueChanged(); void slotNewBigFolder(); diff --git a/src/gui/owncloudgui.h b/src/gui/owncloudgui.h index 7b40d520d..ee38ad496 100644 --- a/src/gui/owncloudgui.h +++ b/src/gui/owncloudgui.h @@ -78,13 +78,13 @@ public slots: void slotShowTrayUpdateMessage(const QString &title, const QString &msg, const QUrl &webUrl); void slotShowOptionalTrayMessage(const QString &title, const QString &msg); void slotFolderOpenAction(const QString &alias); - void slotUpdateProgress(const QString &folder, const ProgressInfo &progress); + void slotUpdateProgress(const QString &folder, const OCC::ProgressInfo &progress); void slotShowGuiMessage(const QString &title, const QString &message); void slotFoldersChanged(); void slotShowSettings(); void slotShowSyncProtocol(); void slotShutdown(); - void slotSyncStateChange(Folder *); + void slotSyncStateChange(OCC::Folder *); void slotTrayClicked(QSystemTrayIcon::ActivationReason reason); void slotToggleLogBrowser(); void slotOpenOwnCloud(); @@ -94,7 +94,7 @@ public slots: void slotHelp(); void slotOpenPath(const QString &path); void slotAccountStateChanged(); - void slotTrayMessageIfServerUnsupported(Account *account); + void slotTrayMessageIfServerUnsupported(OCC::Account *account); /** diff --git a/src/gui/remotewipe.h b/src/gui/remotewipe.h index b1353e864..f57ec8043 100644 --- a/src/gui/remotewipe.h +++ b/src/gui/remotewipe.h @@ -19,7 +19,7 @@ signals: /** * Notify if wipe was requested */ - void authorized(AccountState*); + void authorized(OCC::AccountState*); /** * Notify if user only needs to login again @@ -44,7 +44,7 @@ private slots: * Once the client has wiped all the required data a POST to * /index.php/core/wipe/success */ - void notifyServerSuccessJob(AccountState *accountState, bool); + void notifyServerSuccessJob(OCC::AccountState *accountState, bool); void notifyServerSuccessJobSlot(); private: @@ -58,4 +58,4 @@ private: friend class ::TestRemoteWipe; }; } -#endif // REMOTEWIPE_H \ No newline at end of file +#endif // REMOTEWIPE_H diff --git a/src/gui/settingsdialog.h b/src/gui/settingsdialog.h index 0d84a1cb1..21b6752d2 100644 --- a/src/gui/settingsdialog.h +++ b/src/gui/settingsdialog.h @@ -55,7 +55,7 @@ public: public slots: void showFirstPage(); - void showIssuesList(AccountState *account); + void showIssuesList(OCC::AccountState *account); void slotSwitchPage(QAction *action); void slotAccountAvatarChanged(); void slotAccountDisplayNameChanged(); @@ -70,8 +70,8 @@ protected: void changeEvent(QEvent *) override; private slots: - void accountAdded(AccountState *); - void accountRemoved(AccountState *); + void accountAdded(OCC::AccountState *); + void accountRemoved(OCC::AccountState *); private: void customizeStyle(); diff --git a/src/gui/sharemanager.h b/src/gui/sharemanager.h index d5cff7c46..c3462377a 100644 --- a/src/gui/sharemanager.h +++ b/src/gui/sharemanager.h @@ -147,7 +147,7 @@ public slots: * On success the permissionsSet signal is emitted * In case of a server error the serverError signal is emitted. */ - void setPermissions(Permissions permissions); + void setPermissions(OCC::Share::Permissions permissions); /* * Set the password for remote share @@ -403,9 +403,9 @@ public: void fetchShares(const QString &path); signals: - void shareCreated(const SharePtr &share); - void linkShareCreated(const QSharedPointer &share); - void sharesFetched(const QList &shares); + void shareCreated(const OCC::SharePtr &share); + void linkShareCreated(const QSharedPointer &share); + void sharesFetched(const QList &shares); void serverError(int code, const QString &message); /** Emitted when creating a link share with password fails. diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index e023dd375..cadde8127 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -673,7 +673,7 @@ public: } private slots: - void sharesFetched(const QList &shares) + void sharesFetched(const QList &shares) { auto shareName = SocketApi::tr("Context menu share"); @@ -694,7 +694,7 @@ private slots: _shareManager.createLinkShare(_localFile, shareName, QString()); } - void linkShareCreated(const QSharedPointer &share) + void linkShareCreated(const QSharedPointer &share) { qCDebug(lcPublicLink) << "New share created"; success(share->getLink().toString()); diff --git a/src/gui/socketapi/socketapi.h b/src/gui/socketapi/socketapi.h index 5f16a00fc..550406bcf 100644 --- a/src/gui/socketapi/socketapi.h +++ b/src/gui/socketapi/socketapi.h @@ -56,10 +56,10 @@ public: ~SocketApi() override; public slots: - void slotUpdateFolderView(Folder *f); + void slotUpdateFolderView(OCC::Folder *f); void slotUnregisterPath(const QString &alias); void slotRegisterPath(const QString &alias); - void broadcastStatusPushMessage(const QString &systemPath, SyncFileStatus fileStatus); + void broadcastStatusPushMessage(const QString &systemPath, OCC::SyncFileStatus fileStatus); signals: void shareCommandReceived(const QString &localPath); @@ -104,47 +104,47 @@ private: void processShareRequest(const QString &localFile, SocketListener *listener); void processFileActivityRequest(const QString &localFile); - Q_INVOKABLE void command_RETRIEVE_FOLDER_STATUS(const QString &argument, SocketListener *listener); - Q_INVOKABLE void command_RETRIEVE_FILE_STATUS(const QString &argument, SocketListener *listener); + Q_INVOKABLE void command_RETRIEVE_FOLDER_STATUS(const QString &argument, OCC::SocketListener *listener); + Q_INVOKABLE void command_RETRIEVE_FILE_STATUS(const QString &argument, OCC::SocketListener *listener); - Q_INVOKABLE void command_VERSION(const QString &argument, SocketListener *listener); + Q_INVOKABLE void command_VERSION(const QString &argument, OCC::SocketListener *listener); - Q_INVOKABLE void command_SHARE_MENU_TITLE(const QString &argument, SocketListener *listener); + Q_INVOKABLE void command_SHARE_MENU_TITLE(const QString &argument, OCC::SocketListener *listener); // The context menu actions - Q_INVOKABLE void command_ACTIVITY(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_SHARE(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_MANAGE_PUBLIC_LINKS(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_COPY_PUBLIC_LINK(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_COPY_PRIVATE_LINK(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_EMAIL_PRIVATE_LINK(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_OPEN_PRIVATE_LINK(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_MAKE_AVAILABLE_LOCALLY(const QString &filesArg, SocketListener *listener); - Q_INVOKABLE void command_MAKE_ONLINE_ONLY(const QString &filesArg, SocketListener *listener); - Q_INVOKABLE void command_RESOLVE_CONFLICT(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_DELETE_ITEM(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_MOVE_ITEM(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_LOCK_FILE(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_UNLOCK_FILE(const QString &localFile, SocketListener *listener); + Q_INVOKABLE void command_ACTIVITY(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_SHARE(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_MANAGE_PUBLIC_LINKS(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_COPY_PUBLIC_LINK(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_COPY_PRIVATE_LINK(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_EMAIL_PRIVATE_LINK(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_OPEN_PRIVATE_LINK(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_MAKE_AVAILABLE_LOCALLY(const QString &filesArg, OCC::SocketListener *listener); + Q_INVOKABLE void command_MAKE_ONLINE_ONLY(const QString &filesArg, OCC::SocketListener *listener); + Q_INVOKABLE void command_RESOLVE_CONFLICT(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_DELETE_ITEM(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_MOVE_ITEM(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_LOCK_FILE(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_UNLOCK_FILE(const QString &localFile, OCC::SocketListener *listener); void setFileLock(const QString &localFile, const SyncFileItem::LockStatus lockState) const; // Windows Shell / Explorer pinning fallbacks, see issue: https://github.com/nextcloud/desktop/issues/1599 #ifdef Q_OS_WIN - Q_INVOKABLE void command_COPYASPATH(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_OPENNEWWINDOW(const QString &localFile, SocketListener *listener); - Q_INVOKABLE void command_OPEN(const QString &localFile, SocketListener *listener); + Q_INVOKABLE void command_COPYASPATH(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_OPENNEWWINDOW(const QString &localFile, OCC::SocketListener *listener); + Q_INVOKABLE void command_OPEN(const QString &localFile, OCC::SocketListener *listener); #endif // External sync - Q_INVOKABLE void command_V2_LIST_ACCOUNTS(const QSharedPointer &job) const; - Q_INVOKABLE void command_V2_UPLOAD_FILES_FROM(const QSharedPointer &job) const; + Q_INVOKABLE void command_V2_LIST_ACCOUNTS(const QSharedPointer &job) const; + Q_INVOKABLE void command_V2_UPLOAD_FILES_FROM(const QSharedPointer &job) const; // Fetch the private link and call targetFun void fetchPrivateLinkUrlHelper(const QString &localFile, const std::function &targetFun); /** Sends translated/branded strings that may be useful to the integration */ - Q_INVOKABLE void command_GET_STRINGS(const QString &argument, SocketListener *listener); + Q_INVOKABLE void command_GET_STRINGS(const QString &argument, OCC::SocketListener *listener); // Sends the context menu options relating to sharing to listener void sendSharingContextMenuOptions(const FileData &fileData, SocketListener *listener, bool enabled); @@ -167,10 +167,10 @@ private: * If flag contains 'd', the menu should be disabled * and ends with GET_MENU_ITEMS:END */ - Q_INVOKABLE void command_GET_MENU_ITEMS(const QString &argument, SocketListener *listener); + Q_INVOKABLE void command_GET_MENU_ITEMS(const QString &argument, OCC::SocketListener *listener); /// Direct Editing - Q_INVOKABLE void command_EDIT(const QString &localFile, SocketListener *listener); + Q_INVOKABLE void command_EDIT(const QString &localFile, OCC::SocketListener *listener); DirectEditor* getDirectEditorForLocalFile(const QString &localFile); #if GUI_TESTING diff --git a/src/gui/systray.h b/src/gui/systray.h index d28b66290..697d24e2c 100644 --- a/src/gui/systray.h +++ b/src/gui/systray.h @@ -100,7 +100,7 @@ signals: void openHelp(); void shutdown(); - void showFileDetailsPage(const QString &fileLocalPath, const FileDetailsPage page); + void showFileDetailsPage(const QString &fileLocalPath, const OCC::Systray::FileDetailsPage page); void sendChatMessage(const QString &token, const QString &message, const QString &replyTo); void showErrorMessageDialog(const QString &error); @@ -111,11 +111,11 @@ public slots: void setTrayEngine(QQmlApplicationEngine *trayEngine); void create(); - void showMessage(const QString &title, const QString &message, MessageIcon icon = Information); + void showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon icon = Information); void showUpdateMessage(const QString &title, const QString &message, const QUrl &webUrl); void setToolTip(const QString &tip); - void createCallDialog(const Activity &callNotification, const AccountStatePtr accountState); + void createCallDialog(const OCC::Activity &callNotification, const OCC::AccountStatePtr accountState); void createEditFileLocallyLoadingDialog(const QString &fileName); void destroyEditFileLocallyLoadingDialog(); @@ -130,7 +130,7 @@ public slots: // only for those managed by the C++ engine void destroyDialog(QQuickWindow *window) const; - void showWindow(WindowPosition position = WindowPosition::Default); + void showWindow(OCC::Systray::WindowPosition position = OCC::Systray::WindowPosition::Default); void hideWindow(); void setSyncIsPaused(const bool syncIsPaused); diff --git a/src/gui/tray/activitylistmodel.h b/src/gui/tray/activitylistmodel.h index e030445ed..3ec595555 100644 --- a/src/gui/tray/activitylistmodel.h +++ b/src/gui/tray/activitylistmodel.h @@ -110,14 +110,14 @@ public slots: void slotTriggerAction(const int activityIndex, const int actionIndex); void slotTriggerDismiss(const int activityIndex); - void addNotificationToActivityList(const Activity &activity); - void addErrorToActivityList(const Activity &activity); - void addIgnoredFileToList(const Activity &newActivity); - void addSyncFileItemToActivityList(const Activity &activity); + void addNotificationToActivityList(const OCC::Activity &activity); + void addErrorToActivityList(const OCC::Activity &activity); + void addIgnoredFileToList(const OCC::Activity &newActivity); + void addSyncFileItemToActivityList(const OCC::Activity &activity); void removeActivityFromActivityList(int row); - void removeActivityFromActivityList(const Activity &activity); + void removeActivityFromActivityList(const OCC::Activity &activity); - void setAccountState(AccountState *state); + void setAccountState(OCC::AccountState *state); void setReplyMessageSent(const int activityIndex, const QString &message); void setCurrentItem(const int currentItem); @@ -140,12 +140,12 @@ protected slots: void setDoneFetching(bool value); void setHideOldActivities(bool value); void setDisplayActions(bool value); - void setFinalList(const ActivityList &finalList); // added for unit tests + void setFinalList(const OCC::ActivityList &finalList); // added for unit tests virtual void startFetchJob(); private slots: - void addEntriesToActivityList(const ActivityList &activityList); + void addEntriesToActivityList(const OCC::ActivityList &activityList); private: static QVariantList convertLinksToMenuEntries(const Activity &activity); diff --git a/src/gui/tray/notificationhandler.h b/src/gui/tray/notificationhandler.h index 4100df7d1..8e8bd3611 100644 --- a/src/gui/tray/notificationhandler.h +++ b/src/gui/tray/notificationhandler.h @@ -16,8 +16,8 @@ public: explicit ServerNotificationHandler(AccountState *accountState, QObject *parent = nullptr); signals: - void newNotificationList(ActivityList); - void newIncomingCallsList(ActivityList); + void newNotificationList(OCC::ActivityList); + void newIncomingCallsList(OCC::ActivityList); public slots: void slotFetchNotifications(); diff --git a/src/gui/tray/sortedactivitylistmodel.h b/src/gui/tray/sortedactivitylistmodel.h index 4b6966921..d3e8219c1 100644 --- a/src/gui/tray/sortedactivitylistmodel.h +++ b/src/gui/tray/sortedactivitylistmodel.h @@ -34,7 +34,7 @@ signals: void activityListModelChanged(); public slots: - void setActivityListModel(ActivityListModel *activityListModel); + void setActivityListModel(OCC::ActivityListModel *activityListModel); protected: [[nodiscard]] bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override; diff --git a/src/gui/tray/usermodel.h b/src/gui/tray/usermodel.h index 08e23f0b3..d28ff8ea5 100644 --- a/src/gui/tray/usermodel.h +++ b/src/gui/tray/usermodel.h @@ -88,17 +88,17 @@ signals: void sendReplyMessage(const int activityIndex, const QString &conversationToken, const QString &message, const QString &replyTo); public slots: - void slotItemCompleted(const QString &folder, const SyncFileItemPtr &item); - void slotProgressInfo(const QString &folder, const ProgressInfo &progress); - void slotAddError(const QString &folderAlias, const QString &message, ErrorCategory category); - void slotAddErrorToGui(const QString &folderAlias, SyncFileItem::Status status, const QString &errorMessage, const QString &subject = {}); + void slotItemCompleted(const QString &folder, const OCC::SyncFileItemPtr &item); + void slotProgressInfo(const QString &folder, const OCC::ProgressInfo &progress); + void slotAddError(const QString &folderAlias, const QString &message, OCC::ErrorCategory category); + void slotAddErrorToGui(const QString &folderAlias, OCC::SyncFileItem::Status status, const QString &errorMessage, const QString &subject = {}); void slotNotificationRequestFinished(int statusCode); void slotNotifyNetworkError(QNetworkReply *reply); void slotEndNotificationRequest(int replyCode); void slotNotifyServerFinished(const QString &reply, int replyCode); void slotSendNotificationRequest(const QString &accountName, const QString &link, const QByteArray &verb, int row); - void slotBuildNotificationDisplay(const ActivityList &list); - void slotBuildIncomingCallDialogs(const ActivityList &list); + void slotBuildNotificationDisplay(const OCC::ActivityList &list); + void slotBuildIncomingCallDialogs(const OCC::ActivityList &list); void slotRefreshNotifications(); void slotRefreshActivitiesInitial(); void slotRefreshActivities(); diff --git a/src/gui/userinfo.h b/src/gui/userinfo.h index 1d2b8d27a..eaad8db19 100644 --- a/src/gui/userinfo.h +++ b/src/gui/userinfo.h @@ -91,7 +91,7 @@ private Q_SLOTS: Q_SIGNALS: void quotaUpdated(qint64 total, qint64 used); - void fetchedLastInfo(UserInfo *userInfo); + void fetchedLastInfo(OCC::UserInfo *userInfo); private: [[nodiscard]] bool canGetInfo() const; diff --git a/src/gui/userstatusselectormodel.h b/src/gui/userstatusselectormodel.h index 97d94478c..6f85a28a8 100644 --- a/src/gui/userstatusselectormodel.h +++ b/src/gui/userstatusselectormodel.h @@ -93,7 +93,7 @@ public: Q_REQUIRED_RESULT QVariantList clearStageTypes() const; Q_REQUIRED_RESULT QString clearAtDisplayString() const; - Q_INVOKABLE [[nodiscard]] QString clearAtReadable(const UserStatus &status) const; + Q_INVOKABLE [[nodiscard]] QString clearAtReadable(const OCC::UserStatus &status) const; Q_REQUIRED_RESULT QString errorMessage() const; @@ -101,8 +101,8 @@ public slots: void setUserIndex(const int userIndex); void setUserStatus(); void clearUserStatus(); - void setClearAt(const ClearStageType clearStageType); - void setPredefinedStatus(const UserStatus &predefinedStatus); + void setClearAt(const OCC::UserStatusSelectorModel::ClearStageType clearStageType); + void setPredefinedStatus(const OCC::UserStatus &predefinedStatus); signals: void userIndexChanged(); diff --git a/src/gui/wizard/owncloudwizard.h b/src/gui/wizard/owncloudwizard.h index d21e8bf0d..c720ab0ed 100644 --- a/src/gui/wizard/owncloudwizard.h +++ b/src/gui/wizard/owncloudwizard.h @@ -90,9 +90,9 @@ public: QList _clientSslCaCertificates; public slots: - void setAuthType(DetermineAuthTypeJob::AuthType type); + void setAuthType(OCC::DetermineAuthTypeJob::AuthType type); void setRemoteFolder(const QString &); - void appendToConfigurationLog(const QString &msg, LogType type = LogParagraph); + void appendToConfigurationLog(const QString &msg, OCC::OwncloudWizard::LogType type = LogParagraph); void slotCurrentPageChanged(int); void successfulStep(); void slotCustomButtonClicked(const int which); diff --git a/src/libsync/account.h b/src/libsync/account.h index 42af77f56..8be18b1de 100644 --- a/src/libsync/account.h +++ b/src/libsync/account.h @@ -316,16 +316,16 @@ signals: /// Triggered by handleInvalidCredentials() void invalidCredentials(); - void credentialsFetched(AbstractCredentials *credentials); - void credentialsAsked(AbstractCredentials *credentials); + void credentialsFetched(OCC::AbstractCredentials *credentials); + void credentialsAsked(OCC::AbstractCredentials *credentials); /// Forwards from QNetworkAccessManager::proxyAuthenticationRequired(). void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *); // e.g. when the approved SSL certificates changed - void wantsAccountSaved(Account *acc); + void wantsAccountSaved(OCC::Account *acc); - void serverVersionChanged(Account *account, const QString &newVersion, const QString &oldVersion); + void serverVersionChanged(OCC::Account *account, const QString &newVersion, const QString &oldVersion); void accountChangedAvatar(); void accountChangedDisplayName(); @@ -334,8 +334,8 @@ signals: /// Used in RemoteWipe void appPasswordRetrieved(QString); - void pushNotificationsReady(Account *account); - void pushNotificationsDisabled(Account *account); + void pushNotificationsReady(OCC::Account *account); + void pushNotificationsDisabled(OCC::Account *account); void userStatusChanged(); diff --git a/src/libsync/bandwidthmanager.h b/src/libsync/bandwidthmanager.h index adef4e668..15e08f997 100644 --- a/src/libsync/bandwidthmanager.h +++ b/src/libsync/bandwidthmanager.h @@ -44,10 +44,10 @@ public: public slots: - void registerUploadDevice(UploadDevice *); + void registerUploadDevice(OCC::UploadDevice *); void unregisterUploadDevice(QObject *); - void registerDownloadJob(GETFileJob *); + void registerDownloadJob(OCC::GETFileJob *); void unregisterDownloadJob(QObject *); void absoluteLimitTimerExpired(); diff --git a/src/libsync/bulkpropagatorjob.h b/src/libsync/bulkpropagatorjob.h index e363ca6ee..451bcf88f 100644 --- a/src/libsync/bulkpropagatorjob.h +++ b/src/libsync/bulkpropagatorjob.h @@ -67,26 +67,26 @@ public: JobParallelism parallelism() override; private slots: - void startUploadFile(SyncFileItemPtr item, UploadFileInfo fileToUpload); + void startUploadFile(OCC::SyncFileItemPtr item, OCC::BulkPropagatorJob::UploadFileInfo fileToUpload); // Content checksum computed, compute the transmission checksum - void slotComputeTransmissionChecksum(SyncFileItemPtr item, - UploadFileInfo fileToUpload); + void slotComputeTransmissionChecksum(OCC::SyncFileItemPtr item, + OCC::BulkPropagatorJob::UploadFileInfo fileToUpload); // transmission checksum computed, prepare the upload - void slotStartUpload(SyncFileItemPtr item, - UploadFileInfo fileToUpload, + void slotStartUpload(OCC::SyncFileItemPtr item, + OCC::BulkPropagatorJob::UploadFileInfo fileToUpload, const QByteArray &transmissionChecksumType, const QByteArray &transmissionChecksum); // invoked on internal error to unlock a folder and faile - void slotOnErrorStartFolderUnlock(SyncFileItemPtr item, - SyncFileItem::Status status, + void slotOnErrorStartFolderUnlock(OCC::SyncFileItemPtr item, + OCC::SyncFileItem::Status status, const QString &errorString); void slotPutFinished(); - void slotUploadProgress(SyncFileItemPtr item, qint64 sent, qint64 total); + void slotUploadProgress(OCC::SyncFileItemPtr item, qint64 sent, qint64 total); void slotJobDestroyed(QObject *job); diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 1f4576564..bda90c97b 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -260,7 +260,7 @@ void DiscoveryPhase::scheduleMoreJobs() DiscoverySingleLocalDirectoryJob::DiscoverySingleLocalDirectoryJob(const AccountPtr &account, const QString &localPath, OCC::Vfs *vfs, QObject *parent) : QObject(parent), QRunnable(), _localPath(localPath), _account(account), _vfs(vfs) { - qRegisterMetaType >("QVector"); + qRegisterMetaType >("QVector"); } // Use as QRunnable diff --git a/src/libsync/discoveryphase.h b/src/libsync/discoveryphase.h index 6c633d1bf..fc7b00578 100644 --- a/src/libsync/discoveryphase.h +++ b/src/libsync/discoveryphase.h @@ -102,11 +102,11 @@ public: void run() override; signals: - void finished(QVector result); + void finished(QVector result); void finishedFatalError(QString errorString); void finishedNonFatalError(QString errorString); - void itemDiscovered(SyncFileItemPtr item); + void itemDiscovered(OCC::SyncFileItemPtr item); void childIgnored(bool b); private slots: private: @@ -134,9 +134,9 @@ public: // This is not actually a network job, it is just a job signals: - void firstDirectoryPermissions(RemotePermissions); + void firstDirectoryPermissions(OCC::RemotePermissions); void etag(const QByteArray &, const QDateTime &time); - void finished(const HttpResult> &result); + void finished(const OCC::HttpResult> &result); private slots: void directoryListingIteratedSlot(const QString &, const QMap &); @@ -286,7 +286,7 @@ public: signals: void fatalError(const QString &errorString); - void itemDiscovered(const SyncFileItemPtr &item); + void itemDiscovered(const OCC::SyncFileItemPtr &item); void finished(); // A new folder was discovered and was not synced because of the confirmation feature diff --git a/src/libsync/localdiscoverytracker.h b/src/libsync/localdiscoverytracker.h index ea6c7a765..7cc12895a 100644 --- a/src/libsync/localdiscoverytracker.h +++ b/src/libsync/localdiscoverytracker.h @@ -73,7 +73,7 @@ public slots: * Success and failure of sync items adjust what the next sync is * supposed to do. */ - void slotItemCompleted(const SyncFileItemPtr &item); + void slotItemCompleted(const OCC::SyncFileItemPtr &item); /** * When a sync finishes, the lists must be updated diff --git a/src/libsync/networkjobs.h b/src/libsync/networkjobs.h index 1416e6931..51924396e 100644 --- a/src/libsync/networkjobs.h +++ b/src/libsync/networkjobs.h @@ -502,7 +502,7 @@ public: explicit DetermineAuthTypeJob(AccountPtr account, QObject *parent = nullptr); void start(); signals: - void authType(AuthType); + void authType(OCC::DetermineAuthTypeJob::AuthType); private: void checkAllDone(); diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index 95fe4e743..87f5f0702 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -283,7 +283,7 @@ public: private slots: void slotSubJobAbortFinished(); - bool possiblyRunNextJob(PropagatorJob *next) + bool possiblyRunNextJob(OCC::PropagatorJob *next) { if (next->_state == NotYetStarted) { connect(next, &PropagatorJob::finished, this, &PropagatorCompositeJob::slotSubJobFinished); @@ -291,7 +291,7 @@ private slots: return next->scheduleSelfOrChild(); } - void slotSubJobFinished(SyncFileItem::Status status); + void slotSubJobFinished(OCC::SyncFileItem::Status status); void finalize(); }; @@ -349,8 +349,8 @@ public: private slots: - void slotFirstJobFinished(SyncFileItem::Status status); - virtual void slotSubJobsFinished(SyncFileItem::Status status); + void slotFirstJobFinished(OCC::SyncFileItem::Status status); + virtual void slotSubJobsFinished(OCC::SyncFileItem::Status status); }; @@ -374,11 +374,11 @@ public: [[nodiscard]] qint64 committedDiskSpace() const override; public slots: - void appendDirDeletionJob(PropagatorJob *job); + void appendDirDeletionJob(OCC::PropagatorJob *job); private slots: - void slotSubJobsFinished(SyncFileItem::Status status) override; - void slotDirDeletionJobsFinished(SyncFileItem::Status status); + void slotSubJobsFinished(OCC::SyncFileItem::Status status) override; + void slotDirDeletionJobsFinished(OCC::SyncFileItem::Status status); private: @@ -636,7 +636,7 @@ private slots: } /** Emit the finished signal and make sure it is only emitted once */ - void emitFinished(SyncFileItem::Status status) + void emitFinished(OCC::SyncFileItem::Status status) { if (!_finishedEmited) emit finished(status == SyncFileItem::Success); @@ -647,9 +647,9 @@ private slots: void scheduleNextJobImpl(); signals: - void newItem(const SyncFileItemPtr &); - void itemCompleted(const SyncFileItemPtr &); - void progress(const SyncFileItem &, qint64 bytes); + void newItem(const OCC::SyncFileItemPtr &); + void itemCompleted(const OCC::SyncFileItemPtr &); + void progress(const OCC::SyncFileItem &, qint64 bytes); void finished(bool success); /** Emitted when propagation has problems with a locked file. */ diff --git a/src/libsync/progressdispatcher.h b/src/libsync/progressdispatcher.h index 3cde3916e..3276586cd 100644 --- a/src/libsync/progressdispatcher.h +++ b/src/libsync/progressdispatcher.h @@ -279,16 +279,16 @@ signals: @param[out] progress A struct with all progress info. */ - void progressInfo(const QString &folder, const ProgressInfo &progress); + void progressInfo(const QString &folder, const OCC::ProgressInfo &progress); /** * @brief: the item was completed by a job */ - void itemCompleted(const QString &folder, const SyncFileItemPtr &item); + void itemCompleted(const QString &folder, const OCC::SyncFileItemPtr &item); /** * @brief A new folder-wide sync error was seen. */ - void syncError(const QString &folder, const QString &message, ErrorCategory category); + void syncError(const QString &folder, const QString &message, OCC::ErrorCategory category); /** * @brief Emitted when an error needs to be added into GUI @@ -297,7 +297,7 @@ signals: * @param[out] full error message * @param[out] subject (optional) */ - void addErrorToGui(const QString &folder, SyncFileItem::Status status, const QString &errorMessage, const QString &subject); + void addErrorToGui(const QString &folder, OCC::SyncFileItem::Status status, const QString &errorMessage, const QString &subject); /** * @brief Emitted for a folder when a sync is done, listing all pending conflicts diff --git a/src/libsync/propagateupload.h b/src/libsync/propagateupload.h index 6113a419d..12e06177a 100644 --- a/src/libsync/propagateupload.h +++ b/src/libsync/propagateupload.h @@ -362,7 +362,7 @@ public: void doStartUpload() override; public slots: - void abort(PropagatorJob::AbortType abortType) override; + void abort(OCC::PropagatorJob::AbortType abortType) override; private slots: void startNextChunk(); void slotPutFinished(); @@ -412,7 +412,7 @@ private: void startNewUpload(); void startNextChunk(); public slots: - void abort(AbortType abortType) override; + void abort(OCC::PropagateUploadFileNG::AbortType abortType) override; private slots: void slotPropfindFinished(); void slotPropfindFinishedWithError(); diff --git a/src/libsync/pushnotifications.h b/src/libsync/pushnotifications.h index 6d06c1e90..321ad1cc4 100644 --- a/src/libsync/pushnotifications.h +++ b/src/libsync/pushnotifications.h @@ -72,17 +72,17 @@ signals: /** * Will be emitted if files on the server changed */ - void filesChanged(Account *account); + void filesChanged(OCC::Account *account); /** * Will be emitted if activities have been changed on the server */ - void activitiesChanged(Account *account); + void activitiesChanged(OCC::Account *account); /** * Will be emitted if notifications have been changed on the server */ - void notificationsChanged(Account *account); + void notificationsChanged(OCC::Account *account); /** * Will be emitted if push notifications are unable to authenticate diff --git a/src/libsync/syncengine.h b/src/libsync/syncengine.h index 1e49aa5eb..5e84d16f9 100644 --- a/src/libsync/syncengine.h +++ b/src/libsync/syncengine.h @@ -127,7 +127,7 @@ public slots: void abort(); void setNetworkLimits(int upload, int download); - void setSyncOptions(const SyncOptions &options) { _syncOptions = options; } + void setSyncOptions(const OCC::SyncOptions &options) { _syncOptions = options; } void setIgnoreHiddenFiles(bool ignore) { _ignore_hidden_files = ignore; } /** @@ -141,7 +141,7 @@ public slots: * revert afterwards. Use _lastLocalDiscoveryStyle to discover the last * sync's style. */ - void setLocalDiscoveryOptions(LocalDiscoveryStyle style, std::set paths = {}); + void setLocalDiscoveryOptions(OCC::LocalDiscoveryStyle style, std::set paths = {}); void addAcceptedInvalidFileName(const QString& filePath); @@ -150,17 +150,17 @@ signals: void rootEtag(const QByteArray &, const QDateTime &); // after the above signals. with the items that actually need propagating - void aboutToPropagate(SyncFileItemVector &); + void aboutToPropagate(OCC::SyncFileItemVector &); // after each item completed by a job (successful or not) - void itemCompleted(const SyncFileItemPtr &); + void itemCompleted(const OCC::SyncFileItemPtr &); - void transmissionProgress(const ProgressInfo &progress); + void transmissionProgress(const OCC::ProgressInfo &progress); /// We've produced a new sync error of a type. - void syncError(const QString &message, ErrorCategory category = ErrorCategory::Normal); + void syncError(const QString &message, OCC::ErrorCategory category = OCC::ErrorCategory::Normal); - void addErrorToGui(SyncFileItem::Status status, const QString &errorMessage, const QString &subject); + void addErrorToGui(OCC::SyncFileItem::Status status, const QString &errorMessage, const QString &subject); void finished(bool success); void started(); @@ -170,7 +170,7 @@ signals: * This usually happen when the server was reset or something. * Set *cancel to true in a slot connected from this signal to abort the sync. */ - void aboutToRemoveAllFiles(SyncFileItem::Direction direction, std::function f); + void aboutToRemoveAllFiles(OCC::SyncFileItem::Direction direction, std::function f); // A new folder was discovered and was not synced because of the confirmation feature void newBigFolder(const QString &folder, bool isExternal); @@ -186,7 +186,7 @@ private slots: void slotRootEtagReceived(const QByteArray &, const QDateTime &time); /** When the discovery phase discovers an item */ - void slotItemDiscovered(const SyncFileItemPtr &item); + void slotItemDiscovered(const OCC::SyncFileItemPtr &item); /** Called when a SyncFileItem gets accepted for a sync. * @@ -194,12 +194,12 @@ private slots: * can also be called via the propagator for items that are * created during propagation. */ - void slotNewItem(const SyncFileItemPtr &item); + void slotNewItem(const OCC::SyncFileItemPtr &item); - void slotItemCompleted(const SyncFileItemPtr &item); + void slotItemCompleted(const OCC::SyncFileItemPtr &item); void slotDiscoveryFinished(); void slotPropagationFinished(bool success); - void slotProgress(const SyncFileItem &item, qint64 curent); + void slotProgress(const OCC::SyncFileItem &item, qint64 curent); void slotCleanPollsJobAborted(const QString &error); /** Records that a file was touched by a job. */ diff --git a/src/libsync/syncfilestatustracker.h b/src/libsync/syncfilestatustracker.h index bd5d73e04..83f2e459a 100644 --- a/src/libsync/syncfilestatustracker.h +++ b/src/libsync/syncfilestatustracker.h @@ -44,11 +44,11 @@ public slots: void slotAddSilentlyExcluded(const QString &folderPath); signals: - void fileStatusChanged(const QString &systemFileName, SyncFileStatus fileStatus); + void fileStatusChanged(const QString &systemFileName, OCC::SyncFileStatus fileStatus); private slots: - void slotAboutToPropagate(SyncFileItemVector &items); - void slotItemCompleted(const SyncFileItemPtr &item); + void slotAboutToPropagate(OCC::SyncFileItemVector &items); + void slotItemCompleted(const OCC::SyncFileItemPtr &item); void slotSyncFinished(); void slotSyncEngineRunningChanged(); diff --git a/src/libsync/userstatusconnector.h b/src/libsync/userstatusconnector.h index a15e282c4..1af208ea0 100644 --- a/src/libsync/userstatusconnector.h +++ b/src/libsync/userstatusconnector.h @@ -128,12 +128,12 @@ public: [[nodiscard]] virtual UserStatus userStatus() const = 0; signals: - void userStatusFetched(const UserStatus &userStatus); - void predefinedStatusesFetched(const QVector &statuses); + void userStatusFetched(const OCC::UserStatus &userStatus); + void predefinedStatusesFetched(const QVector &statuses); void userStatusSet(); void serverUserStatusChanged(); void messageCleared(); - void error(Error error); + void error(OCC::UserStatusConnector::Error error); }; } diff --git a/src/libsync/vfs/cfapi/vfs_cfapi.h b/src/libsync/vfs/cfapi/vfs_cfapi.h index 23053415a..3803bf148 100644 --- a/src/libsync/vfs/cfapi/vfs_cfapi.h +++ b/src/libsync/vfs/cfapi/vfs_cfapi.h @@ -61,7 +61,7 @@ public: public slots: void requestHydration(const QString &requestId, const QString &path); - void fileStatusChanged(const QString &systemFileName, SyncFileStatus fileStatus) override; + void fileStatusChanged(const QString &systemFileName, OCC::SyncFileStatus fileStatus) override; signals: void hydrationRequestReady(const QString &requestId); diff --git a/src/libsync/vfs/suffix/vfs_suffix.h b/src/libsync/vfs/suffix/vfs_suffix.h index 67797b13a..66b8f74cb 100644 --- a/src/libsync/vfs/suffix/vfs_suffix.h +++ b/src/libsync/vfs/suffix/vfs_suffix.h @@ -55,7 +55,7 @@ public: AvailabilityResult availability(const QString &folderPath) override; public slots: - void fileStatusChanged(const QString &, SyncFileStatus) override {} + void fileStatusChanged(const QString &, OCC::SyncFileStatus) override {} protected: void startImpl(const VfsSetupParams ¶ms) override; diff --git a/src/libsync/vfs/xattr/vfs_xattr.h b/src/libsync/vfs/xattr/vfs_xattr.h index bdf44dff6..118d4d286 100644 --- a/src/libsync/vfs/xattr/vfs_xattr.h +++ b/src/libsync/vfs/xattr/vfs_xattr.h @@ -53,7 +53,7 @@ public: AvailabilityResult availability(const QString &folderPath) override; public slots: - void fileStatusChanged(const QString &systemFileName, SyncFileStatus fileStatus) override; + void fileStatusChanged(const QString &systemFileName, OCC::SyncFileStatus fileStatus) override; protected: void startImpl(const VfsSetupParams ¶ms) override; diff --git a/test/syncenginetestutils.cpp b/test/syncenginetestutils.cpp index 72a08a95b..e14654060 100644 --- a/test/syncenginetestutils.cpp +++ b/test/syncenginetestutils.cpp @@ -1152,13 +1152,13 @@ void FakeFolder::scheduleSync() void FakeFolder::execUntilBeforePropagation() { - QSignalSpy spy(_syncEngine.get(), SIGNAL(aboutToPropagate(SyncFileItemVector &))); + QSignalSpy spy(_syncEngine.get(), &OCC::SyncEngine::aboutToPropagate); QVERIFY(spy.wait()); } void FakeFolder::execUntilItemCompleted(const QString &relativePath) { - QSignalSpy spy(_syncEngine.get(), SIGNAL(itemCompleted(const SyncFileItemPtr &))); + QSignalSpy spy(_syncEngine.get(), &OCC::SyncEngine::itemCompleted); QElapsedTimer t; t.start(); while (t.elapsed() < 5000) { diff --git a/test/testpermissions.cpp b/test/testpermissions.cpp index 373b66ade..f20409e7f 100644 --- a/test/testpermissions.cpp +++ b/test/testpermissions.cpp @@ -336,7 +336,7 @@ private slots: QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); } - static void setAllPerm(FileInfo *fi, RemotePermissions perm) + static void setAllPerm(FileInfo *fi, OCC::RemotePermissions perm) { fi->permissions = perm; for (auto &subFi : fi->children) diff --git a/test/testsyncfileitem.cpp b/test/testsyncfileitem.cpp index 8b4732f70..ad2465729 100644 --- a/test/testsyncfileitem.cpp +++ b/test/testsyncfileitem.cpp @@ -21,7 +21,7 @@ private slots: void cleanupTestCase() { } - SyncFileItem createItem( const QString& file ) { + OCC::SyncFileItem createItem( const QString& file ) { SyncFileItem i; i._file = file; return i;