@@ -90,6 +90,7 @@ void NavigationPaneHelper::updateCloudStorageRegistry()
9090 // If it already exists, unmark it for removal, this is a valid sync root.
9191 entriesToRemove.removeOne (folder->navigationPaneClsid ());
9292
93+ #ifdef Q_OS_WIN
9394 QString clsidStr = folder->navigationPaneClsid ().toString ();
9495 QString clsidPath = QString () % R"( Software\Classes\CLSID\)" % clsidStr;
9596 QString clsidPathWow64 = QString () % R"( Software\Classes\Wow6432Node\CLSID\)" % clsidStr;
@@ -103,7 +104,7 @@ void NavigationPaneHelper::updateCloudStorageRegistry()
103104 QString targetFolderPath = QDir::toNativeSeparators (folder->cleanPath ());
104105
105106 qCInfo (lcNavPane) << " Explorer Cloud storage provider: saving path" << targetFolderPath << " to CLSID" << clsidStr;
106- # ifdef Q_OS_WIN
107+
107108 // Steps taken from: https://msdn.microsoft.com/en-us/library/windows/desktop/dn889934%28v=vs.85%29.aspx
108109 // Step 1: Add your CLSID and name your extension
109110 Utility::registrySetKeyValue (HKEY_CURRENT_USER, clsidPath, QString (), REG_SZ, title);
@@ -155,6 +156,7 @@ void NavigationPaneHelper::updateCloudStorageRegistry()
155156 }
156157 }
157158
159+ #ifdef Q_OS_WIN
158160 // Then remove anything that isn't in our folder list anymore.
159161 foreach (auto &clsid, entriesToRemove) {
160162 QString clsidStr = clsid.toString ();
@@ -163,13 +165,13 @@ void NavigationPaneHelper::updateCloudStorageRegistry()
163165 QString namespacePath = QString () % R"( Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\)" % clsidStr;
164166
165167 qCInfo (lcNavPane) << " Explorer Cloud storage provider: now unused, removing own CLSID" << clsidStr;
166- # ifdef Q_OS_WIN
168+
167169 Utility::registryDeleteKeyTree (HKEY_CURRENT_USER, clsidPath);
168170 Utility::registryDeleteKeyTree (HKEY_CURRENT_USER, clsidPathWow64);
169171 Utility::registryDeleteKeyTree (HKEY_CURRENT_USER, namespacePath);
170172 Utility::registryDeleteKeyValue (HKEY_CURRENT_USER, QStringLiteral (" Software\\ Microsoft\\ Windows\\ CurrentVersion\\ Explorer\\ HideDesktopIcons\\ NewStartPanel" ), clsidStr);
171- #endif
172173 }
174+ #endif
173175}
174176
175177} // namespace OCC
0 commit comments