diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-01-13 15:10:28 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-01-13 15:28:07 +0100 |
commit | 38e79e3f04d6fd5a3df585a60b2aec95e8e68368 (patch) | |
tree | f06011e913864f33ddc4cd3318b1c75b2c42db2c /qtservice/src | |
parent | e99435874aba270013f801316b863402ccff3fd2 (diff) |
Qt Service/Windows: Fix compilation with Qt 5 / QTSERVICE_DEBUG.
Fix oversight of last commit.
Change-Id: Iec9963313edf9d7438a90f9f3a7a4c6ae5065132
Task-number: QTSOLBUG-184
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qtservice/src')
-rw-r--r-- | qtservice/src/qtservice_win.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/qtservice/src/qtservice_win.cpp b/qtservice/src/qtservice_win.cpp index f4b8cc9..e5b7ecc 100644 --- a/qtservice/src/qtservice_win.cpp +++ b/qtservice/src/qtservice_win.cpp @@ -418,7 +418,11 @@ bool QtServiceController::sendCommand(int code) } #if defined(QTSERVICE_DEBUG) +# if QT_VERSION >= 0x050000 +extern void qtServiceLogDebug(QtMsgType type, const QMessageLogContext &context, const QString &msg); +# else extern void qtServiceLogDebug(QtMsgType type, const char* msg); +# endif #endif void QtServiceBase::logMessage(const QString &message, MessageType type, @@ -433,8 +437,11 @@ void QtServiceBase::logMessage(const QString &message, MessageType type, case Information: //fall through default: dbgMsg += "Information] "; break; } - dbgMsg += message.toAscii(); - qtServiceLogDebug((QtMsgType)-1, dbgMsg.constData()); +# if QT_VERSION >= 0x050000 + qtServiceLogDebug((QtMsgType)-1, QMessageLogContext(), QLatin1String(dbgMsg) + message); +# else + qtServiceLogDebug((QtMsgType)-1, (dbgMsg + message.toAscii()).constData()); +# endif #endif Q_D(QtServiceBase); |