Qt Creator - Code completion in implementation file
-
Hi,
It appears that code completion does not work in implementation files unless I specify the fully qualified name of the class for the method in question.
For example, the following will disable all code completion for the current class:
@using a::b::MyClass;
void MyClass::myMethod()
{
// code completion will not work for any instance variables or other methods in class
}@If I remove the using and re-declare the method as
@void a::b::MyClass::myMethod()
{
// code completion works as expected
}@Any reason why the first way is disabled in Qt Creator? I am a C++ newbie, so am not sure if the first method is considered bad style.
Thanks
Rakesh -
"using namespace a::b" imports all symbols of a certain namespace.
"using a::b::MyClass" only imports the name MyClass only.
Using gcc, this results in no difference during compilation as it seems, I don't know if that's some relaxed behavior or if it's standards compliant. A true C++ guru should jump in here for some clarification...