From b72fd8482e9bfbf924fe05e6efdb58a6bb25b887 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 13 Mar 2012 15:18:48 +1000 Subject: Uncomment disabled code in QSettings autotest. The code in question was already commented out before the test was added to the Qt repository in 2006. After changing the code to use QFile::rename() for portability, the test appears to pass. Change-Id: I52a8578a47da419cabf5826b633cc4f2ac2c5218 Reviewed-by: Rohan McGovern --- tests/auto/corelib/io/qsettings/tst_qsettings.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp index d294eec248..dbb844d204 100644 --- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp +++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp @@ -1486,11 +1486,9 @@ void tst_QSettings::sync() settings1.sync(); QCOMPARE(settings1.allKeys().count(), 0); -/* - // Now "some other app" will change software.org.conf - unlink((userConfDir + "software.org.ini").toLatin1()); - rename((userConfDir + "other.software.org.ini").toLatin1(), - (userConfDir + "software.org.ini").toLatin1()); + // Now "some other app" will change software.org.ini + QVERIFY(QFile::rename((userConfDir + "other.software.org.ini").toLatin1(), + (userConfDir + "software.org.ini").toLatin1())); settings1.sync(); QCOMPARE(settings1.value("alpha/beta/geometry").toInt(), -7); @@ -1505,7 +1503,6 @@ void tst_QSettings::sync() QCOMPARE(settings1.value("moo/beta/geometry/height").toInt(), 4); QCOMPARE(settings1.value("moo/gamma/splitter").toInt(), 5); QCOMPARE(settings1.allKeys().count(), 11); -*/ } void tst_QSettings::setFallbacksEnabled_data() -- cgit v1.2.3