summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r--src/corelib/global/qlogging.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 117ce240d8..5aaa0716f1 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -88,7 +88,7 @@ static bool isFatal(QtMsgType msgType)
// Do we have stderr for QDebug? - Either there is a console or we are running
// with redirected stderr.
-# ifndef Q_OS_WINCE
+# if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
static inline bool hasStdErr()
{
if (GetConsoleWindow())
@@ -98,11 +98,11 @@ static inline bool hasStdErr()
return (info.dwFlags & STARTF_USESTDHANDLES) && info.hStdError
&& info.hStdError != INVALID_HANDLE_VALUE;
}
-# endif // !Q_OS_WINCE
+# endif // !Q_OS_WINCE && !Q_OS_WINRT
bool qWinLogToStderr()
{
-# ifndef Q_OS_WINCE
+# if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
static const bool result = hasStdErr();
return result;
# else
@@ -168,7 +168,7 @@ static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap) Q_DECL
{
char emergency_buf[256] = { '\0' };
emergency_buf[sizeof emergency_buf - 1] = '\0';
-#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) && defined(Q_OS_WINCE) \
+#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) && (defined(Q_OS_WINCE) || defined(Q_OS_WINRT)) \
|| defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
wchar_t emergency_bufL[sizeof emergency_buf];
#endif
@@ -177,7 +177,7 @@ static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap) Q_DECL
qvsnprintf(emergency_buf, sizeof emergency_buf - 1, msg, ap);
#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB)
-# ifdef Q_OS_WINCE
+# if defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
convert_to_wchar_t_elided(emergency_bufL, sizeof emergency_buf, emergency_buf);
OutputDebugStringW(emergency_bufL);
# else
@@ -701,7 +701,7 @@ void QMessagePattern::setPattern(const QString &pattern)
else if (inIf)
error += QStringLiteral("QT_MESSAGE_PATTERN: missing %{endif}\n");
if (!error.isEmpty()) {
-#if defined(Q_OS_WINCE)
+#if defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
OutputDebugString(reinterpret_cast<const wchar_t*>(error.utf16()));
if (0)
#elif defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB)