[SCM] qtbase packaging branch, ubuntu+1, updated. ubuntu/5.6.1+dfsg-3ubuntu2-2-gbd75f8f

Timo Jyrinki timo at moszumanska.debian.org
Wed Aug 17 10:03:58 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtbase.git;a=commitdiff;h=bd75f8f

The following commit has been merged in the ubuntu+1 branch:
commit bd75f8f88a77e27a68645311e32f072be3cfdd5e
Author: Timo Jyrinki <timo.jyrinki at canonical.com>
Date:   Wed Aug 17 10:02:19 2016 +0000

    debian/patches/QDBusServer-delay-processing-of-D-Bus-messages.patch
    
    * debian/patches/QDBusServer-delay-processing-of-D-Bus-messages.patch:
      - Fix DBus message processing (LP: #1608822)
---
 debian/changelog                                   |   4 +-
 ...Server-delay-processing-of-D-Bus-messages.patch | 134 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 3 files changed, 138 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 89f613e..40f9f88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 qtbase-opensource-src (5.6.1+dfsg-3ubuntu3) UNRELEASED; urgency=medium
 
-  * 
+  [ Timo Jyrinki ]
+  * debian/patches/QDBusServer-delay-processing-of-D-Bus-messages.patch:
+    - Fix DBus message processing (LP: #1608822) 
 
  -- Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>  Wed, 17 Aug 2016 09:58:32 +0000
 
diff --git a/debian/patches/QDBusServer-delay-processing-of-D-Bus-messages.patch b/debian/patches/QDBusServer-delay-processing-of-D-Bus-messages.patch
new file mode 100644
index 0000000..ff0a8e3
--- /dev/null
+++ b/debian/patches/QDBusServer-delay-processing-of-D-Bus-messages.patch
@@ -0,0 +1,134 @@
+From dbbb06c2757bdcb7d7c704d33ead730b50141704 Mon Sep 17 00:00:00 2001
+From: Alberto Mardegan <alberto.mardegan at canonical.com>
+Date: Tue, 9 Aug 2016 17:01:37 +0300
+Subject: [PATCH] QDBusServer: delay processing of D-Bus messages
+
+We must ensure that QDBusServer's newConnection() signal has been
+processed by the application, before starting processing messages on it.
+
+Task-number: QTBUG-55087
+Change-Id: I595329b2f98788dbf9f40558b8c230c0c0817ef8
+---
+ src/dbus/qdbusconnection.cpp | 20 --------------------
+ src/dbus/qdbusconnection_p.h | 19 +++++++++++++++++++
+ src/dbus/qdbusintegrator.cpp | 12 ++++++++++++
+ src/dbus/qdbusserver.cpp     |  2 ++
+ 4 files changed, 33 insertions(+), 20 deletions(-)
+
+diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
+index 7cdacc1..c88cf89 100644
+--- a/src/dbus/qdbusconnection.cpp
++++ b/src/dbus/qdbusconnection.cpp
+@@ -68,24 +68,6 @@ static void preventDllUnload();
+ 
+ Q_GLOBAL_STATIC(QDBusConnectionManager, _q_manager)
+ 
+-// can be replaced with a lambda in Qt 5.7
+-class QDBusConnectionDispatchEnabler : public QObject
+-{
+-    Q_OBJECT
+-    QDBusConnectionPrivate *con;
+-public:
+-    QDBusConnectionDispatchEnabler(QDBusConnectionPrivate *con) : con(con) {}
+-
+-public slots:
+-    void execute()
+-    {
+-        con->setDispatchEnabled(true);
+-        if (!con->ref.deref())
+-            con->deleteLater();
+-        deleteLater();
+-    }
+-};
+-
+ struct QDBusConnectionManager::ConnectionRequestData
+ {
+     enum RequestType {
+@@ -1281,8 +1263,6 @@ QByteArray QDBusConnection::localMachineId()
+ 
+ QT_END_NAMESPACE
+ 
+-#include "qdbusconnection.moc"
+-
+ #ifdef Q_OS_WIN
+ #  include <qt_windows.h>
+ 
+diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
+index fff9f29..d16cd05 100644
+--- a/src/dbus/qdbusconnection_p.h
++++ b/src/dbus/qdbusconnection_p.h
+@@ -375,6 +375,25 @@ extern QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNod
+                                      const QDBusMessage &msg);
+ extern QDBusMessage qDBusPropertyGetAll(const QDBusConnectionPrivate::ObjectTreeNode &node,
+                                         const QDBusMessage &msg);
++
++// can be replaced with a lambda in Qt 5.7
++class QDBusConnectionDispatchEnabler : public QObject
++{
++    Q_OBJECT
++    QDBusConnectionPrivate *con;
++public:
++    QDBusConnectionDispatchEnabler(QDBusConnectionPrivate *con) : con(con) {}
++
++public slots:
++    void execute()
++    {
++        con->setDispatchEnabled(true);
++        if (!con->ref.deref())
++            con->deleteLater();
++        deleteLater();
++    }
++};
++
+ #endif // QT_BOOTSTRAPPED
+ 
+ QT_END_NAMESPACE
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index 147966b..878a582 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -309,9 +309,21 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, v
+     // setPeer does the error handling for us
+     QDBusErrorInternal error;
+     newConnection->setPeer(connection, error);
++    newConnection->setDispatchEnabled(false);
+ 
+     // this is a queued connection and will resume in the QDBusServer's thread
+     emit serverConnection->newServerConnection(newConnection);
++
++    // we've disabled dispatching of events, so now we post an event to the
++    // QDBusServer's thread in order to enable it after the
++    // QDBusServer::newConnection() signal has been received by the
++    // application's code
++    newConnection->ref.ref();
++    QReadLocker serverLock(&serverConnection->lock);
++    QDBusConnectionDispatchEnabler *o = new QDBusConnectionDispatchEnabler(newConnection);
++    QTimer::singleShot(0, o, SLOT(execute()));
++    if (serverConnection->serverObject)
++        o->moveToThread(serverConnection->serverObject->thread());
+ }
+ 
+ void QDBusConnectionPrivate::_q_newConnection(QDBusConnectionPrivate *newConnection)
+diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
+index babb270..39d08b4 100644
+--- a/src/dbus/qdbusserver.cpp
++++ b/src/dbus/qdbusserver.cpp
+@@ -97,6 +97,7 @@ QDBusServer::QDBusServer(QObject *parent)
+ */
+ QDBusServer::~QDBusServer()
+ {
++    QWriteLocker locker(&d->lock);
+     if (QDBusConnectionManager::instance()) {
+         QMutexLocker locker(&QDBusConnectionManager::instance()->mutex);
+         Q_FOREACH (const QString &name, d->serverConnectionNames) {
+@@ -104,6 +105,7 @@ QDBusServer::~QDBusServer()
+         }
+         d->serverConnectionNames.clear();
+     }
++    d->serverObject = nullptr;
+     d->ref.store(0);
+     d->deleteLater();
+ }
+-- 
+2.8.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 074c293..186b006 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
 no_dbus_dependency.diff
 color-fonts.patch
 fix-scalable-bitmap-factor-caching.patch
+QDBusServer-delay-processing-of-D-Bus-messages.patch
 
 # Debian specific.
 gnukfreebsd.diff

-- 
qtbase packaging



More information about the pkg-kde-commits mailing list