Details
-
Bug
-
Resolution: Cannot Reproduce
-
P3: Somewhat important
-
None
-
Qt Creator 2.7.0-rc, Qt Creator 2.8.0-beta, Qt Creator 4.7.0-beta1
Description
First we define these classes:
namespace BaseNamespace {
struct BaseClass1 { };
struct BaseClass2 { virtual void func(const BaseClass1 &) {} };
}
Now we derive from BaseClass2 in a different namespace:
namespace DerivedNamespace { struct DerivedClass : public BaseNamespace::BaseClass2 { void func(const BaseClass1 &); }; }
Issue 1: When auto-completing the parameter type of func in DerivedClass, the base class namespace is not added, so the auto-completed declaration is not syntactically correct.
Now let's assume the definition of DerivedClass is in a header file, and we have a corresponding cpp file into which we put the definition of the overridden func:
void DerivedNamespace::DerivedClass::func(const BaseClass1 &) { }
Issue 2: If we try to add the correct namespace to the parameter type in the header file, the light bulb indicating the availability of refactoring operations will appear only until we type the first colon of the "::" separator and then go away, so Qt Creator will not offer to add the namespace also in the cpp file, forcing the user to do this by hand as well.