summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstandardpaths_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qstandardpaths_win.cpp')
-rw-r--r--src/corelib/io/qstandardpaths_win.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp
index 9e3cb9ab4d..9bd5a9e3b6 100644
--- a/src/corelib/io/qstandardpaths_win.cpp
+++ b/src/corelib/io/qstandardpaths_win.cpp
@@ -117,6 +117,7 @@ static inline void appendTestMode(QString &path)
// Map QStandardPaths::StandardLocation to CLSID of SHGetSpecialFolderPath()
static int writableSpecialFolderClsid(QStandardPaths::StandardLocation type)
{
+#ifndef Q_OS_WINCE
static const int clsids[] = {
CSIDL_DESKTOPDIRECTORY, // DesktopLocation
CSIDL_PERSONAL, // DocumentsLocation
@@ -136,6 +137,27 @@ static int writableSpecialFolderClsid(QStandardPaths::StandardLocation type)
CSIDL_APPDATA, // AppDataLocation ("Roaming" path)
CSIDL_LOCAL_APPDATA, // AppConfigLocation ("Local" path)
};
+#else // !Q_OS_WINCE
+ static const int clsids[] = {
+ CSIDL_DESKTOPDIRECTORY, // DesktopLocation
+ CSIDL_PERSONAL, // DocumentsLocation
+ CSIDL_FONTS, // FontsLocation
+ CSIDL_PROGRAMS, // ApplicationsLocation
+ CSIDL_MYMUSIC, // MusicLocation
+ CSIDL_MYVIDEO, // MoviesLocation
+ CSIDL_MYPICTURES, // PicturesLocation
+ -1, -1, // TempLocation/HomeLocation
+ CSIDL_APPDATA, // AppLocalDataLocation, AppLocalDataLocation = DataLocation
+ -1, // CacheLocation
+ CSIDL_APPDATA, // GenericDataLocation
+ -1, // RuntimeLocation
+ CSIDL_APPDATA, // ConfigLocation
+ -1, -1, // DownloadLocation/GenericCacheLocation
+ CSIDL_APPDATA, // GenericConfigLocation
+ CSIDL_APPDATA, // AppDataLocation
+ CSIDL_APPDATA, // AppConfigLocation
+ };
+#endif // Q_OS_WINCE
Q_STATIC_ASSERT(sizeof(clsids) / sizeof(clsids[0]) == size_t(QStandardPaths::AppConfigLocation + 1));
return size_t(type) < sizeof(clsids) / sizeof(clsids[0]) ? clsids[type] : -1;