aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppdoxygen_test.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2014-05-08 13:21:42 -0400
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-05-23 14:24:10 +0200
commitcadc4b42bacf959258f7d4b19e93d02c02b63449 (patch)
tree132d8a7cfc02177f89b341ec92a9c856f05afcc8 /src/plugins/cppeditor/cppdoxygen_test.cpp
parent41aa2cb3bdd247898b32941270838ec6348cd755 (diff)
Cpp{Tools,Editor}: Tests: Use QString instead of QByteArray
This is necessary in order to add tests with multi-byte UTF-8 code points. Otherwise the initial and target source code marker positions will be calculated on the QByteArray (test code) but used with a QString (editor document). Change-Id: I108961b13d32912a4d3193cf26eb59f65d296f57 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/cppdoxygen_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppdoxygen_test.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppdoxygen_test.cpp b/src/plugins/cppeditor/cppdoxygen_test.cpp
index d4a2ab9a94..6ee593784a 100644
--- a/src/plugins/cppeditor/cppdoxygen_test.cpp
+++ b/src/plugins/cppeditor/cppdoxygen_test.cpp
@@ -99,8 +99,7 @@ public:
QCOMPARE(QLatin1String(result), QLatin1String(expected));
testDocument.m_editorWidget->undo();
- const QByteArray contentsAfterUndo
- = testDocument.m_editorWidget->document()->toPlainText().toUtf8();
+ const QString contentsAfterUndo = testDocument.m_editorWidget->document()->toPlainText();
QCOMPARE(contentsAfterUndo, testDocument.m_source);
}
};