diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-10-26 13:13:03 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-02 15:18:44 +0100 |
commit | a025a2fcfa70e5db99411e2ec73c0a5141619ff5 (patch) | |
tree | 4afca3b2f038b174910d632c8563be343218b14d /src/corelib/io/qstandardpaths_win.cpp | |
parent | 300534fc214f2547a63594ce0891e9a54c8f33ca (diff) |
Allow QStandardPaths (Mac, Windows, Unix) to be bootstrapped
This allows using QStandardPaths in one of the bootstrapped tools, if
required for a future need.
The Blackberry version appears to be usable in bootstrapped mode
already.
Change-Id: Ia4e9b9564395d2e151f8ac229ac2a2aa2982e92f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/corelib/io/qstandardpaths_win.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_win.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index d7d73eecfc..bcd5097b14 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -44,7 +44,10 @@ #include <qdir.h> #include <private/qsystemlibrary_p.h> #include <qstringlist.h> + +#ifndef QT_BOOTSTRAPPED #include <qcoreapplication.h> +#endif #include <qt_windows.h> #include <shlobj.h> @@ -107,12 +110,14 @@ QString QStandardPaths::writableLocation(StandardLocation type) result = convertCharArray(path); if (isTestModeEnabled()) result += QLatin1String("/qttest"); +#ifndef QT_BOOTSTRAPPED if (type != GenericDataLocation) { if (!QCoreApplication::organizationName().isEmpty()) result += QLatin1Char('/') + QCoreApplication::organizationName(); if (!QCoreApplication::applicationName().isEmpty()) result += QLatin1Char('/') + QCoreApplication::applicationName(); } +#endif break; case DesktopLocation: @@ -189,10 +194,12 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) if (SHGetSpecialFolderPath(0, path, CSIDL_COMMON_APPDATA, FALSE)) { QString result = convertCharArray(path); if (type != GenericDataLocation) { +#ifndef QT_BOOTSTRAPPED if (!QCoreApplication::organizationName().isEmpty()) result += QLatin1Char('/') + QCoreApplication::organizationName(); if (!QCoreApplication::applicationName().isEmpty()) result += QLatin1Char('/') + QCoreApplication::applicationName(); +#endif } dirs.append(result); } |