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_mac.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_mac.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_mac.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/corelib/io/qstandardpaths_mac.cpp b/src/corelib/io/qstandardpaths_mac.cpp index 0f3a950e49..dfc802a78c 100644 --- a/src/corelib/io/qstandardpaths_mac.cpp +++ b/src/corelib/io/qstandardpaths_mac.cpp @@ -90,18 +90,6 @@ OSType translateLocation(QStandardPaths::StandardLocation type) } } -static bool qsp_testMode = false; - -void QStandardPaths::enableTestMode(bool testMode) -{ - qsp_testMode = testMode; -} - -bool QStandardPaths::isTestModeEnabled() -{ - return qsp_testMode; -} - /* Constructs a full unicode path from a FSRef. */ @@ -140,7 +128,7 @@ static QString macLocation(QStandardPaths::StandardLocation type, short domain) QString QStandardPaths::writableLocation(StandardLocation type) { - if (qsp_testMode) { + if (isTestModeEnabled()) { const QString qttestDir = QDir::homePath() + QLatin1String("/.qttest"); QString path; switch (type) { |