Commit 4d9835f4 authored by Alexander A. Maly's avatar Alexander A. Maly

Added conversion to QString in message handlers

parent 99624d67
Pipeline #2827 failed with stages
in 2 minutes and 9 seconds
...@@ -39,11 +39,13 @@ static QString resolvePath(const char *what) ...@@ -39,11 +39,13 @@ static QString resolvePath(const char *what)
} }
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
static void LoggerMessageOutput(QtMsgType type, const char *msg) static void LoggerMessageOutput(QtMsgType type, const char *msga)
{
QString msg(QString::fromLocal8Bit(msga));
#else #else
static void LoggerMessageOutput(QtMsgType type, const QMessageLogContext &, const QString &msg) static void LoggerMessageOutput(QtMsgType type, const QMessageLogContext &, const QString &msg)
#endif
{ {
#endif
ExtensionSystem::Logger *logger = ExtensionSystem::Logger::instance(); ExtensionSystem::Logger *logger = ExtensionSystem::Logger::instance();
switch (type) { switch (type) {
case QtDebugMsg: case QtDebugMsg:
...@@ -64,7 +66,9 @@ static void LoggerMessageOutput(QtMsgType type, const QMessageLogContext &, cons ...@@ -64,7 +66,9 @@ static void LoggerMessageOutput(QtMsgType type, const QMessageLogContext &, cons
} }
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
static void ConsoleMessageOutput(QtMsgType type, const char *msg) static void ConsoleMessageOutput(QtMsgType type, const char *msga)
{
QString msg(QString::fromLocal8Bit(msga));
#else #else
static void ConsoleMessageOutput(QtMsgType type, const QMessageLogContext &, const QString &msg) static void ConsoleMessageOutput(QtMsgType type, const QMessageLogContext &, const QString &msg)
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment