Re: Aw: Re: wy signal handler could not be override



2013/3/29 Yann Leydier <yann leydier info>
In C++, declaring the method as "virtual" is needed if you want to override anything by polymorphism.

In this case it isn't. The 'virtual' keyword is only required in the
base class. In derived classes, if the function name matches a virtual
function in a base class, the function will be treated as an override
regardless of whether it is declared with the 'virtual' keyword. If
the function name matches but not its argument type signature, the
compiler will emit a warning about a hidden virtual function.

My guess is that goocanvasmm does not actually connect the base class
virtual function to the signal handler. I can't find anything of the
sort in item.ccg in goocanvasmm sources, but then I'm not really sure
what is the full expansion of the _WRAP_SIGNAL() macro.

Regards, Krzysztof


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]