[Development] Abandoning the container changes

Olivier Goffart olivier at woboq.com
Fri Jul 20 11:11:37 CEST 2012


On Thursday 19 July 2012 14:19:36 Marc Mutz wrote:
> On Wednesday July 18 2012, Olivier Goffart wrote:

> > We discussed namespaces long time ago already, and decided not to put Qt
> > in
> > a namespace.
> > The reason is that it breaks source compatibility by breaking all the
> > forward declarations.
> 
> Even with inline namespaces? Then they would have failed to achieve their
> goal to hide the fact that the type is in an inline namespace.

Yes, inline namespace won't help.

If you do:

class QString;
int foo(const QString &);

It creates the symbol _Z3fooRK7QString, which is different from 
_Z3fooRKN3v507QStringE.


The suggested solution is, during Qt5 lifetime, introduce forward-declaration 
headers that declares all the Qt types, and deprecate the use of forward 
declarations.
Then in Qt6 we can finally move in a namespace.

-- 
Olivier

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



More information about the Development mailing list