... by making it thread_local. As a natural (and welcome) side-effect, this makes output look sane in multithreaded scenarios. As for why it should be thread_local instead of an atomic: Since signal emissions and slot invocations on one thread are not necessarily correlated with another thread, they should not affect one another's indentation level. As in, emitting QIODevice::readyRead on a background thread should not make QEventLoop::aboutToBlock on the main thread be indented. The only exception to this is BlockingQueued, where one thread is directly tied to another (QTBUG-118145). But slot invocations are anyway not currently printed for Queued connection (see QTBUG-74099.) Pick-to: 6.5 Change-Id: Iea1fc522d37626df14af419a3455a732729edf74 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit ae0d231c96ab93ec36c7202c268507314eb40116) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%