From 56f2b1f1e8a29f316de75c3a4dcfb79a90d635e8 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 17 Jun 2024 10:07:29 +0200 Subject: [PATCH] Process: Add information about main thread to logging Add a note if a process is started on the main thread. That adds essential information to "blocking without event loop". Task-number: QTCREATORBUG-31068 Change-Id: Iaf3bab88b79391c4ddc17d18a81e6d8ab712d22d Reviewed-by: Jarek Kobus --- src/libs/utils/qtcprocess.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp index 5e0918ed70e..05111ef8efa 100644 --- a/src/libs/utils/qtcprocess.cpp +++ b/src/libs/utils/qtcprocess.cpp @@ -2140,9 +2140,10 @@ void ProcessPrivate::setupDebugLog() static std::atomic_int startCounter = 0; const int currentNumber = startCounter.fetch_add(1); qCDebug(processLog).nospace().noquote() - << "Process " << currentNumber << " starting (" - << qPrintable(blockingMessage(property(QTC_PROCESS_BLOCKING_TYPE))) - << "): " << m_setup.m_commandLine.toUserOutput(); + << "Process " << currentNumber << " starting (" + << qPrintable(blockingMessage(property(QTC_PROCESS_BLOCKING_TYPE))) + << (isMainThread() ? ", main thread" : "") + << "): " << m_setup.m_commandLine.toUserOutput(); setProperty(QTC_PROCESS_NUMBER, currentNumber); });