Cosmetic debugging difference for QDBusConnection

This makes the output slightly easier to read.

Change-Id: I590b9abcb0263ae5f0580391b42e179c47569a8a
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
bb10
Thiago Macieira 2014-12-29 17:04:09 -02:00
parent 1991647af1
commit 32cbb363b9
1 changed files with 3 additions and 1 deletions

View File

@ -91,6 +91,8 @@ static inline QDebug operator<<(QDebug dbg, const QThread *th)
dbg.nospace() << "QThread(ptr=" << (void*)th;
if (th && !th->objectName().isEmpty())
dbg.nospace() << ", name=" << th->objectName();
else if (th)
dbg.nospace() << ", name=" << th->metaObject()->className();
dbg.nospace() << ')';
return dbg.space();
}
@ -396,7 +398,7 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, v
QDBusConnectionPrivate *newConnection = new QDBusConnectionPrivate(serverConnection->parent());
QMutexLocker locker(&QDBusConnectionManager::instance()->mutex);
QDBusConnectionManager::instance()->setConnection(QLatin1String("QDBusServer-") + QString::number(reinterpret_cast<qulonglong>(newConnection)), newConnection);
QDBusConnectionManager::instance()->setConnection(QLatin1String("QDBusServer-") + QString::number(reinterpret_cast<qulonglong>(newConnection), 16), newConnection);
serverConnection->serverConnectionNames << newConnection->name;
// setPeer does the error handling for us