Summary: | Account settings not stored | ||
---|---|---|---|
Product: | [Applications] kmail | Reporter: | Michi <woskimi> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sven.burmeister |
Priority: | NOR | ||
Version: | 1.9.50 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Michi
2008-03-09 16:57:31 UTC
Works fine for me, I can not reproduce this problem, and therefore I can't fix it until I have more information to reproduce this myself. I tried a POP3 and a IMAP account, with standalone KMail and from within Kontact, both with a clean config. This worked fine. I have the same problem here. I habe been using KMail from KDE4 svn trunk for a while now with disconnected IMAP accounts. I updated my svn 3 days ago and my accounts disappeared when I restarted KMail (I also had my disk full to be honest). But since then, everytime I recreate my disconnected IMAP accounts, they disappear when restarting KMail. POP imap are saved correctly... If you need more info let me know, I can also provide a testing disconnected IMAP account to developers if required... regards *** Bug 159210 has been marked as a duplicate of this bug. *** SVN commit 785085 by staniek: Store new account settings. The fixed issue: only overwriting previous acounts was possible, so no new accounts were stored. For fresh installation that means 0 accounts. CCMAIL:159029-done@bugs.kde.org M +21 -6 accountmanager.cpp --- trunk/KDE/kdepim/kmail/accountmanager.cpp #785084:785085 @@ -45,24 +45,39 @@ { KConfig* config = KMKernel::config(); - // Delete all account enabled groups in the config file - // and replace them with new account groups + // Delete all accounts for groups in the config file not having + // Enabled=false flag (accountGroups) + // and replace them with account groups existing in memory (mAcctList) uint accounts = 0; QStringList accountGroups = config->groupList().filter( QRegExp( "Account \\d+" ) ); AccountList::ConstIterator enabledAccountIt = mAcctList.constBegin(); - foreach ( const QString& groupName, accountGroups ) { + for ( QStringList::ConstIterator it = accountGroups.constBegin() ;; ) { + QString groupName; + bool appendNewGroup = false; + if ( it == accountGroups.constEnd() ) { + if ( enabledAccountIt == mAcctList.constEnd() ) + break; + appendNewGroup = true; + groupName.sprintf( "Account %d", accounts + 1 ); + } + else { + groupName = *it; + ++it; + } + KConfigGroup group(config, groupName); uint id = group.readEntry( "Id", 0 ); if ( mDisabledAccounts.contains( id ) ) - accounts++; + accounts++; // do not modify disabled account - skip else { - config->deleteGroup( groupName ); - if ( enabledAccountIt != mAcctList.constEnd() ) { + if ( appendNewGroup ) { (*enabledAccountIt)->writeConfig( group ); ++enabledAccountIt; accounts++; } + else // no such account on the list - disabled / enabled + config->deleteGroup( groupName ); } } |