forked from qt-creator/qt-creator
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 <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -2140,9 +2140,10 @@ void ProcessPrivate::setupDebugLog()
|
|||||||
static std::atomic_int startCounter = 0;
|
static std::atomic_int startCounter = 0;
|
||||||
const int currentNumber = startCounter.fetch_add(1);
|
const int currentNumber = startCounter.fetch_add(1);
|
||||||
qCDebug(processLog).nospace().noquote()
|
qCDebug(processLog).nospace().noquote()
|
||||||
<< "Process " << currentNumber << " starting ("
|
<< "Process " << currentNumber << " starting ("
|
||||||
<< qPrintable(blockingMessage(property(QTC_PROCESS_BLOCKING_TYPE)))
|
<< qPrintable(blockingMessage(property(QTC_PROCESS_BLOCKING_TYPE)))
|
||||||
<< "): " << m_setup.m_commandLine.toUserOutput();
|
<< (isMainThread() ? ", main thread" : "")
|
||||||
|
<< "): " << m_setup.m_commandLine.toUserOutput();
|
||||||
setProperty(QTC_PROCESS_NUMBER, currentNumber);
|
setProperty(QTC_PROCESS_NUMBER, currentNumber);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user