Commit cdb78c53 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlTooling: Parse messages from latest Qt5



Change-Id: I5b2574d5dd2fecbf483a2e33feb8674846b84a59
Reviewed-by: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent 3487b538
......@@ -57,13 +57,24 @@ void QDeclarativeOutputParser::processOutput(const QString &output)
const QString msg = m_buffer.left(nlIndex);
m_buffer = m_buffer.right(m_buffer.size() - nlIndex - 1);
static const QString qddserver = QLatin1String("QDeclarativeDebugServer: ");
// used in Qt4
static const QString qddserver4 = QLatin1String("QDeclarativeDebugServer: ");
// used in Qt5
static const QString qddserver5 = QLatin1String("QML Debugger: ");
const int index = msg.indexOf(qddserver);
QString status;
int index = msg.indexOf(qddserver4);
if (index != -1) {
QString status = msg;
status.remove(0, index + qddserver.length()); // chop of 'QDeclarativeDebugServer: '
status = msg;
status.remove(0, index + qddserver4.length()); // chop of 'QDeclarativeDebugServer: '
} else {
index = msg.indexOf(qddserver5);
if (index != -1) {
status = msg;
status.remove(0, index + qddserver5.length()); // chop of 'QML Debugger: '
}
}
if (!status.isEmpty()) {
static QString waitingForConnection = QLatin1String(Constants::STR_WAITING_FOR_CONNECTION);
static QString unableToListen = QLatin1String(Constants::STR_UNABLE_TO_LISTEN);
static QString debuggingNotEnabled = QLatin1String(Constants::STR_IGNORING_DEBUGGER);
......
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