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.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.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index 37950db018..48664b5012 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -333,6 +333,12 @@ QString QStandardPaths::displayName(StandardLocation type) On Windows, everything goes to a "qttest" directory under Application Data. */ +static bool qsp_testMode = false; + +void QStandardPaths::enableTestMode(bool testMode) +{ + qsp_testMode = testMode; +} /*! \fn void QStandardPaths::isTestModeEnabled() @@ -342,6 +348,12 @@ QString QStandardPaths::displayName(StandardLocation type) Returns true if test mode is enabled in QStandardPaths; otherwise returns false. */ +bool QStandardPaths::isTestModeEnabled() +{ + return qsp_testMode; +} + + QT_END_NAMESPACE #endif // QT_NO_STANDARDPATHS |