diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-09-27 19:53:01 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-29 06:41:42 +0200 |
commit | 95cebd34ebc5b4d39b11dc91610309a35e488663 (patch) | |
tree | 90ceffef5acea093dd2b8f8f7e8c30593023b85a /tests/auto/corelib/io/qsettings/tst_qsettings.cpp | |
parent | ab061e3e436fab35eac8666f3e950e98f66c4d3e (diff) |
Remove Symbian-specific code from tests.
Symbian is not a supported platform for Qt5, so this code is no longer
required.
Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa
Reviewed-on: http://codereview.qt-project.org/5657
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/io/qsettings/tst_qsettings.cpp')
-rw-r--r-- | tests/auto/corelib/io/qsettings/tst_qsettings.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp index e3b96e82bb..301f40b152 100644 --- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp +++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp @@ -53,9 +53,7 @@ #include <QtGui/QKeySequence> #include "../../../../shared/util.h" -#if !defined(Q_OS_SYMBIAN) -# include <cctype> -#endif +#include <cctype> #if defined(Q_OS_WIN) && defined(Q_CC_GNU) // need for unlink on mingw #include <io.h> @@ -128,7 +126,7 @@ private slots: void setPath(); void setDefaultFormat(); void dontCreateNeedlessPaths(); -#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) void dontReorderIniKeysNeedlessly(); #endif #if defined(Q_OS_WIN) @@ -177,7 +175,7 @@ void tst_QSettings::getSetCheck() Q_DECLARE_METATYPE(QSettings::Format) -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WINCE) static void removePath(const QString& _path) { QString path = _path; @@ -324,11 +322,9 @@ void tst_QSettings::init() QSettings(QSettings::SystemScope, "software.org").clear(); QSettings(QSettings::UserScope, "other.software.org").clear(); QSettings(QSettings::SystemScope, "other.software.org").clear(); -#elif defined(Q_OS_SYMBIAN) - removePath(settingsPath()); #endif -#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) system(QString("chmod -R u+rw %1 2> /dev/null").arg(settingsPath()).toLatin1()); system(QString("rm -fr %1 2> /dev/null").arg(settingsPath()).toLatin1()); #endif @@ -510,13 +506,13 @@ void tst_QSettings::ctor() */ QSettings settings5(format, QSettings::UserScope, "SoftWare.ORG", "killerApp"); if (format == QSettings::NativeFormat) { -#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) QCOMPARE(settings5.value("key 1").toString(), QString("gurgle")); #else QVERIFY(!settings5.contains("key 1")); #endif } else { -#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) QCOMPARE(settings5.value("key 1").toString(), QString("gurgle")); #else QVERIFY(!settings5.contains("key 1")); @@ -686,8 +682,6 @@ void tst_QSettings::testErrorHandling() #ifdef QT_BUILD_INTERNAL #ifdef Q_OS_WIN QSKIP("Windows doesn't support most file modes, including read-only directories, so this test is moot.", SkipAll); -#elif defined(Q_OS_SYMBIAN) - QSKIP("Symbian/Open C doesn't support execute or write only file modes, or directory permissions, so this test is mostly moot.", SkipAll); #elif defined(Q_OS_UNIX) if (::getuid() == 0) QSKIP("Running this test as root doesn't work, since file perms do not bother him", SkipAll); @@ -1471,7 +1465,7 @@ void tst_QSettings::sync() // Now "some other app" will change other.software.org.ini QString userConfDir = settingsPath("__user__") + QDir::separator(); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) unlink((userConfDir + "other.software.org.ini").toLatin1()); rename((userConfDir + "software.org.ini").toLatin1(), (userConfDir + "other.software.org.ini").toLatin1()); @@ -3005,7 +2999,7 @@ void tst_QSettings::dontCreateNeedlessPaths() QVERIFY(!fileInfo.dir().exists()); } -#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) void tst_QSettings::dontReorderIniKeysNeedlessly() { #ifdef QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER |