From c642f44448752972f89a121b125873f187e088b3 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 25 Jan 2019 17:10:14 +0100 Subject: Tooling: Use fprintf rather than qDebug() for debug warning This warning is generated from a statically called ctor. At that point the system facilities to run QMessageLogger may not be in place, yet. In addition, we actually don't want the message to go through the regular QMessageLogger redirection and possibly filtering. The message should always be shown. Fixes: QTBUG-73217 Change-Id: Ief192dae8c38d5d94996ee9285e54b5cbd714f4b Reviewed-by: Andy Shaw Reviewed-by: Simon Hausmann (cherry-picked from commit 15525d2a309a6028d548797bc777e38905f36c46) --- src/qml/debugger/qqmldebug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qml/debugger/qqmldebug.cpp b/src/qml/debugger/qqmldebug.cpp index 6246fb4207..6532576e03 100644 --- a/src/qml/debugger/qqmldebug.cpp +++ b/src/qml/debugger/qqmldebug.cpp @@ -44,16 +44,16 @@ #include #include +#include + QT_REQUIRE_CONFIG(qml_debug); QT_BEGIN_NAMESPACE QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool printWarning) { - if (!QQmlEnginePrivate::qml_debugging_enabled - && printWarning) { - qDebug("QML debugging is enabled. Only use this in a safe environment."); - } + if (!QQmlEnginePrivate::qml_debugging_enabled && printWarning) + fprintf(stderr, "QML debugging is enabled. Only use this in a safe environment.\n"); QQmlEnginePrivate::qml_debugging_enabled = true; } -- cgit v1.2.3