[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9
Maximiliano Curia
maxy at moszumanska.debian.org
Mon May 9 09:05:20 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=571321d
The following commit has been merged in the master branch:
commit 571321deff6ed20f3e0312449d778b88ec276502
Author: George Kiagiadakis <kiagiadakis.george at gmail.com>
Date: Sun Jul 1 17:46:30 2012 +0300
DebugMessagesModel: Use the debug receiver's invalidated() signal to watch for unregistration
---
tools/debugger/debug-messages-model.cpp | 13 ++++++++-----
tools/debugger/debug-messages-model.h | 3 ++-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/tools/debugger/debug-messages-model.cpp b/tools/debugger/debug-messages-model.cpp
index b8e17ac..1716a3e 100644
--- a/tools/debugger/debug-messages-model.cpp
+++ b/tools/debugger/debug-messages-model.cpp
@@ -28,11 +28,9 @@ DebugMessagesModel::DebugMessagesModel(const QString & service, QObject *parent)
m_ready(false)
{
m_serviceWatcher = new QDBusServiceWatcher(service, QDBusConnection::sessionBus(),
- QDBusServiceWatcher::WatchForOwnerChange, this);
+ QDBusServiceWatcher::WatchForRegistration, this);
connect(m_serviceWatcher, SIGNAL(serviceRegistered(QString)),
SLOT(onServiceRegistered(QString)));
- connect(m_serviceWatcher, SIGNAL(serviceUnregistered(QString)),
- SLOT(onServiceUnregistered(QString)));
if (QDBusConnection::sessionBus().interface()->isServiceRegistered(service)) {
onServiceRegistered(service);
@@ -54,9 +52,11 @@ void DebugMessagesModel::onServiceRegistered(const QString & service)
SLOT(onDebugReceiverReady(Tp::PendingOperation*)));
}
-void DebugMessagesModel::onServiceUnregistered(const QString & service)
+void DebugMessagesModel::onDebugReceiverInvalidated(Tp::DBusProxy *proxy,
+ const QString &errorName, const QString &errorMessage)
{
- kDebug() << "Service" << service << "unregistered";
+ Q_UNUSED(proxy);
+ kDebug() << "DebugReceiver invalidated" << errorName << errorMessage;
m_ready = false;
m_debugReceiver.reset();
}
@@ -110,6 +110,9 @@ void DebugMessagesModel::onFetchMessagesFinished(Tp::PendingOperation* op)
//TODO limit m_messages size
m_ready = true;
+ connect(m_debugReceiver.data(),
+ SIGNAL(invalidated(Tp::DBusProxy*,QString,QString)),
+ SLOT(onDebugReceiverInvalidated(Tp::DBusProxy*,QString,QString)));
}
}
diff --git a/tools/debugger/debug-messages-model.h b/tools/debugger/debug-messages-model.h
index 5023bed..b4da9b7 100644
--- a/tools/debugger/debug-messages-model.h
+++ b/tools/debugger/debug-messages-model.h
@@ -42,7 +42,8 @@ public:
private Q_SLOTS:
void onServiceRegistered(const QString & service);
- void onServiceUnregistered(const QString & service);
+ void onDebugReceiverInvalidated(Tp::DBusProxy *proxy,
+ const QString &errorName, const QString &errorMessage);
void onDebugReceiverReady(Tp::PendingOperation *op);
void onDebugReceiverMonitoringEnabled(Tp::PendingOperation *op);
void onFetchMessagesFinished(Tp::PendingOperation *op);
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list