From: Matthieu Gallien Date: Tue, 11 Oct 2022 20:13:50 +0000 (+0200) Subject: declare ErrorCategory enum class and declare its metatype X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~10^2~13^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=86c4ddb25cbc71da0fb6dbe2a05d7290261a4dc7;p=nextcloud-desktop.git declare ErrorCategory enum class and declare its metatype Signed-off-by: Matthieu Gallien --- diff --git a/src/common/pinstate.h b/src/common/pinstate.h index 106d9385d..7d4222a01 100644 --- a/src/common/pinstate.h +++ b/src/common/pinstate.h @@ -21,7 +21,6 @@ namespace OCC { -namespace PinStateEnums { OCSYNC_EXPORT Q_NAMESPACE /** Determines whether items should be available locally permanently or not @@ -126,8 +125,6 @@ enum class VfsItemAvailability { OnlineOnly = 4, }; Q_ENUM_NS(VfsItemAvailability) -} -using namespace PinStateEnums; } diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 75912f4db..684c05606 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1178,7 +1178,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo( // either correct availability, or a result with error if the folder is new or otherwise has no availability set yet const auto folderPlaceHolderAvailability = localEntry.isDirectory ? _discoveryData->_syncOptions._vfs->availability(path._local) : Vfs::AvailabilityResult(Vfs::AvailabilityError::NoSuchItem); - const auto folderPinState = localEntry.isDirectory ? _discoveryData->_syncOptions._vfs->pinState(path._local) : Optional(PinState::Unspecified); + const auto folderPinState = localEntry.isDirectory ? _discoveryData->_syncOptions._vfs->pinState(path._local) : Optional(PinState::Unspecified); if (!isFilePlaceHolder && !folderPlaceHolderAvailability.isValid() && !folderPinState.isValid()) { // not a file placeholder and not a synced folder placeholder (new local folder) diff --git a/src/libsync/progressdispatcher.h b/src/libsync/progressdispatcher.h index 4280edcd9..4724fb7e4 100644 --- a/src/libsync/progressdispatcher.h +++ b/src/libsync/progressdispatcher.h @@ -27,6 +27,8 @@ namespace OCC { +OCSYNC_EXPORT Q_NAMESPACE + /** * @brief The ProgressInfo class * @ingroup libsync @@ -252,6 +254,7 @@ enum class ErrorCategory { Normal, InsufficientRemoteStorage, }; +Q_ENUM_NS(OCC::ErrorCategory) /** * @file progressdispatcher.h diff --git a/src/libsync/vfs/cfapi/cfapiwrapper.cpp b/src/libsync/vfs/cfapi/cfapiwrapper.cpp index 059844395..8045c6148 100644 --- a/src/libsync/vfs/cfapi/cfapiwrapper.cpp +++ b/src/libsync/vfs/cfapi/cfapiwrapper.cpp @@ -355,7 +355,7 @@ OCC::CfApiWrapper::PlaceHolderInfo::PlaceHolderInfo(CF_PLACEHOLDER_BASIC_INFO *d { } -OCC::Optional OCC::CfApiWrapper::PlaceHolderInfo::pinState() const +OCC::Optional OCC::CfApiWrapper::PlaceHolderInfo::pinState() const { Q_ASSERT(_data); if (!_data) { @@ -682,7 +682,7 @@ OCC::CfApiWrapper::PlaceHolderInfo OCC::CfApiWrapper::findPlaceholderInfo(const } } -OCC::Result OCC::CfApiWrapper::setPinState(const QString &path, OCC::PinStateEnums::PinState state, SetPinRecurseMode mode) +OCC::Result OCC::CfApiWrapper::setPinState(const QString &path, OCC::PinState state, SetPinRecurseMode mode) { const auto cfState = pinStateToCfPinState(state); const auto flags = pinRecurseModeToCfSetPinFlags(mode);