From bea8fc8e6a9dc71110a90affc34361e96714631f Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 5 May 2014 11:43:24 -0400 Subject: Cpp{Tools,Editor}: Expect UTF-8 encoded literals Change-Id: I9843c4163aad3fa3f1bfa33060c76328fc2dc25a Reviewed-by: Erik Verbruggen --- src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp') diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp b/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp index 4fd9eae00d..469173a27a 100644 --- a/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp +++ b/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp @@ -89,7 +89,7 @@ public: // Write source to temprorary file const QString filePath = QDir::tempPath() + QLatin1String("/file.h"); Document::Ptr document = Document::create(filePath); - QVERIFY(writeFile(document->fileName(), sourceWithoutCursorMarker.toLatin1())); + QVERIFY(writeFile(document->fileName(), sourceWithoutCursorMarker.toUtf8())); // Preprocess source Environment env; @@ -145,7 +145,7 @@ void CppToolsPlugin::test_format_pointerdeclaration_in_simpledeclarations() QFETCH(QString, source); QFETCH(QString, reformattedSource); - PointerDeclarationFormatterTestCase(source.toLatin1(), + PointerDeclarationFormatterTestCase(source.toUtf8(), reformattedSource, Document::ParseDeclaration, PointerDeclarationFormatter::RespectCursor); @@ -369,7 +369,7 @@ void CppToolsPlugin::test_format_pointerdeclaration_in_controlflowstatements() QFETCH(QString, source); QFETCH(QString, reformattedSource); - PointerDeclarationFormatterTestCase(source.toLatin1(), + PointerDeclarationFormatterTestCase(source.toUtf8(), reformattedSource, Document::ParseStatement, PointerDeclarationFormatter::RespectCursor); @@ -444,7 +444,7 @@ void CppToolsPlugin::test_format_pointerdeclaration_multiple_declarators() QFETCH(QString, source); QFETCH(QString, reformattedSource); - PointerDeclarationFormatterTestCase(source.toLatin1(), + PointerDeclarationFormatterTestCase(source.toUtf8(), reformattedSource, Document::ParseDeclaration, PointerDeclarationFormatter::RespectCursor); @@ -499,7 +499,7 @@ void CppToolsPlugin::test_format_pointerdeclaration_multiple_matches() QFETCH(QString, source); QFETCH(QString, reformattedSource); - PointerDeclarationFormatterTestCase(source.toLatin1(), + PointerDeclarationFormatterTestCase(source.toUtf8(), reformattedSource, Document::ParseTranlationUnit, PointerDeclarationFormatter::IgnoreCursor); @@ -582,7 +582,7 @@ void CppToolsPlugin::test_format_pointerdeclaration_macros() QFETCH(QString, source); QFETCH(QString, reformattedSource); - PointerDeclarationFormatterTestCase(source.toLatin1(), + PointerDeclarationFormatterTestCase(source.toUtf8(), reformattedSource, Document::ParseTranlationUnit, PointerDeclarationFormatter::RespectCursor); -- cgit v1.2.1