diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-29 18:06:42 -0200 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-09-15 02:08:29 +0000 |
commit | 1996bd4a01748ae384242eb47d4ff2c679c4c5d0 (patch) | |
tree | eed28a9b350dd0386212c0041d62a93d66536e6b /src/dbus/qdbusserver.cpp | |
parent | 2bcc913a7f302cc404efcba951565bdeab9e1de4 (diff) |
Use QDBusConnectionPrivate* when QDBusServer receives a new connection
This is because the socket activity will move to a different thread;
QDBusConnectionPrivate* can be queued, QDBusConnection can't easily.
Change-Id: I82722016018b7fcfb246cda6043469fadbfd987d
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/dbus/qdbusserver.cpp')
-rw-r--r-- | src/dbus/qdbusserver.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp index cf1b6e9665..05156c992f 100644 --- a/src/dbus/qdbusserver.cpp +++ b/src/dbus/qdbusserver.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2015 Intel Corporation. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtDBus module of the Qt Toolkit. @@ -64,11 +65,11 @@ QDBusServer::QDBusServer(const QString &address, QObject *parent) } d = new QDBusConnectionPrivate(this); - QObject::connect(d, SIGNAL(newServerConnection(QDBusConnection)), - this, SIGNAL(newConnection(QDBusConnection))); + QObject::connect(d, SIGNAL(newServerConnection(QDBusConnectionPrivate*)), + this, SLOT(_q_newConnection(QDBusConnectionPrivate*)), Qt::QueuedConnection); QDBusErrorInternal error; - d->setServer(q_dbus_server_listen(address.toUtf8().constData(), error), error); + d->setServer(this, q_dbus_server_listen(address.toUtf8().constData(), error), error); } /*! @@ -92,11 +93,11 @@ QDBusServer::QDBusServer(QObject *parent) } d = new QDBusConnectionPrivate(this); - QObject::connect(d, SIGNAL(newServerConnection(QDBusConnection)), - this, SIGNAL(newConnection(QDBusConnection))); + QObject::connect(d, SIGNAL(newServerConnection(QDBusConnectionPrivate*)), + this, SLOT(_q_newConnection(QDBusConnectionPrivate*)), Qt::QueuedConnection); QDBusErrorInternal error; - d->setServer(q_dbus_server_listen(address, error), error); + d->setServer(this, q_dbus_server_listen(address, error), error); } /*! @@ -186,4 +187,6 @@ bool QDBusServer::isAnonymousAuthenticationAllowed() const QT_END_NAMESPACE +#include "moc_qdbusserver.cpp" + #endif // QT_NO_DBUS |