diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-24 09:49:07 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-09-24 12:04:52 +0200 |
commit | c96426f19f8c244c0f5748f0009016f576db9616 (patch) | |
tree | f6365344e8a24415e7a67694af2f0c043bb0dae6 /src/corelib/global/qlogging.cpp | |
parent | 2137cb7dc5c902ce71855901c83c4c9d87b1ce2d (diff) | |
parent | c5a3e5edd9e63b18abf1838c86a27a662224b02c (diff) |
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 904f8db033..39d6f9539a 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1326,12 +1326,9 @@ static void qDefaultMsgHandler(QtMsgType type, const char *buf) qDefaultMessageHandler(type, emptyContext, QString::fromLocal8Bit(buf)); } -#if defined(Q_COMPILER_THREAD_LOCAL) || (defined(Q_CC_MSVC) && !defined(Q_OS_WINCE)) -#if defined(Q_CC_MSVC) -static __declspec(thread) bool msgHandlerGrabbed = false; -#else +#if defined(Q_COMPILER_THREAD_LOCAL) + static thread_local bool msgHandlerGrabbed = false; -#endif static bool grabMessageHandler() { @@ -1350,7 +1347,7 @@ static void ungrabMessageHandler() #else static bool grabMessageHandler() { return true; } static void ungrabMessageHandler() { } -#endif // (Q_COMPILER_THREAD_LOCAL) || ((Q_CC_MSVC) && !(Q_OS_WINCE)) +#endif // (Q_COMPILER_THREAD_LOCAL) static void qt_message_print(QtMsgType msgType, const QMessageLogContext &context, const QString &message) { |