Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
Qt Creator 4.8.0, Qt Creator 4.8.1
Description
When defining a template method inside a template class, and such class is defined in a namespace, the template parameters belonging to the class are reported in the same level as namespaces in the outline panel, and the highlighting is wrong.
Please use the following test code:
hallo.hpp:
namespace MyNameSpace { template< typename A, typename B > class MyClass { A _a; B _b; public: explicit MyClass(A a, B b); void myMethod(); private: template< typename C > void myF(C c); }; }
hallo.cpp:
#include "hallo.hpp"
namespace MyNameSpace
{
template< typename A, typename B >
MyClass< A, B >::MyClass(A a, B b) :
_a(a),
_b(b)
{
}
template< typename A, typename B >
template< typename C >
void MyClass< A, B >::myF(C)
{
}
template< typename A, typename B >
void MyClass< A, B >::myMethod()
{
}
}
Regarding myF, the outline then contains wrong items, and the highlighting of A/B is wrong (compared to C). Also the symbol lookup combobox contains invalid items (please see the enclosed screenshot).