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

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



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 redhat com


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