[Kst] branches/work/kst/kst1kde4/kst/src/libkstapp
Zongyi Zhang
freebody.kst at gmail.com
Tue Apr 13 23:51:26 CEST 2010
SVN commit 1114550 by zhang:
replace kconfig with qsettings
M +6 -6 extensionmgr.cpp
M +2 -2 kstviewwindow.cpp
M +3 -3 kstviewwindow.h
--- branches/work/kst/kst1kde4/kst/src/libkstapp/extensionmgr.cpp #1114549:1114550
@@ -35,11 +35,11 @@
void ExtensionMgr::save() {
QMap<QString,bool>::const_iterator i;
-// xxx KConfig cfg("kstextensionsrc", false, false);
+// QSettings cfg("kstextensionsrc", false, false);
QStringList disabled;
QStringList enabled;
-// xxx cfg.setGroup("Extensions");
+ cfg.beginGroup("Extensions");
for (i = _extensions.begin(); i != _extensions.end(); ++i) {
if (*i) {
@@ -48,10 +48,10 @@
disabled += i.key();
}
}
-/* xxx
- cfg.writeEntry("Disabled", disabled);
- cfg.writeEntry("Enabled", enabled);
-*/
+
+ cfg.setValue("Disabled", disabled);
+ cfg.setValue("Enabled", enabled);
+
}
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstviewwindow.cpp #1114549:1114550
@@ -124,12 +124,12 @@
}
-void KstViewWindow::saveProperties(KConfig *config) {
+void KstViewWindow::saveProperties(QSettings *config) {
Q_UNUSED(config)
}
-void KstViewWindow::readProperties(KConfig* config) {
+void KstViewWindow::readProperties(QSettings* config) {
Q_UNUSED(config)
}
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstviewwindow.h #1114549:1114550
@@ -54,13 +54,13 @@
* end to the session config file, including saving the currently
* opened file by a temporary filename provided by KApplication.
* @see KMainWindow#saveProperties */
- virtual void saveProperties(KConfig *cfg);
+ virtual void saveProperties(QSettings *cfg);
/** reads the session config file and restores the application's
* state including the last opened files and documents by reading
* the temporary files saved by saveProperties()
* @see KMainWindow#readProperties */
- virtual void readProperties(KConfig *cfg);
+ virtual void readProperties(QSettings *cfg);
/**
* Ignores the event and calls KMdiMainFrm::childWindowCloseRequest instead.
@@ -102,7 +102,7 @@
void commonConstructor();
/** the configuration object of the application */
- KConfig *config;
+ QSettings *config;
KstTopLevelViewPtr _view;
};
More information about the Kst
mailing list