[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:07:37 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=b446343
The following commit has been merged in the master branch:
commit b4463434482663cbf5a9424aafef513eb8baf11b
Author: George Kiagiadakis <george.kiagiadakis at collabora.com>
Date: Wed Sep 21 22:31:24 2011 +0300
service-availability-checker: Rewrite a small piece of code to make it more readable.
---
service-availability-checker.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/service-availability-checker.cpp b/service-availability-checker.cpp
index bed93b3..9b9e1d5 100644
--- a/service-availability-checker.cpp
+++ b/service-availability-checker.cpp
@@ -80,14 +80,14 @@ void ServiceAvailabilityChecker::onCallFinished(QDBusPendingCallWatcher *watcher
if (!reply.isValid()) {
kDebug() << "Got error while introspecting service availability:" << reply.error();
} else {
- bool *var = (watcher->objectName() == QLatin1String("ListActivatableNamesWatcher"))
- ? &d->serviceActivatable : &d->serviceAvailable;
-
- if (!*var) {
- *var = reply.value().contains(d->serviceName);
+ if (watcher->objectName() == QLatin1String("ListActivatableNamesWatcher")) {
+ d->serviceActivatable = reply.value().contains(d->serviceName);
} else {
- Q_ASSERT(var == &d->serviceAvailable); //this is the serviceAvailable variable
- //... and onServiceOwnerChanged() got there first...
+ if (!d->serviceAvailable) {
+ d->serviceAvailable = reply.value().contains(d->serviceName);
+ }
+ //else onServiceOwnerChanged() has been emitted before the introspection finished
+ //so the reply we got here may be incorrect, claiming that the service is not available
}
}
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list