https://bugs.kde.org/show_bug.cgi?id=375283

            Bug ID: 375283
           Summary: Overriding a method from a template base class is
                    shown as "hiding"
           Product: kdevelop
           Version: 5.1.0
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: nicolas.alva...@gmail.com
  Target Milestone: ---

If I have a template class with a method using template parameters in its
signature, and I override it from a subclass, the tooltip says the method is
"hiding" instead of "overriding" the one in the parent class.

template<typename T>
class Base {
public:
    virtual void foo(T x);
};

class Derived: public Base<int> {
public:
    void foo(int x);
};

The tooltip on Derived::foo says "Hides a function from Base< T >".

If Base is not a template, and Base::foo simply takes int, the tooltip
correctly says "Overrides a function from Base".

Also worth noting, if Derived is also a template, it still says "Hides",
probably because the signatures still don't match (the T template parameter is
not the same on each class):

template<typename T>
class Derived: public Base<T> {
public:
    void foo(T x); //says "Hides"
};

(Real world code example: ContextBuilder::startVisiting in the qmljs plugin)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to