Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
Qt Creator 8.0.2, Qt Creator 9.0.2, Qt Creator 10.0.0
-
None
Description
I noticed that sometimes following a method does not work for some reason. So I tried to reproduce it in a small example. I finally reproduced it by dereferencing a std::shared_ptr and used the auto keyword. Strangely the autocomplete and tooltips are working fine, but following does not.
I explicitly tried different QtCreator versions (8, 9, 10) and only version 7 worked for me.
Here the example:
#include <iostream> #include <memory> class ATest { public: void someMethod() const { std::cout << "test" << std::endl; } }; int main(int argc, char *argv[]) { const auto a1 = std::make_shared<ATest>(); const auto& a2 = *a1; const ATest& a3 = *a1; a1->someMethod(); // works! a2.someMethod(); // does NOT jump to implementation a3.someMethod(); // works! const auto b1 = new ATest; const auto& b2 = *b1; const ATest& b3 = *b1; b1->someMethod(); // works! b2.someMethod(); // works! b3.someMethod(); // works! return 0; }