[virt-tools-list] [PATCH virt-viewer] display: Do not override size-allocate handler

Eduardo Lima (Etrunko) etrunko at redhat.com
Wed Aug 10 12:34:16 UTC 2016


On 08/09/2016 12:44 PM, Christophe Fergeau wrote:
> On Tue, Aug 09, 2016 at 05:17:31PM +0200, Pavel Grunt wrote:
>> Just connect to the signal
> 
> I'm tempted to ask "why?". I think it's recommended (more efficient) to
> just override the vfunc directly when you can (ie when you derive a new
> widget) rather than connecting to a signal.
> 

This is a gray area to me, I don't remember exactly which cases, but
sometimes overriding the virtual function will produce weird behaviors,
even though the parent class function is called. Meanwhile connecting to
the signal will work fine.

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com




More information about the virt-tools-list mailing list