Skip to content

Commit 84e7da5

Browse files
committed
Ifdef all mentions of navigationpanehelper out of non-Windows builds
Signed-off-by: Claudio Cambra <[email protected]>
1 parent 6848c8a commit 84e7da5

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

src/gui/accountsettings.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,11 @@ void AccountSettings::slotFolderWizardAccepted()
747747
*/
748748
definition.ignoreHiddenFiles = folderMan->ignoreHiddenFiles();
749749

750+
#ifdef Q_OS_WIN
750751
if (folderMan->navigationPaneHelper().showInExplorerNavigationPane()) {
751752
definition.navigationPaneClsid = QUuid::createUuid();
752753
}
754+
#endif
753755

754756
const auto selectiveSyncBlackList = folderWizard->property("selectiveSyncBlackList").toStringList();
755757

@@ -846,8 +848,10 @@ void AccountSettings::slotEnableVfsCurrentFolder()
846848
return;
847849
}
848850

851+
#ifdef Q_OS_WIN
849852
// we might need to add or remove the panel entry as cfapi brings this feature out of the box
850853
FolderMan::instance()->navigationPaneHelper().scheduleUpdateCloudStorageRegistry();
854+
#endif
851855

852856
// It is unsafe to switch on vfs while a sync is running - wait if necessary.
853857
const auto connection = std::make_shared<QMetaObject::Connection>();
@@ -923,8 +927,10 @@ void AccountSettings::slotDisableVfsCurrentFolder()
923927
return;
924928
}
925929

930+
#ifdef Q_OS_WIN
926931
// we might need to add or remove the panel entry as cfapi brings this feature out of the box
927932
FolderMan::instance()->navigationPaneHelper().scheduleUpdateCloudStorageRegistry();
933+
#endif
928934

929935
// It is unsafe to switch off vfs while a sync is running - wait if necessary.
930936
const auto connection = std::make_shared<QMetaObject::Connection>();

src/gui/folderman.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ class FolderMan : public QObject
137137
static QString unescapeAlias(const QString &);
138138

139139
SocketApi *socketApi();
140+
141+
#ifdef Q_OS_WIN
140142
NavigationPaneHelper &navigationPaneHelper() { return _navigationPaneHelper; }
143+
#endif
141144

142145
/**
143146
* Check if @a path is a valid path for a new folder considering the already sync'ed items.

src/gui/generalsettings.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,11 @@ void GeneralSettings::slotShowInExplorerNavigationPane(bool checked)
453453
{
454454
ConfigFile cfgFile;
455455
cfgFile.setShowInExplorerNavigationPane(checked);
456+
457+
#ifdef Q_OS_WIN
456458
// Now update the registry with the change.
457459
FolderMan::instance()->navigationPaneHelper().setShowInExplorerNavigationPane(checked);
460+
#endif
458461
}
459462

460463
void GeneralSettings::slotIgnoreFilesEditor()

src/gui/owncloudsetupwizard.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,12 @@ void OwncloudSetupWizard::slotAssistantFinished(int result)
662662
if (_ocWizard->useVirtualFileSync()) {
663663
folderDefinition.virtualFilesMode = bestAvailableVfsMode();
664664
}
665-
if (folderMan->navigationPaneHelper().showInExplorerNavigationPane())
665+
666+
#ifdef Q_OS_WIN
667+
if (folderMan->navigationPaneHelper().showInExplorerNavigationPane()) {
666668
folderDefinition.navigationPaneClsid = QUuid::createUuid();
669+
}
670+
#endif
667671

668672
auto f = folderMan->addFolder(account, folderDefinition);
669673
if (f) {

0 commit comments

Comments
 (0)