diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-06-25 10:22:19 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-06-25 10:22:20 +0200 |
commit | bd20b30bf8fad9ca5e407a331a0e1d25a67b382b (patch) | |
tree | d6af84c82b5a4aba2024b18d21d5f75a341f2ecd /src/dbus | |
parent | c2c90b95bf8304e69a5f0a586c607105cc104f83 (diff) | |
parent | 7a4dcbaabf037a6913a5662ebb74cc47e04673b9 (diff) |
Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I7462840d15583ead82e86fcf5c84659b909e8c4e
Diffstat (limited to 'src/dbus')
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 6b6ac6bc62..499e9dbd82 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 |