aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp
diff options
context:
space:
mode:
authorMatthew Dawson <matthew@mjdsystems.ca>2014-03-28 16:59:51 +0100
committerDavid Faure <faure@kde.org>2014-03-28 17:08:05 +0100
commit4846b50aea0bc2262238963a85ab3556c22412e4 (patch)
treed77772301de7a6ad0dcc4c160bfea526d29929ac /autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp
parente1ad9a6192d1e2be6fcb17c8a1e961104d921752 (diff)
downloadkconfig-4846b50aea0bc2262238963a85ab3556c22412e4.tar.gz
kconfig-4846b50aea0bc2262238963a85ab3556c22412e4.tar.bz2
Stop re-loading values inside KCoreConfigSkeleton::save().
The extra load of values in KCoreConfigSkeleton is not documented anywhere that it happens, and in normal circumstances re-loading new values isn't expecterd during a save operation. Update various mentions of readConfig/writeConfig to read/save. Update documentation to match the new names of functions. Rename writeConfig() to save() and usrWriteConfig() to usrSave() Rename functions to match the new naming conventions. Also create old deprecated instances of both functions to ensure that old code continues to operate correctly. Also make save() non-virtual, for the same reasons read() is now non-virtual. Rename usrReadConfig to usrRead, to be consistent with the new name for readConfig. Rename usrReadConfig to usrRead, and mark the former as deprecated. To maintain compatibility, usrRead still calls usrReadConfig in its default implementation. usrReadConfig remains empty. REVIEW: 117010
Diffstat (limited to 'autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp')
-rw-r--r--autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp b/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp
index 3017fe2f..e98c03a5 100644
--- a/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp
+++ b/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp
@@ -114,7 +114,7 @@ void KConfigCompiler_Test_Signals::testSetters()
// make sure we are in the default state
params.obj->setDefaults();
- params.obj->writeConfig();
+ params.obj->save();
QList<QVariant> args;
QSignalSpy spy(params.obj, signal);
@@ -127,8 +127,8 @@ void KConfigCompiler_Test_Signals::testSetters()
QVERIFY(changedValue != params.getter());
params.setter(changedValue);
QCOMPARE(params.getter(), changedValue);
- QCOMPARE(spy.count(), 0); //should have no change yet, only after writeConfig()
- params.obj->writeConfig();
+ QCOMPARE(spy.count(), 0); //should have no change yet, only after save()
+ params.obj->save();
QCOMPARE(spy.count(), 1);
args = spy.takeFirst();
QCOMPARE(args.size(), 1);
@@ -142,8 +142,8 @@ void KConfigCompiler_Test_Signals::testSetters()
QCOMPARE(params.getter(), params.defaultGetter());
QCOMPARE(params.getter(), defaultValue);
- QCOMPARE(spy.count(), 0); //should have no change yet, only after writeConfig()
- params.obj->writeConfig();
+ QCOMPARE(spy.count(), 0); //should have no change yet, only after save()
+ params.obj->save();
//TODO: This currently fails since setDefaults() does not yet cause emitting a signal
QCOMPARE(spy.count(), 1);
args = spy.takeFirst();
@@ -171,7 +171,7 @@ void KConfigCompiler_Test_Signals::testSetProperty()
const QString defaultValue = QStringLiteral("default");
const QString newValue = QStringLiteral("changed");
obj->setDefaults();
- obj->writeConfig();
+ obj->save();
KConfigSkeletonItem* item = obj->findItem(propertyName);
QVERIFY2(item, "Item must exist");
@@ -186,9 +186,9 @@ void KConfigCompiler_Test_Signals::testSetProperty()
QVERIFY(!item->isEqual(newValue));
item->setProperty(newValue); //change value now
- //should have no change yet, only after writeConfig()
+ //should have no change yet, only after save()
QCOMPARE(spy.count(), 0);
- obj->writeConfig();
+ obj->save();
//now check for the signal emissions
QCOMPARE(spy.count(), 1);
QList<QVariant> args = spy.takeFirst();
@@ -199,9 +199,9 @@ void KConfigCompiler_Test_Signals::testSetProperty()
QVERIFY(!item->isEqual(defaultValue));
item->setDefault();
QVERIFY(item->isEqual(defaultValue));
- //should have no change yet, only after writeConfig()
+ //should have no change yet, only after save()
QCOMPARE(spy.count(), 0);
- obj->writeConfig();
+ obj->save();
//now check for the signal emissions
QCOMPARE(spy.count(), 1);
args = spy.takeFirst();