diff options
author | David Faure <faure@kde.org> | 2012-08-08 17:56:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-09 13:48:16 +0200 |
commit | 977441f61cc42b7f29e48980577105323fbd3b47 (patch) | |
tree | cba6cd58b3bbda03de0266fe3f903dbaa0be5ac2 /src/corelib/io/qstandardpaths_win.cpp | |
parent | a23da5fd6bca918366cfe744270e590905e97412 (diff) |
Remove code duplication in QStandardPaths implementations
Using the new getter to access the "test mode" setting.
Change-Id: Id26a350cd3fab4bf2e5f58ba67bc7323f99c9cc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib/io/qstandardpaths_win.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_win.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index 245dbbfc40..f918e02880 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -85,18 +85,6 @@ static QString convertCharArray(const wchar_t *path) return QDir::fromNativeSeparators(QString::fromWCharArray(path)); } -static bool qsp_testMode = false; - -void QStandardPaths::enableTestMode(bool testMode) -{ - qsp_testMode = testMode; -} - -bool QStandardPaths::isTestModeEnabled() -{ - return qsp_testMode; -} - QString QStandardPaths::writableLocation(StandardLocation type) { QString result; @@ -117,7 +105,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) if (SHGetSpecialFolderPath(0, path, CSIDL_LOCAL_APPDATA, FALSE)) #endif result = convertCharArray(path); - if (qsp_testMode) + if (isTestModeEnabled()) result += QLatin1String("/qttest"); if (type != GenericDataLocation) { if (!QCoreApplication::organizationName().isEmpty()) |