summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2017-08-07 14:06:07 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2017-08-07 13:01:39 +0000
commit096253bf6ed14f185f7d4466a332456968c8f556 (patch)
treed7192a8ac65c34639219cbf97ffe785daec03757
parent9092ef7992b685b122c4e593f2ad3ee545c1f0c4 (diff)
downloadqt-creator-096253bf6ed14f185f7d4466a332456968c8f556.tar.gz
CppEditor: Adapt test_autoComplete
...for the case "Insert Open Curly Brackets Into Empty File". This should have been adapted in commit a6aa287720112c70c1363bcb46d55d438fe57eac C++: Fine-tune auto insertion of '}' Change-Id: I895fe5fd0d98f7736cc5506c33f8eb7fafca8f9a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/cppeditor/cppautocompleter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppautocompleter.cpp b/src/plugins/cppeditor/cppautocompleter.cpp
index 2f6a2fc46f..8c1315b973 100644
--- a/src/plugins/cppeditor/cppautocompleter.cpp
+++ b/src/plugins/cppeditor/cppautocompleter.cpp
@@ -249,8 +249,7 @@ void CppEditorPlugin::test_autoComplete_data()
QString expectedText;
int skippedChar = 0;
- // We always expect to get a closing char in an empty file
- if (fc == EmptyFile && isOpeningChar(c))
+ if (fc == EmptyFile && isOpeningChar(c) && c != QLatin1Char('{'))
expectedText = closingChar(c);
if (fc == InBetween) {