it seems like all? templated code in qt (QList,QVector,QPair,QMap...) does not get the correct responses from the code completion. When getting code completion for one of these classes, it properly gives a list of all functions, but it does not mark them as functions, same thing happens for qpair's member variables(first,second). Instead the completion thinks they are just text. hitting enter on one of them will just put in the text, but does not act like a method normally acts(adding parenthesis, etc). the detailed completion recognizes the functions and return types etc, but still does not mark them with the function or variable type(gray or purple symbol), and does the same thing as above. Reproducible: Always Steps to Reproduce: 1. declare any templated class on the stack in a function: void foo() { QList<int> bar; } 2. attempt to use the variable and ask for code completion, detailed or not: int i=bar. {ctrl+space) Actual Results: code completion will appear, but it thinks none of the methods are methods and none of the variables are variables. Expected Results: The code completion should detect what are methods and variables and act as such, like it does for every non-templated class( QDir, QString, QDateTime, QFile...)
In fact the code completion is " partially broken" for all template type not just for Qt. Steps to reproduce: template<class T> class Foo { public: void bar(int i); }; Foo<int> foo; foo. {ctrl + space} It's because in ClangCodeCompletionContext::completionItems the clang_getCompletionParent function return "Foo" for "bar" function so the QualifiedIdentifier is "Foo::bar" when the KDevelop::Declaration QualifiedIdentifier is "Foo< T >::bar". As the declaration identifier does not match, KDevelop does not find informations extracted during parse process and create simple completion item with minimal information.
*** Bug 363057 has been marked as a duplicate of this bug. ***
Accidentally marked the wrong bug, please ignore the previous comment.