Fix bug 124703 ("detect missing attachments" settings not applied until kmail is restarted)

The cause for the bug was mixing of KConfigXT (in the composer) and classic KConfig (in the configuration dialog).

BUG:124703

svn path=/branches/KDE/3.5/kdepim/; revision=525407
wilder-work
Ingo Klcker 20 years ago
parent 97834c2f9c
commit a94ec08ef4
  1. 24
      configuredialog.cpp
  2. 3
      configuredialog_p.h

@ -3348,15 +3348,12 @@ ComposerPageAttachmentsTab::ComposerPageAttachmentsTab( QWidget * parent,
mAttachWordsListEditor, SLOT(setEnabled(bool)) );
}
void ComposerPage::AttachmentsTab::doLoadOther() {
KConfigGroup composer( KMKernel::config(), "Composer" );
void ComposerPage::AttachmentsTab::doLoadFromGlobalSettings() {
mOutlookCompatibleCheck->setChecked(
composer.readBoolEntry( "outlook-compatible-attachments", false ) );
GlobalSettings::self()->outlookCompatibleAttachments() );
mMissingAttachmentDetectionCheck->setChecked(
composer.readBoolEntry( "showForgottenAttachmentWarning", true ) );
QStringList attachWordsList =
composer.readListEntry( "attachment-keywords" );
GlobalSettings::self()->showForgottenAttachmentWarning() );
QStringList attachWordsList = GlobalSettings::self()->attachmentKeywords();
if ( attachWordsList.isEmpty() ) {
// default value
attachWordsList << QString::fromLatin1("attachment")
@ -3371,13 +3368,12 @@ void ComposerPage::AttachmentsTab::doLoadOther() {
}
void ComposerPage::AttachmentsTab::save() {
KConfigGroup composer( KMKernel::config(), "Composer" );
composer.writeEntry( "outlook-compatible-attachments",
mOutlookCompatibleCheck->isChecked() );
composer.writeEntry( "showForgottenAttachmentWarning",
mMissingAttachmentDetectionCheck->isChecked() );
composer.writeEntry( "attachment-keywords",
mAttachWordsListEditor->stringList() );
GlobalSettings::self()->setOutlookCompatibleAttachments(
mOutlookCompatibleCheck->isChecked() );
GlobalSettings::self()->setShowForgottenAttachmentWarning(
mMissingAttachmentDetectionCheck->isChecked() );
GlobalSettings::self()->setAttachmentKeywords(
mAttachWordsListEditor->stringList() );
}
void ComposerPageAttachmentsTab::slotOutlookCompatibleClicked()

@ -715,8 +715,7 @@ private slots:
void slotOutlookCompatibleClicked();
private:
//virtual void doLoadFromGlobalSettings();
virtual void doLoadOther();
virtual void doLoadFromGlobalSettings();
//FIXME virtual void doResetToDefaultsOther();
private:

Loading…
Cancel
Save