From 24a93798b8ef2f070896fd38113ae59e7f5062f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 8 Feb 2018 12:33:05 +0100 Subject: [PATCH] logging: Use !QT_BOOTSTRAPPED instead of QT_BUILD_CORE_LIB The former is the preferred way in Qt to exclude code that shouldn't be built for bootstrap tools. For qlogging.cpp this includes the bootstrap library, and qmake, both of which have QT_BOOTSTRAPPED defined. Change-Id: I94b669aae308786eded92b30b5e3f63add069756 Reviewed-by: Simon Hausmann Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/global/qlogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 357c164baea..48d0cac10e3 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1218,7 +1218,7 @@ void QMessagePattern::setPattern(const QString &pattern) #if defined(Q_OS_WINRT) OutputDebugString(reinterpret_cast(error.utf16())); if (0) -#elif defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) +#elif defined(Q_OS_WIN) && !defined(QT_BOOTSTRAPPED) if (!qt_logging_to_console()) { OutputDebugString(reinterpret_cast(error.utf16())); } else