aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppeditortestcase.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/cppeditortestcase.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/cppeditortestcase.cpp')
-rw-r--r--src/plugins/cppeditor/cppeditortestcase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppeditortestcase.cpp b/src/plugins/cppeditor/cppeditortestcase.cpp
index ea24125488b..0f7fa328076 100644
--- a/src/plugins/cppeditor/cppeditortestcase.cpp
+++ b/src/plugins/cppeditor/cppeditortestcase.cpp
@@ -43,7 +43,7 @@ namespace Tests {
TestDocument::TestDocument(const QByteArray &fileName, const QByteArray &source, char cursorMarker)
: CppTools::Tests::TestDocument(fileName, source, cursorMarker)
- , m_cursorPosition(source.indexOf(m_cursorMarker))
+ , m_cursorPosition(m_source.indexOf(QLatin1Char(m_cursorMarker)))
, m_editor(0)
, m_editorWidget(0)
{