forked from qt-creator/qt-creator
Clang: Adapt priorities for the same method/constructor overloads
CXXMethod and CXXConstructor may have different priorities depending ony their origin and attributes. To keep them together in the sorted list we adapt their priorities to have the same value if their names match. To continue keeping ClassCompletion before ConstructorCompletion change the order of the completion kinds for the sort purposes. Change-Id: I36efe5d5dbaa77d604a54b1dafe07d67f44db4c9 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -113,8 +113,7 @@ static bool isTheSameFunctionOverload(const CodeCompletion &completion,
|
||||
const QString &name,
|
||||
ClangAssistProposalItem *lastItem)
|
||||
{
|
||||
return completion.hasParameters
|
||||
&& completion.completionKind == lastItem->firstCodeCompletion().completionKind
|
||||
return completion.completionKind == lastItem->firstCodeCompletion().completionKind
|
||||
&& lastItem->text() == name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user