Show the folders when in the accountsettings in the first start

This commit is contained in:
Olivier Goffart 2014-03-26 19:30:13 +01:00
parent 332c6cf726
commit de2335c1db
4 changed files with 10 additions and 1 deletions

View file

@ -111,7 +111,10 @@ AccountSettings::AccountSettings(QWidget *parent) :
this, SLOT(slotAccountChanged(Account*,Account*)));
slotAccountChanged(AccountManager::instance()->account(), 0);
connect(FolderMan::instance(), SIGNAL(folderListLoaded(Folder::Map)),
this, SLOT(setFolderList(Folder::Map)));
setFolderList(FolderMan::instance()->map());
}
void AccountSettings::slotAccountChanged(Account *newAccount, Account *oldAccount)
@ -132,6 +135,7 @@ void AccountSettings::slotAccountChanged(Account *newAccount, Account *oldAccoun
this, SLOT(slotUpdateQuota(qint64,qint64)));
slotUpdateQuota(quotaInfo->lastQuotaTotalBytes(), quotaInfo->lastQuotaUsedBytes());
}
}
void AccountSettings::slotFolderActivated( const QModelIndex& indx )

View file

@ -48,7 +48,6 @@ public:
explicit AccountSettings(QWidget *parent = 0);
~AccountSettings();
void setFolderList( const Folder::Map& );
signals:
void folderChanged();
@ -70,6 +69,7 @@ public slots:
void slotAccountStateChanged(int state);
void setGeneralErrors( const QStringList& errors );
void setFolderList( const Folder::Map& );
protected slots:
void slotAddFolder();

View file

@ -154,6 +154,9 @@ int FolderMan::setupFolders()
emit( folderSyncStateChange( f->alias() ) );
}
}
emit folderListLoaded(_folderMap);
// return the number of valid folders.
return _folderMap.size();
}

View file

@ -89,6 +89,8 @@ signals:
*/
void folderSyncStateChange( const QString & );
void folderListLoaded(const Folder::Map &);
public slots:
void slotRemoveFolder( const QString& );
void slotEnableFolder( const QString&, bool );