[Development] Use static qt libraries

Olivier Goffart olivier at woboq.com
Tue Jul 24 16:25:22 CEST 2012


On Tuesday 24 July 2012 13:06:30 Thiago Macieira wrote:
> On terça-feira, 24 de julho de 2012 12.13.27, Thiago Macieira wrote:
> > QFocusHelper
> 
> This is a class defined in a .cpp, deriving from QWidget. So it has virtual
> methods by way of inheritance.
> 
> But since it's in a .cpp, we have to conclude it's a compiler bug.

That class is not instantied: The compiler had no reason to generate a 
destructor or destructor or any type information for a class that never 
exists.
However, doing a static_cast like this class does is an undefined behaviour. 
Qt is broken here.

> > QNetworkConfiguration
> 
> QNetworkConfiguration has no virtual methods, so there should be no TI
> emitted for it. In fact, this is the odd-man out class in this list, so
> much so that I doubt that it's QNetworkConfiguration.
> 
> The OP posted a list output from readelf, which cuts symbols. I'm going to
> guess here that it was either QNetworkConfigurationManager or
> QNetworkConfigurationManagerPrivate. Both classes have virtuals, both are
> exported from QtNetwork and both have their non-inline destructors in a .cpp
> file.

I think it is QNetworkConfigurationPrivate, since its length is 28 and is not 
instentiated in QtNetwork, but only in bearers plugins.


> Any of these three classes indicate a compiler bug.

The question is who needs the typeinfo for those classes? Probably the virtual 
table. But the virtual table has no reason to be emitted for those classes 
because all the virtual method are inline, and the classes are not constructed 
or destructed. 


-- 
Olivier

Woboq - Qt services and support - http://woboq.com




More information about the Development mailing list