Commit 7c4eb002 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Fixed corner cases for comparison.

Reviewed-by: ckamm
parent d8535a23
......@@ -941,7 +941,11 @@ void CodeCompletion::updateSnippets()
static bool qmlCompletionItemLessThan(const TextEditor::CompletionItem &l, const TextEditor::CompletionItem &r)
{
if (l.text.at(0).isUpper() && r.text.at(0).isLower())
if (l.text.isEmpty())
return true;
else if (r.text.isEmpty())
return false;
else if (l.text.at(0).isUpper() && r.text.at(0).isLower())
return false;
else if (l.text.at(0).isLower() && r.text.at(0).isUpper())
return true;
......
Markdown is supported
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