Completions: move continuations upper in proposals list.

Since fuzzy completions are allowed, the lexicographically first proposal
is not necessarily most relevant. The patch modifies sorting of proposals
so that the exact match and continuations go first, and fuzzy completions
follow.

Moreover, being a continuation seem to be a more important characteristic
of a proposal, than being it a function argument or keyword etc. That's why
the check for continuation is placed before the check for order.

Task-number: QTCREATORBUG-8737
Task-number: QTCREATORBUG-9236
Change-Id: I89aae9d2ce6bfa59af7c2f75e6f3af00212008ca
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alexey Zhondin <lexxmark.dev@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Alexey Semenko
2013-08-28 01:02:26 +04:00
committed by Nikolai Kosjar
parent adee8336bb
commit da4c4b80f3
8 changed files with 80 additions and 11 deletions

View File

@@ -150,6 +150,8 @@ private slots:
void test_completion_recursive_using_declarations1();
void test_completion_recursive_using_declarations2();
void test_completion_recursive_using_typedef_declarations();
void test_completion_prefix_first_QTCREATORBUG_8737();
void test_completion_prefix_first_QTCREATORBUG_9236();
void test_completion_class_declaration_inside_function_or_block_QTCREATORBUG3620();
void test_completion_class_declaration_inside_function_or_block_QTCREATORBUG3620_data();