diff options
Diffstat (limited to 'src/qml/debugger/qqmldebug.cpp')
| -rw-r--r-- | src/qml/debugger/qqmldebug.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/debugger/qqmldebug.cpp b/src/qml/debugger/qqmldebug.cpp index b9d984db1d..69ca51d3de 100644 --- a/src/qml/debugger/qqmldebug.cpp +++ b/src/qml/debugger/qqmldebug.cpp @@ -25,8 +25,10 @@ Q_CONSTINIT static std::atomic_flag s_printedWarning = Q_ATOMIC_FLAG_INIT; void QQmlDebuggingEnabler::enableDebugging(bool printWarning) { - if (printWarning && !s_printedWarning.test_and_set(std::memory_order_relaxed)) + if (printWarning && !s_printedWarning.test_and_set(std::memory_order_relaxed)) { fprintf(stderr, "QML debugging is enabled. Only use this in a safe environment.\n"); + fflush(stderr); // We really want to print this warning, even if stderr is buffered + } QQmlEnginePrivate::qml_debugging_enabled.store(true, std::memory_order_relaxed); } |
