Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 1.2.90
-
None
-
213316f2a7feb2bb62fb281a975d2b0d1d03b08b
Description
Platform details
Ubuntu, Qt 4.6 TP1, Qt Creator 1.2.91 (compiled from git on 30/09/2009)
Compilers
GCC
Compiler details
4.4
Subject
Code completion Problem with templates and operators
Steps to reproduce / test case
#include <iostream> using std::cout; using std::endl; class TestClass { public: void printSomething(); }; void TestClass::printSomething() { cout << "Hello, World!" << endl; } template<typename T> class Ptr { private: T* m_Pointer; public: Ptr( T *instance ) { m_Pointer = instance; } T* operator->() { return m_Pointer; } }; class PtrTestClass { private: TestClass *m_Pointer; public: PtrTestClass( TestClass *instance ) { m_Pointer = instance; } TestClass* operator->() { return m_Pointer; } }; int main( int argc, char **argv ) { TestClass *t = new TestClass(); Ptr<TestClass> p( t ); // No constructor code completion is shown p->printSomething(); // No class help is shown after -> PtrTestClass pt( t ); // Code completion gives hint about constructor pt->printSomething(); // Also no code completion after -> }
More information
Seems like the code completion has problems with:
*) Templates
*) Overloaded "->" Operator
The example above demonstrates the problem.