From eb94e8f283c3bfabce0dca6ca21d7aa0cfae98dd Mon Sep 17 00:00:00 2001 From: Carsten Burghardt Date: Tue, 23 Sep 2003 18:12:02 +0000 Subject: [PATCH] Do not connect to imap servers during startup that are excluded from checks. svn path=/trunk/kdepim/; revision=253392 --- kmacctimap.cpp | 10 ++++++++++ kmacctimap.h | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/kmacctimap.cpp b/kmacctimap.cpp index 7e8706678..38bd3f072 100644 --- a/kmacctimap.cpp +++ b/kmacctimap.cpp @@ -358,4 +358,14 @@ void KMAcctImap::setPrefixHook() { if ( mFolder ) mFolder->setImapPath( prefix() ); } +//----------------------------------------------------------------------------- +void KMAcctImap::readConfig(KConfig& config) +{ + ImapAccountBase::readConfig( config ); + if ( checkExclude() ) { + disconnect(kmkernel->imapFolderMgr(), SIGNAL(changed()), + this, SLOT(slotUpdateFolderList())); + } +} + #include "kmacctimap.moc" diff --git a/kmacctimap.h b/kmacctimap.h index eaa0d793a..4118b0723 100644 --- a/kmacctimap.h +++ b/kmacctimap.h @@ -91,6 +91,13 @@ public: */ virtual void listDirectory(); + /** + * Read config file entries. This method is called by the account + * manager when a new account is created. The config group is + * already properly set by the caller. + */ + virtual void readConfig(KConfig& config); + public slots: void processNewMail() { processNewMail(TRUE); }