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:
Thomas Hartmann
2017-01-20 10:36:43 +01:00
committed by Tim Jenssen
parent 09b176040d
commit f9f74566a7
3 changed files with 35 additions and 0 deletions

View File

@@ -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("\\\""));