Renaming of virtual functions
Carlos Licea
carlos_licea at hotmail.com
Fri Oct 2 23:54:57 UTC 2009
Dear list,
I've just found a problem, consider the following classes:
class A
{
virtual someFunction();
}
class B : public A
{
virtual someFunction();
}
Now I tried to rename B::someFunction() because the way it was being done was
more accurate for an internal function... but the change propagated to the
base class, so in the end I had something like this:
class A
{
virtual someFunctionPrivate();
}
class B : public A
{
virtual someFunctionPrivate();
}
When I expected
class A
{
virtual someFunction();
}
class B : public A
{
virtual someFunctionPrivate();
}
So that I could later reimplement someFunction properly...
I think that the current behavior is kind of unexpected, at least for me; I
don't think that changing the derived class should change the base class... at
least not by default.
I think that asking the user if he wants to propagate the changes from a
derived/base class to a derived/base class when renaming a virtual function is
the proper thing to do. What do you think?
Carlos
More information about the KDevelop-devel
mailing list