Ifdef all mentions of navigationpanehelper out of non-Windows builds

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-12-19 15:54:55 +01:00 committed by Jyrki Gadinger
parent 2147a6c0ad
commit 62e468fdbc
5 changed files with 19 additions and 1 deletions

View File

@ -839,9 +839,11 @@ void AccountSettings::slotFolderWizardAccepted()
*/
definition.ignoreHiddenFiles = folderMan->ignoreHiddenFiles();
#ifdef Q_OS_WIN
if (folderMan->navigationPaneHelper().showInExplorerNavigationPane()) {
definition.navigationPaneClsid = QUuid::createUuid();
}
#endif
const auto selectiveSyncBlackList = folderWizard->property("selectiveSyncBlackList").toStringList();
@ -937,8 +939,10 @@ void AccountSettings::slotEnableVfsCurrentFolder()
return;
}
#ifdef Q_OS_WIN
// we might need to add or remove the panel entry as cfapi brings this feature out of the box
FolderMan::instance()->navigationPaneHelper().scheduleUpdateCloudStorageRegistry();
#endif
// It is unsafe to switch on vfs while a sync is running - wait if necessary.
const auto connection = std::make_shared<QMetaObject::Connection>();
@ -1014,8 +1018,10 @@ void AccountSettings::slotDisableVfsCurrentFolder()
return;
}
#ifdef Q_OS_WIN
// we might need to add or remove the panel entry as cfapi brings this feature out of the box
FolderMan::instance()->navigationPaneHelper().scheduleUpdateCloudStorageRegistry();
#endif
// It is unsafe to switch off vfs while a sync is running - wait if necessary.
const auto connection = std::make_shared<QMetaObject::Connection>();

View File

@ -176,9 +176,11 @@ void AccountSetupFromCommandLineJob::setupLocalSyncFolder(AccountState *accountS
definition.ignoreHiddenFiles = folderMan->ignoreHiddenFiles();
definition.alias = folderMan->map().size() > 0 ? QString::number(folderMan->map().size()) : QString::number(0);
#ifdef Q_OS_WIN
if (folderMan->navigationPaneHelper().showInExplorerNavigationPane()) {
definition.navigationPaneClsid = QUuid::createUuid();
}
#endif
folderMan->setSyncEnabled(false);

View File

@ -149,7 +149,10 @@ public:
static QString unescapeAlias(const QString &);
SocketApi *socketApi();
#ifdef Q_OS_WIN
NavigationPaneHelper &navigationPaneHelper() { return _navigationPaneHelper; }
#endif
/**
* Check if @a path is a valid path for a new folder considering the already sync'ed items.

View File

@ -580,8 +580,11 @@ void GeneralSettings::slotShowInExplorerNavigationPane(bool checked)
{
ConfigFile cfgFile;
cfgFile.setShowInExplorerNavigationPane(checked);
#ifdef Q_OS_WIN
// Now update the registry with the change.
FolderMan::instance()->navigationPaneHelper().setShowInExplorerNavigationPane(checked);
#endif
}
void GeneralSettings::slotIgnoreFilesEditor()

View File

@ -722,8 +722,12 @@ void OwncloudSetupWizard::slotAssistantFinished(int result)
folderDefinition.virtualFilesMode = bestAvailableVfsMode();
}
#endif
if (folderMan->navigationPaneHelper().showInExplorerNavigationPane())
#ifdef Q_OS_WIN
if (folderMan->navigationPaneHelper().showInExplorerNavigationPane()) {
folderDefinition.navigationPaneClsid = QUuid::createUuid();
}
#endif
auto f = folderMan->addFolder(account, folderDefinition);
if (f) {