From kde-commits Fri Dec 28 09:57:58 2012 From: David Faure Date: Fri, 28 Dec 2012 09:57:58 +0000 To: kde-commits Subject: [kdepimlibs/KDE/4.10] mailtransport: Load passwords async on startup, rather than sync Message-Id: <20121228095758.47D23A6091 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=135668868810500 Git commit f40a4973e8c00875c351c8cc3d30bd481ef5c68b by David Faure. Committed on 23/12/2012 at 16:13. Pushed by dfaure into branch 'KDE/4.10'. Load passwords async on startup, rather than sync (which was giving 4 nested event loops, with 4 transports, on kmail startup) This fixes the password dialog appearing when sending the first email. BUG: 293271 FIXED-IN: 4.10 M +0 -9 mailtransport/transport.cpp M +1 -0 mailtransport/transportmanager.cpp http://commits.kde.org/kdepimlibs/f40a4973e8c00875c351c8cc3d30bd481ef5c68b diff --git a/mailtransport/transport.cpp b/mailtransport/transport.cpp index 45bd69d..17a511d 100644 --- a/mailtransport/transport.cpp +++ b/mailtransport/transport.cpp @@ -226,15 +226,6 @@ void Transport::usrReadConfig() } else { d->storePasswordInFile =3D true; } - } else { - // read password if wallet is open, defer otherwise - if ( Wallet::isOpen( Wallet::NetworkWallet() ) ) { - // Don't read the password right away because this can lead - // to reentrancy problems in KDBusServiceStarter when an application - // run in Kontact creates the transports (due to a QEventLoop in the - // synchronous KWallet openWallet call). - QTimer::singleShot( 0, this, SLOT(readPassword()) ); - } } } = diff --git a/mailtransport/transportmanager.cpp b/mailtransport/transportma= nager.cpp index 9bac654..76749c1 100644 --- a/mailtransport/transportmanager.cpp +++ b/mailtransport/transportmanager.cpp @@ -488,6 +488,7 @@ void TransportManagerPrivate::readConfig() } validateDefault(); migrateToWallet(); + q->loadPasswordsAsync(); } = void TransportManagerPrivate::writeConfig()