Commit ac9c649b authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Aurindam Jana
Browse files

QmlDebug: Compile with QT_NO_CAST_FROM_ASCII



Change-Id: I58dfa1575ff9a64325281e66418a3b5c2c1b81ee
Reviewed-by: default avatarAurindam Jana <aurindam.jana@digia.com>
parent d719eebf
......@@ -83,12 +83,12 @@ public:
static inline QString toString(Message message)
{
return staticMetaObject.enumerator(0).valueToKey(message);
return QString::fromUtf8(staticMetaObject.enumerator(0).valueToKey(message));
}
static inline QString toString(Tool tool)
{
return staticMetaObject.enumerator(1).valueToKey(tool);
return QString::fromUtf8(staticMetaObject.enumerator(1).valueToKey(tool));
}
};
......@@ -153,7 +153,7 @@ void DeclarativeToolsClient::messageReceived(const QByteArray &message)
int objectCount;
ds >> objectCount;
log(LogReceive, type, QString("%1 [list of debug ids]").arg(objectCount));
log(LogReceive, type, QString::fromLatin1("%1 [list of debug ids]").arg(objectCount));
m_currentDebugIds.clear();
......@@ -255,7 +255,7 @@ void DeclarativeToolsClient::setCurrentObjects(const QList<int> &debugIds)
ds << id;
}
log(LogSend, cmd, QString("%1 [list of ids]").arg(debugIds.length()));
log(LogSend, cmd, QString::fromLatin1("%1 [list of ids]").arg(debugIds.length()));
sendMessage(message);
}
......@@ -283,7 +283,7 @@ void DeclarativeToolsClient::setObjectIdList(
}
log(LogSend, cmd,
QString("%1 %2 [list of debug / object ids]").arg(debugIds.length()));
QString::fromLatin1("%1 %2 [list of debug / object ids]").arg(debugIds.length()));
sendMessage(message);
}
......@@ -464,9 +464,9 @@ void DeclarativeToolsClient::createQmlObject(const QString &qmlText,
<< filename
<< order;
log(LogSend, cmd, QString("%1 %2 [%3] %4").arg(qmlText,
log(LogSend, cmd, QString::fromLatin1("%1 %2 [%3] %4").arg(qmlText,
QString::number(parentDebugId),
imports.join(","), filename));
imports.join(QLatin1String(",")), filename));
sendMessage(message);
}
......@@ -498,7 +498,7 @@ void DeclarativeToolsClient::reparentQmlObject(int debugId, int newParent)
<< debugId
<< newParent;
log(LogSend, cmd, QString("%1 %2").arg(QString::number(debugId),
log(LogSend, cmd, QString::fromLatin1("%1 %2").arg(QString::number(debugId),
QString::number(newParent)));
sendMessage(message);
......
......@@ -5,6 +5,8 @@ QT += network
include(../../qtcreatorlibrary.pri)
include(qmldebug-lib.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
OTHER_FILES += \
qmldebug.pri
......@@ -5,7 +5,8 @@ QtcLibrary {
name: "QmlDebug"
cpp.defines: base.concat([
"QMLDEBUG_LIB"
"QMLDEBUG_LIB",
"QT_NO_CAST_FROM_ASCII"
])
Depends { name: "cpp" }
......
......@@ -112,7 +112,7 @@ void QmlToolsClient::messageReceived(const QByteArray &message)
}
}
log(LogReceive, type + ':' + event,
QString("[%1]").arg(debugIdStrings.join(QLatin1String(","))));
QString::fromLatin1("[%1]").arg(debugIdStrings.join(QLatin1String(","))));
emit currentObjectsChanged(m_currentDebugIds);
}
} else {
......@@ -140,7 +140,7 @@ void QmlToolsClient::setCurrentObjects(const QList<int> &debugIds)
ds << QByteArray(REQUEST) << m_requestId++
<< QByteArray(SELECT) << m_currentDebugIds;
log(LogSend, SELECT, QString("%1 [list of ids]").arg(debugIds.length()));
log(LogSend, SELECT, QString::fromLatin1("%1 [list of ids]").arg(debugIds.length()));
sendMessage(message);
}
......@@ -275,9 +275,9 @@ void QmlToolsClient::createQmlObject(const QString &qmlText,
<< filename
<< order;
log(LogSend, CREATE_OBJECT, QString("%1 %2 [%3] %4").arg(qmlText,
log(LogSend, CREATE_OBJECT, QString::fromLatin1("%1 %2 [%3] %4").arg(qmlText,
QString::number(parentDebugId),
imports.join(","), filename));
imports.join(QLatin1String(",")), filename));
sendMessage(message);
}
......@@ -306,7 +306,7 @@ void QmlToolsClient::reparentQmlObject(int debugId, int newParent)
ds << QByteArray(REQUEST) << m_requestId++
<< QByteArray(MOVE_OBJECT) << debugId << newParent;
log(LogSend, MOVE_OBJECT, QString("%1 %2").arg(QString::number(debugId),
log(LogSend, MOVE_OBJECT, QString::fromLatin1("%1 %2").arg(QString::number(debugId),
QString::number(newParent)));
sendMessage(message);
......@@ -339,7 +339,7 @@ void QmlToolsClient::log(LogDirection direction,
else
msg += QLatin1String("receiving ");
msg += message;
msg += QLatin1String(message);
msg += QLatin1Char(' ');
msg += extra;
emit logActivity(name(), msg);
......
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