[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.2/kdepim/kresources/kolab/shared
From: Thomas McGuire <mcguire () kde ! org>
Date: 2009-04-28 21:50:49
Message-ID: 1240955449.064870.2605.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 960718 by tmcguire:
Backport r960717 by tmcguire from trunk to the 4.2 branch:
Merged revisions 960715 via svnmerge from
svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim
........
r960715 | tmcguire | 2009-04-28 23:45:08 +0200 (Tue, 28 Apr 2009) | 5 lines
Don't restart KMail when using a Kolab resource and KMail just quit.
Even though I like KMail, this is a bit too much ;)
CCBUG: 189824
........
M +12 -3 kmailconnection.cpp
--- branches/KDE/4.2/kdepim/kresources/kolab/shared/kmailconnection.cpp \
#960717:960718 @@ -76,8 +76,12 @@
// using e.g. KMessageBox
return false;
}
+ kDebug(5650) << "Connected to the KMail DBus interface.";
mKmailGroupwareInterface = new OrgKdeKmailGroupwareInterface( dbusService, \
KMAIL_DBUS_GROUPWARE_PATH,
\
QDBusConnection::sessionBus() ); + if ( !mKmailGroupwareInterface->isValid() )
+ kWarning(5650) << "The groupware interface is not valid, race condition!?";
+
mOldServiceName = mKmailGroupwareInterface->service();
connect( mKmailGroupwareInterface, \
SIGNAL(incidenceAdded(QString,QString,uint,int,QString)), @@ -279,7 +283,8 @@
return checkReply( mKmailGroupwareInterface->triggerSync( contentsType ) );
}
-void KMailConnection::dbusServiceOwnerChanged(const QString & service, const \
QString&, const QString&) +void KMailConnection::dbusServiceOwnerChanged( const \
QString &service, const QString &oldOwner, + \
const QString &newOwner ) {
// The owner of the D-Bus service we're interested in changed, so either connect \
or disconnect. if ( mOldServiceName == service && !service.isEmpty() ) {
@@ -291,8 +296,12 @@
mKmailGroupwareInterface = 0;
}
else {
- if ( !connectToKMail() )
- kWarning(5650) << "Could not connect to KMail, even though the D-Bus service \
just became available!"; + const bool kmailJustStarted = oldOwner.isEmpty();
+ if ( kmailJustStarted ) { // Vampire protection
+ if ( !connectToKMail() ) {
+ kWarning(5650) << "Could not connect to KMail, even though the D-Bus \
service just became available!"; + }
+ }
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic