summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-08-07 17:02:49 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-09 21:25:24 +0200
commit73251f22f337c27ffaf0353fed7985cbaeae0bdb (patch)
treefcfe9a959931956fdb253a9576272db5c67c31fd /tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
parent652d51eda6eaf8a06268e4e4cdf078e8771ad6ab (diff)
Add a Qt-API style QStandardPaths::setTestModeEnabled
QStandardPaths::enableTestMode has a verb in the imperative ("enable") as the core word in the name. That indicates an action. The function should not have had a parameter. Instead, add a Qt-style setXXXEnabled function. [ChangeLog][QtCore][QStandardPaths] QStandardPaths::enableTestMode is deprecated and is replaced by QStandardPaths::setTestModeEnabled. Change-Id: Ib26ad72d7c635890d2cb22ae9d44cbda08a6f17c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
Diffstat (limited to 'tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp')
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index f94c8eac4f..501dde1ba5 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -166,7 +166,7 @@ void tst_qstandardpaths::testCustomLocations()
void tst_qstandardpaths::enableTestMode()
{
QVERIFY(!QStandardPaths::isTestModeEnabled());
- QStandardPaths::enableTestMode(true);
+ QStandardPaths::setTestModeEnabled(true);
QVERIFY(QStandardPaths::isTestModeEnabled());
#ifdef Q_XDG_PLATFORM
@@ -204,7 +204,7 @@ void tst_qstandardpaths::enableTestMode()
// On Windows, what should "Program Files" become, in test mode?
//testLocations.insert(QStandardPaths::ApplicationsLocation, QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation));
- QStandardPaths::enableTestMode(false);
+ QStandardPaths::setTestModeEnabled(false);
for (LocationHash::const_iterator it = testLocations.constBegin(); it != testLocations.constEnd(); ++it)
QVERIFY2(QStandardPaths::writableLocation(it.key()) != it.value(), qPrintable(it.value()));