forked from qt-creator/qt-creator
Fixed corner cases for comparison.
Reviewed-by: ckamm
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user