author | zautrix <zautrix> | 2005-02-03 02:19:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-03 02:19:50 (UTC) |
commit | e0fce8c0f108e054cb6e4e4767affd04b398da45 (patch) (side-by-side diff) | |
tree | 17414f89b5042809bab5b738dfcc37b4375b3b6d /microkde | |
parent | 7e3c508b7ee613c534c2bf0cacf38f96efaef613 (diff) | |
download | kdepimpi-e0fce8c0f108e054cb6e4e4767affd04b398da45.zip kdepimpi-e0fce8c0f108e054cb6e4e4767affd04b398da45.tar.gz kdepimpi-e0fce8c0f108e054cb6e4e4767affd04b398da45.tar.bz2 |
fixxx
-rw-r--r-- | microkde/kdecore/kprefs.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/microkde/kdecore/kprefs.cpp b/microkde/kdecore/kprefs.cpp index 71050e7..0220a34 100644 --- a/microkde/kdecore/kprefs.cpp +++ b/microkde/kdecore/kprefs.cpp @@ -352,96 +352,97 @@ void KPrefsItemStringList::setDefault() void KPrefsItemStringList::writeConfig(KConfig *config) { config->setGroup(mGroup); config->writeEntry(mName,*mReference); } void KPrefsItemStringList::readConfig(KConfig *config) { config->setGroup(mGroup); *mReference = config->readListEntry(mName); } KPrefsItemIntList::KPrefsItemIntList(const QString &group,const QString &name, QValueList<int> *reference,const QValueList<int> &defaultValue) : KPrefsItem(group,name) { mReference = reference; mDefault = defaultValue; } void KPrefsItemIntList::setDefault() { *mReference = mDefault; } void KPrefsItemIntList::writeConfig(KConfig *config) { config->setGroup(mGroup); config->writeEntry(mName,*mReference); } void KPrefsItemIntList::readConfig(KConfig *config) { config->setGroup(mGroup); *mReference = config->readIntListEntry(mName); } QString *KPrefs::mCurrentGroup = 0; KPrefs::KPrefs(const QString &configname) { if (!configname.isEmpty()) { //qDebug("KPrefs::KPrefs %s",configname.latin1() ); mConfig = new KConfig(locateLocal("config",configname)); } else { + qDebug("KPrefs::Global config "); mConfig = KGlobal::config(); } mItems.setAutoDelete(true); // Set default group if (mCurrentGroup == 0) mCurrentGroup = new QString("No Group"); } KPrefs::~KPrefs() { if (mConfig != KGlobal::config()) { delete mConfig; } } void KPrefs::setCurrentGroup(const QString &group) { if (mCurrentGroup) delete mCurrentGroup; mCurrentGroup = new QString(group); } KConfig *KPrefs::config() const { return mConfig; } void KPrefs::setDefaults() { KPrefsItem *item; for(item = mItems.first();item;item = mItems.next()) { item->setDefault(); } usrSetDefaults(); } void KPrefs::readConfig() { KPrefsItem *item; for(item = mItems.first();item;item = mItems.next()) { item->readConfig(mConfig); } usrReadConfig(); //qDebug("KPrefs::readConfig: %s", mConfig->getFileName().latin1()); } |