-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 | |||
@@ -376,48 +376,49 @@ void KPrefsItemIntList::setDefault() | |||
376 | *mReference = mDefault; | 376 | *mReference = mDefault; |
377 | } | 377 | } |
378 | 378 | ||
379 | void KPrefsItemIntList::writeConfig(KConfig *config) | 379 | void KPrefsItemIntList::writeConfig(KConfig *config) |
380 | { | 380 | { |
381 | config->setGroup(mGroup); | 381 | config->setGroup(mGroup); |
382 | config->writeEntry(mName,*mReference); | 382 | config->writeEntry(mName,*mReference); |
383 | } | 383 | } |
384 | 384 | ||
385 | void KPrefsItemIntList::readConfig(KConfig *config) | 385 | void KPrefsItemIntList::readConfig(KConfig *config) |
386 | { | 386 | { |
387 | config->setGroup(mGroup); | 387 | config->setGroup(mGroup); |
388 | *mReference = config->readIntListEntry(mName); | 388 | *mReference = config->readIntListEntry(mName); |
389 | } | 389 | } |
390 | 390 | ||
391 | 391 | ||
392 | QString *KPrefs::mCurrentGroup = 0; | 392 | QString *KPrefs::mCurrentGroup = 0; |
393 | 393 | ||
394 | KPrefs::KPrefs(const QString &configname) | 394 | KPrefs::KPrefs(const QString &configname) |
395 | { | 395 | { |
396 | if (!configname.isEmpty()) { | 396 | if (!configname.isEmpty()) { |
397 | //qDebug("KPrefs::KPrefs %s",configname.latin1() ); | 397 | //qDebug("KPrefs::KPrefs %s",configname.latin1() ); |
398 | mConfig = new KConfig(locateLocal("config",configname)); | 398 | mConfig = new KConfig(locateLocal("config",configname)); |
399 | } else { | 399 | } else { |
400 | qDebug("KPrefs::Global config "); | ||
400 | mConfig = KGlobal::config(); | 401 | mConfig = KGlobal::config(); |
401 | } | 402 | } |
402 | 403 | ||
403 | mItems.setAutoDelete(true); | 404 | mItems.setAutoDelete(true); |
404 | 405 | ||
405 | // Set default group | 406 | // Set default group |
406 | if (mCurrentGroup == 0) mCurrentGroup = new QString("No Group"); | 407 | if (mCurrentGroup == 0) mCurrentGroup = new QString("No Group"); |
407 | } | 408 | } |
408 | 409 | ||
409 | KPrefs::~KPrefs() | 410 | KPrefs::~KPrefs() |
410 | { | 411 | { |
411 | if (mConfig != KGlobal::config()) { | 412 | if (mConfig != KGlobal::config()) { |
412 | delete mConfig; | 413 | delete mConfig; |
413 | } | 414 | } |
414 | } | 415 | } |
415 | 416 | ||
416 | void KPrefs::setCurrentGroup(const QString &group) | 417 | void KPrefs::setCurrentGroup(const QString &group) |
417 | { | 418 | { |
418 | if (mCurrentGroup) delete mCurrentGroup; | 419 | if (mCurrentGroup) delete mCurrentGroup; |
419 | mCurrentGroup = new QString(group); | 420 | mCurrentGroup = new QString(group); |
420 | } | 421 | } |
421 | 422 | ||
422 | KConfig *KPrefs::config() const | 423 | KConfig *KPrefs::config() const |
423 | { | 424 | { |