readConfig must be done before registerWithMessageDict, since that one can call writeConfig in some circumstances

(readFolderIds() returned -1, so invalidateFolder() was called,
which calls open/close, and close() calls updateIndex()+writeConfig() when mAutoCreateIndex is true.)

This should fix the frequent loss of folder settings.
CCMAIL: kmail-devel@kde.org

svn path=/branches/KDE/3.5/kdepim/; revision=531267
wilder-work
David Faure 20 years ago
parent 3e8c6d8d64
commit 8a6a50e5b8
  1. 14
      kmfolder.cpp

@ -84,12 +84,6 @@ KMFolder::KMFolder( KMFolderDir* aParent, const QString& aFolderName,
}
}
// trigger from here, since it needs a fully constructed FolderStorage
if ( mExportsSernums )
mStorage->registerWithMessageDict();
if ( !mHasIndex )
mStorage->setAutoCreateIndex( false );
if ( aParent ) {
connect( mStorage, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
aParent->manager(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) );
@ -133,8 +127,16 @@ KMFolder::KMFolder( KMFolderDir* aParent, const QString& aFolderName,
this, SLOT( slotContentsTypeChanged( KMail::FolderContentsType ) ) );
//FIXME: Centralize all the readConfig calls somehow - Zack
// Meanwhile, readConfig must be done before registerWithMessageDict, since
// that one can call writeConfig in some circumstances - David
mStorage->readConfig();
// trigger from here, since it needs a fully constructed FolderStorage
if ( mExportsSernums )
mStorage->registerWithMessageDict();
if ( !mHasIndex )
mStorage->setAutoCreateIndex( false );
if ( mId == 0 && aParent )
mId = aParent->manager()->createId();
}

Loading…
Cancel
Save