From 65264424f949dd529ef7613d2198623eddd951ad Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 18 May 2018 13:43:34 +0200 Subject: Log to OutputDebugString on windows --- common/log.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/log.cpp b/common/log.cpp index 40d9509..007b749 100644 --- a/common/log.cpp +++ b/common/log.cpp @@ -10,6 +10,7 @@ #include #include #ifdef Q_OS_WIN +#include #include #include #else @@ -64,7 +65,12 @@ public: } qint64 writeData(const char *data, qint64 len) { +#ifdef Q_OS_WIN + const auto string = QString::fromUtf8(data, leng) + OutputDebugString(reinterpret_cast(string.utf16())); +#else std::cout << data << std::endl; +#endif return len; } -- cgit v1.2.3