Add comments about this non-obvious behavior.

SVN_SILENT

svn path=/trunk/KDE/kdepim/; revision=857502
wilder-work
Thomas McGuire 18 years ago
parent 69a25a7462
commit 31b511127f
  1. 14
      accountmanager.cpp

@ -261,8 +261,18 @@ void AccountManager::add( KMAccount *account )
if ( account ) {
mAcctList.append( account );
KMFolder *folder = account->folder(); // init folder's account list
if ( folder && !folder->hasAccounts() ) account->setFolder( folder, true );
// KMAccount::setFolder has a side
// effect, it calls KMAcctFolder::addAccount which initialises the
// folder's account list (KMFolder::mAcctList). This list is then checked
// in FolderTreeBase::hideLocalInbox (via KMFolder::hasAccounts) to
// decide whether the inbox is to be shown.
//
// Unless this is done, the folder's account list is never initialised
// with the newly created account.
// This fixes bug 168544.
KMFolder *folder = account->folder();
if ( folder && !folder->hasAccounts() )
account->setFolder( folder, true );
emit accountAdded( account );
account->installTimer();

Loading…
Cancel
Save