From c61aaa28df461857b756b9415861cd2d6579c908 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Apr 2015 17:14:11 -0700 Subject: QtDBus: update debugging info (QDBUS_DEBUG=1) Change-Id: I9a75ad8521ae4e5cbbe5ffff13d1a740643ec22e Reviewed-by: Alex Blasche --- src/dbus/qdbusintegrator.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/dbus') diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index ec9a88a210..7203f05a9b 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -94,12 +94,7 @@ static inline QDebug operator<<(QDebug dbg, const QDBusConnectionPrivate *conn) << "ptr=" << (const void*)conn << ", name=" << conn->name << ", baseService=" << conn->baseService - << ", thread="; - if (conn->thread() == QThread::currentThread()) - dbg.nospace() << "same thread"; - else - dbg.nospace() << conn->thread(); - dbg.nospace() << ')'; + << ')'; return dbg; } @@ -1017,6 +1012,7 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate() void QDBusConnectionPrivate::closeConnection() { QDBusWriteLocker locker(CloseConnectionAction, this); + qDBusDebug() << this << "Disconnected"; ConnectionMode oldMode = mode; mode = InvalidMode; // prevent reentrancy baseService.clear(); @@ -1036,8 +1032,6 @@ void QDBusConnectionPrivate::closeConnection() } qDeleteAll(pendingCalls); - - qDBusDebug() << this << "Disconnected"; } void QDBusConnectionPrivate::checkThread() @@ -2098,7 +2092,7 @@ void QDBusConnectionPrivate::addSignalHook(const QString &key, const SignalHook if (connection) { if (mode != QDBusConnectionPrivate::PeerMode) { - qDBusDebug("Adding rule: %s", hook.matchRule.constData()); + qDBusDebug() << this << "Adding rule:" << hook.matchRule; q_dbus_bus_add_match(connection, hook.matchRule, NULL); // Successfully connected the signal @@ -2186,7 +2180,7 @@ QDBusConnectionPrivate::removeSignalHookNoLock(SignalHookHash::Iterator it) // we don't care about errors here if (connection && erase) { if (mode != QDBusConnectionPrivate::PeerMode) { - qDBusDebug("Removing rule: %s", hook.matchRule.constData()); + qDBusDebug() << this << "Removing rule:" << hook.matchRule; q_dbus_bus_remove_match(connection, hook.matchRule, NULL); // Successfully disconnected the signal -- cgit v1.2.3