diff options
author | Henning Gruendl <henning.gruendl@qt.io> | 2020-07-16 13:05:03 +0200 |
---|---|---|
committer | Henning Gründl <henning.gruendl@qt.io> | 2020-08-03 12:51:48 +0000 |
commit | bb79a7fb90cc5e008c3aaf347eb6c43352c541b5 (patch) | |
tree | f2669de2a1b3222c6667f5e005dafc016a54f435 | |
parent | 9d6f69abe9d08f4abdce0dbd0864ad79f5fc74d6 (diff) |
QmlDesigner: Fix duplicate items auto completion
Fix duplicate items in the auto completion result by trimming the
strings. Otherwise items like "Item " and "Item" will both show up in
the result.
Task-number: QDS-2561
Change-Id: I0244fed19cf358d5c72ee169cd8ffa13672edce2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r-- | src/plugins/qmljseditor/qmljscompletionassist.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmljseditor/qmljscompletionassist.cpp b/src/plugins/qmljseditor/qmljscompletionassist.cpp index 5cfa28c609..0f7fdf0a88 100644 --- a/src/plugins/qmljseditor/qmljscompletionassist.cpp +++ b/src/plugins/qmljseditor/qmljscompletionassist.cpp @@ -355,7 +355,7 @@ QStringList qmlJSAutoComplete(QTextDocument *textDocument, } for (int i = 0; i < model->size(); ++i) - list.append(proposal->model()->text(i)); + list.append(proposal->model()->text(i).trimmed()); list.append(prefix); } |