libqt5-qtbase/0004-Partially-revert-Fix-a-deadlock-introduced-by-the-ra.patch
Dominique Leuenberger 4f78de248e Accepting request 260193 from KDE:Qt5
- Added patches from upstream: 0001-Allow-panels-outside-of-availableGeometry.patch (kde#339846) and 0002-Always-lock-the-DBus-dispatcher-before-dbus_connecti.patch, 0003-QDBusConnection-Merge-the-dispatch-and-the-watch-and.patch, 0004-Partially-revert-Fix-a-deadlock-introduced-by-the-ra.patch, for QTBUG#42189
- Don't install CMake files for plugins, they are useful only for bundled Qt builds
- Downgrade sql-plugins from libQt5Sql-devel's requires to suggests
- Added QTBUG41590.patch, improve font rendering (QTBUG41590,QTBUG40971)

OBS-URL: https://build.opensuse.org/request/show/260193
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=31
2014-11-11 08:59:19 +00:00

92 lines
3.5 KiB
Diff

From a08d09767513ac2d6232f2d6d1cf2bc30974f632 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Tue, 28 Oct 2014 19:34:01 -0700
Subject: [PATCH 4/4] Partially revert "Fix a deadlock introduced by the race
condition fix"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The commit was 9361be58f47ec256bf920c378479a02501219c1f (2008-11-17),
referring to the race condition fix that was applied in commit
d47c05b1889bb4f06203bbc65f4660b8d0128954 (2008-10-08). The fix for the
deadlock reintroduced the race condition and the commit message noted
it.
The workaround is no longer necessary since we've fixed the original race
condition differently now (see the previous two commits).
Task-number: QTBUG-42189
Change-Id: I5a83249597a83c4d4caa2ae57964ad3cc61c1d70
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
(cherry picked from commit 73a1e8c60d894701f34806cc4b847aa2814bf389)
---
src/dbus/qdbusintegrator.cpp | 40 ++++++++++++++--------------------------
1 file changed, 14 insertions(+), 26 deletions(-)
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index b396c23a1d0c1958971ce76c8b93ab43c9a18c68..c87999a48d5ad2fa39a183fe67aad8021065eb1f 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1185,41 +1185,29 @@ void QDBusConnectionPrivate::doDispatch()
void QDBusConnectionPrivate::socketRead(int fd)
{
- QVarLengthArray<DBusWatch *, 2> pendingWatches;
-
- {
- QDBusDispatchLocker locker(SocketReadAction, this);
- WatcherHash::ConstIterator it = watchers.constFind(fd);
- while (it != watchers.constEnd() && it.key() == fd) {
- if (it->watch && it->read && it->read->isEnabled())
- pendingWatches.append(it.value().watch);
- ++it;
+ QDBusDispatchLocker locker(SocketReadAction, this);
+ WatcherHash::ConstIterator it = watchers.constFind(fd);
+ while (it != watchers.constEnd() && it.key() == fd) {
+ if (it->watch && it->read && it->read->isEnabled()) {
+ if (!q_dbus_watch_handle(it.value().watch, DBUS_WATCH_READABLE))
+ qDebug("OUT OF MEM");
}
+ ++it;
}
-
- for (int i = 0; i < pendingWatches.size(); ++i)
- if (!q_dbus_watch_handle(pendingWatches[i], DBUS_WATCH_READABLE))
- qDebug("OUT OF MEM");
doDispatch();
}
void QDBusConnectionPrivate::socketWrite(int fd)
{
- QVarLengthArray<DBusWatch *, 2> pendingWatches;
-
- {
- QDBusDispatchLocker locker(SocketWriteAction, this);
- WatcherHash::ConstIterator it = watchers.constFind(fd);
- while (it != watchers.constEnd() && it.key() == fd) {
- if (it->watch && it->write && it->write->isEnabled())
- pendingWatches.append(it.value().watch);
- ++it;
+ QDBusDispatchLocker locker(SocketWriteAction, this);
+ WatcherHash::ConstIterator it = watchers.constFind(fd);
+ while (it != watchers.constEnd() && it.key() == fd) {
+ if (it->watch && it->write && it->write->isEnabled()) {
+ if (!q_dbus_watch_handle(it.value().watch, DBUS_WATCH_WRITABLE))
+ qDebug("OUT OF MEM");
}
+ ++it;
}
-
- for (int i = 0; i < pendingWatches.size(); ++i)
- if (!q_dbus_watch_handle(pendingWatches[i], DBUS_WATCH_WRITABLE))
- qDebug("OUT OF MEM");
}
void QDBusConnectionPrivate::objectDestroyed(QObject *obj)
--
2.1.2