1
0
forked from pool/libqt5-qtbase
libqt5-qtbase/0004-QDBus-fix-data-race-on-isDebugging-bool.patch
Stephan Kulow 154cc92f96 Accepting request 238711 from KDE:Qt5
- Update to 5.3.1
  * Bugfix release, for more details please see:
    http://blog.qt.digia.com/blog/2014/06/25/qt-5-3-1-released/
- Drop libqt5-fix-the-modal-dialogs-can-go-behind.patch, merged upstream
- Added patches from upstream:
  0001-Do-not-overwrite-existing-event-mask-of-root-window.patch -- QTBUG-39648
  0002-Properly-check-which-OpenGL-features-are-supported.patch -- QTBUG-39730
  0003-Fix-data-race-on-QLoggingCategory-when-using-qDebug-.patch -- Fix data race on QLoggingCategory
  0004-QDBus-fix-data-race-on-isDebugging-bool.patch -- fix data race on isDebugging bool
  0005-Translate-Super-Hyper-keys-to-MetaModifier.patch -- QTBUG-38428

OBS-URL: https://build.opensuse.org/request/show/238711
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=22
2014-06-30 19:44:19 +00:00

47 lines
1.5 KiB
Diff

From 7a4dcbaabf037a6913a5662ebb74cc47e04673b9 Mon Sep 17 00:00:00 2001
From: David Faure <david.faure@kdab.com>
Date: Sun, 8 Jun 2014 15:39:00 +0200
Subject: [PATCH 1/1] QDBus: fix data race on isDebugging bool
Change-Id: Id0b8bf8dac570abfc6c8768bd4264650ae0c199b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---
src/dbus/qdbusintegrator.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 1fef6d4..260c188 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -73,8 +73,8 @@
QT_BEGIN_NAMESPACE
-static bool isDebugging;
-#define qDBusDebug if (!::isDebugging); else qDebug
+static QBasicAtomicInt isDebugging = Q_BASIC_ATOMIC_INITIALIZER(-1);
+#define qDBusDebug if (::isDebugging == 0); else qDebug
Q_GLOBAL_STATIC_WITH_ARGS(const QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS)))
@@ -1022,13 +1022,12 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
anonymousAuthenticationAllowed(false)
{
static const bool threads = q_dbus_threads_init_default();
- static const int debugging = qgetenv("QDBUS_DEBUG").toInt();
- ::isDebugging = debugging;
+ if (::isDebugging == -1)
+ ::isDebugging = qgetenv("QDBUS_DEBUG").toInt();
Q_UNUSED(threads)
- Q_UNUSED(debugging)
#ifdef QDBUS_THREAD_DEBUG
- if (debugging > 1)
+ if (::isDebugging > 1)
qdbusThreadDebug = qdbusDefaultThreadDebug;
#endif
--
1.9.3