summaryrefslogtreecommitdiff
path: root/tests/auto/qsettings/tst_qsettings.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-24 16:03:55 +0200
committeraxis <qt-info@nokia.com>2009-04-27 09:09:01 +0200
commite74c8dc65e2feffb9a55d00aee5ca634fba41df8 (patch)
tree3a131f9235fb6a455793178d8313655e4fd0036e /tests/auto/qsettings/tst_qsettings.cpp
parent8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (diff)
parent211bea9838bcc2acd7f54b65468fe1be2d81b1e0 (diff)
downloadqt4-tools-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.gz
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Configure.exe recompiled with MSVC6. Conflicts: configure.exe examples/network/network.pro src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qfilesystemmodel_p.h src/gui/kernel/qapplication.cpp tests/auto/_Categories/qmake.txt tests/auto/qfile/test/test.pro tests/auto/qfile/tst_qfile.cpp tests/auto/qlibrary/tst_qlibrary.cpp tests/auto/qline/tst_qline.cpp tests/auto/qstyle/tst_qstyle.cpp tests/auto/qtextstream/tst_qtextstream.cpp tests/auto/qtranslator/qtranslator.pro tests/auto/qwaitcondition/tst_qwaitcondition.cpp translations/qt_ja_JP.ts
Diffstat (limited to 'tests/auto/qsettings/tst_qsettings.cpp')
-rw-r--r--tests/auto/qsettings/tst_qsettings.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/auto/qsettings/tst_qsettings.cpp b/tests/auto/qsettings/tst_qsettings.cpp
index cb49d17a13..bc2416adce 100644
--- a/tests/auto/qsettings/tst_qsettings.cpp
+++ b/tests/auto/qsettings/tst_qsettings.cpp
@@ -242,7 +242,6 @@ static QString settingsPath(const char *path = "")
return QDir::toNativeSeparators(tempPath + "/tst_QSettings/" + QLatin1String(path));
}
-#if QT_VERSION >= 0x040100
static bool readCustom1File(QIODevice &device, QSettings::SettingsMap &map)
{
QDataStream in(&device);
@@ -299,7 +298,6 @@ static bool writeCustom3File(QIODevice &device, const QSettings::SettingsMap &ma
out << "OK";
return true;
}
-#endif
static void populateWithFormats()
{
@@ -307,15 +305,12 @@ static void populateWithFormats()
QTest::newRow("native") << QSettings::NativeFormat;
QTest::newRow("ini") << QSettings::IniFormat;
-#if QT_VERSION >= 0x040100
QTest::newRow("custom1") << QSettings::CustomFormat1;
QTest::newRow("custom2") << QSettings::CustomFormat2;
-#endif
}
tst_QSettings::tst_QSettings()
{
-#if QT_VERSION >= 0x040100
QSettings::Format custom1 = QSettings::registerFormat("custom1", readCustom1File, writeCustom1File);
QSettings::Format custom2 = QSettings::registerFormat("custom2", readCustom2File, writeCustom2File
#ifndef QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
@@ -324,7 +319,6 @@ tst_QSettings::tst_QSettings()
);
QVERIFY(custom1 == QSettings::CustomFormat1);
QVERIFY(custom2 == QSettings::CustomFormat2);
-#endif
}
void tst_QSettings::init()
@@ -1144,9 +1138,9 @@ void tst_QSettings::testVariantTypes()
l4 << QVariant(m2) << QVariant(l2) << QVariant(l3);
testVal("key13", l4, QVariantList, List);
- // With Qt 4.2 we store key sequences as strings instead of binary variant blob, for improved
+ // We store key sequences as strings instead of binary variant blob, for improved
// readability in the resulting format.
- if (format >= QSettings::InvalidFormat || QT_VERSION < 0x040200) {
+ if (format >= QSettings::InvalidFormat) {
testVal("keysequence", QKeySequence(Qt::ControlModifier + Qt::Key_F1), QKeySequence, KeySequence);
} else {
testVal("keysequence", QKeySequence(Qt::ControlModifier + Qt::Key_F1), QString, String);
@@ -2643,14 +2637,12 @@ void tst_QSettings::testCaseSensitivity()
case QSettings::IniFormat:
cs = false;
break;
-#if QT_VERSION >= 0x040100
case QSettings::CustomFormat1:
cs = true;
break;
case QSettings::CustomFormat2:
cs = false;
break;
-#endif
default:
;
}
@@ -3549,7 +3541,6 @@ void tst_QSettings::allKeys()
}
}
-#if QT_VERSION >= 0x040100
void tst_QSettings::registerFormat()
{
QSettings settings1(QSettings::IniFormat, QSettings::UserScope, "software.org", "KillerAPP");
@@ -3647,7 +3638,6 @@ void tst_QSettings::setPath()
TEST_PATH(i == 0, "custom2", CustomFormat2, SystemScope, "iota")
}
}
-#endif
void tst_QSettings::setDefaultFormat()
{