forked from qt-creator/qt-creator
QmlDesigner: Do not escape "\" for unicode chars
Task-number: QTCREATORBUG-12616 Change-Id: If8cac8d35cb97f59e12d1609f808dd639f93f315 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
09b176040d
commit
f9f74566a7
@@ -273,6 +273,9 @@ QString QmlTextGenerator::escape(const QString &value)
|
||||
{
|
||||
QString result = value;
|
||||
|
||||
if (value.count() == 6 && value.startsWith("\\u")) //Do not dobule escape unicode chars
|
||||
return result;
|
||||
|
||||
result.replace(QStringLiteral("\\"), QStringLiteral("\\\\"));
|
||||
|
||||
result.replace(QStringLiteral("\""), QStringLiteral("\\\""));
|
||||
|
||||
Reference in New Issue
Block a user