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 <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Tor Arne Vestbø 2018-02-08 12:33:05 +01:00
parent bd80f00f84
commit 24a93798b8

View File

@ -1218,7 +1218,7 @@ void QMessagePattern::setPattern(const QString &pattern)
#if defined(Q_OS_WINRT)
OutputDebugString(reinterpret_cast<const wchar_t*>(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<const wchar_t*>(error.utf16()));
} else