summaryrefslogtreecommitdiff
path: root/tests/auto/corelib/global
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-07-30 19:46:53 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-01-08 00:23:03 +0100
commit63cd16d03c7f1362018cd06a7373ecafcd3383c0 (patch)
treee732db6b122e244318b0a95934b43326726c93ab /tests/auto/corelib/global
parent982de3eccc3e544d075c635fad1a158b14c8ebac (diff)
downloadqtbase-63cd16d03c7f1362018cd06a7373ecafcd3383c0.tar.gz
Add support for printing the real thread ID with QT_MESSAGE_PATTERN
%{threadid} should have been %{qthreadptr} but we forgot to make the change for Qt 5.4. So do it now. [ChangeLog][QtCore][Logging framework] %{threadid} now prints the real thread ID. On Linux, OS X, iOS, FreeBSD and Windows, the value is unique system-wide. On other systems, it will print something that may be process-specific (the value of pthread_self(3)). To print the pointer to QThread::current(), use %{qthreadptr}. Change-Id: Ie383ff864a11966cf5d095b966a30ace65d34ee6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto/corelib/global')
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 140b349c64..c35a373d3f 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -765,9 +765,9 @@ void tst_qmessagehandler::qMessagePattern_data()
<< "A DEBUG qDebug "
<< "A qWarning ");
- QTest::newRow("pid") << "%{pid}: %{message}"
+ QTest::newRow("pid-tid") << "%{pid}/%{threadid}: %{message}"
<< true << QList<QByteArray>(); // can't match anything, just test validity
- QTest::newRow("threadid") << "ThreadId:%{threadid}: %{message}"
+ QTest::newRow("qthreadptr") << "ThreadId:%{qthreadptr}: %{message}"
<< true << (QList<QByteArray>()
<< "ThreadId:0x");