diff options
Diffstat (limited to 'src/corelib/io/qstandardpaths_win.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_win.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index 200cf4c1b5..a0344a0206 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -68,21 +68,6 @@ QT_BEGIN_NAMESPACE -typedef BOOL (WINAPI*GetSpecialFolderPath)(HWND, LPWSTR, int, BOOL); -static GetSpecialFolderPath resolveGetSpecialFolderPath() -{ - static GetSpecialFolderPath gsfp = 0; - if (!gsfp) { -#ifndef Q_OS_WINCE - QSystemLibrary library(QLatin1String("shell32")); -#else - QSystemLibrary library(QLatin1String("coredll")); -#endif // Q_OS_WINCE - gsfp = (GetSpecialFolderPath)library.resolve("SHGetSpecialFolderPathW"); - } - return gsfp; -} - static QString convertCharArray(const wchar_t *path) { return QDir::fromNativeSeparators(QString::fromWCharArray(path)); @@ -92,10 +77,6 @@ QString QStandardPaths::writableLocation(StandardLocation type) { QString result; - static GetSpecialFolderPath SHGetSpecialFolderPath = resolveGetSpecialFolderPath(); - if (!SHGetSpecialFolderPath) - return QString(); - wchar_t path[MAX_PATH]; switch (type) { @@ -185,8 +166,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) // type-specific handling goes here #ifndef Q_OS_WINCE - static GetSpecialFolderPath SHGetSpecialFolderPath = resolveGetSpecialFolderPath(); - if (SHGetSpecialFolderPath) { + { wchar_t path[MAX_PATH]; switch (type) { case ConfigLocation: // same as DataLocation, on Windows (oversight, but too late to fix it) |