[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Qt4 constructors
From:       Guillaume Laurent <glaurent () telegraph-road ! org>
Date:       2005-09-06 10:03:31
Message-ID: 431D6973.1030503 () telegraph-road ! org
[Download RAW message or body]

Benjamin Meyer wrote:

>I found http://doc.trolltech.com/4.0/qt4-intro.html, but doesn't go
>into much detail, and simply says: "This makes subclassing easier, at
>the same time as it helps make the Qt library more efficient."
>
>The vast majority of widgets don't need names which saves on memory,
>startup time, and binary size.
>  
>
I agree in principle, but in practice widgets still need to be named in 
some cases, so they still need to have a const char* name member. The 
only improvement I can see is that a widget construction will be a wee 
bit faster because that member will directly be initialized to 0 rather 
than set to a '0' which comes from an argument in the higher level of 
the construction. It does simplify the API though (and raise your hand 
if you've never built a QLabel with its content in its object name :-) ).

-- 
Guillaume
http://telegraph-road.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic