Commit 18e0777e authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Sort lower case items before upper case items in QML/JS completion.

Done with: Thorbjorn
parent 7b462f1b
......@@ -852,13 +852,23 @@ void QmlCodeCompletion::updateSnippets()
static bool qmlCompletionItemLessThan(const TextEditor::CompletionItem &l, const TextEditor::CompletionItem &r)
if ( &&
return false;
else if ( &&
return true;
return l.text < r.text;
QList<TextEditor::CompletionItem> QmlCodeCompletion::getCompletions()
QList<TextEditor::CompletionItem> completionItems;
qStableSort(completionItems.begin(), completionItems.end(), completionItemLessThan);
qStableSort(completionItems.begin(), completionItems.end(), qmlCompletionItemLessThan);
// Remove duplicates
QString lastKey;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment