diff options
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 5842b26ecb..6c7cd9c5c6 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -140,6 +140,8 @@ static QT_PREPEND_NAMESPACE(qint64) qt_gettid() #endif #endif // !QT_BOOTSTRAPPED +#include <cstdlib> + #include <stdio.h> QT_BEGIN_NAMESPACE @@ -170,7 +172,7 @@ static bool isFatal(QtMsgType msgType) static bool willLogToConsole() { -#if defined(Q_OS_WINCE) || defined(Q_OS_WINRT) +#if defined(Q_OS_WINRT) // these systems have no stderr, so always log to the system log return false; #elif defined(QT_BOOTSTRAPPED) @@ -1176,7 +1178,7 @@ void QMessagePattern::setPattern(const QString &pattern) else if (inIf) error += QLatin1String("QT_MESSAGE_PATTERN: missing %{endif}\n"); if (!error.isEmpty()) { -#if defined(Q_OS_WINCE) || defined(Q_OS_WINRT) +#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) @@ -1677,11 +1679,7 @@ static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const Q_UNUSED(message); #endif -#if (defined(Q_OS_UNIX) || defined(Q_CC_MINGW)) - abort(); // trap; generates core dump -#else - exit(1); // goodbye cruel world -#endif + std::abort(); } |