[Development] Abandoning the container changes

Marc Mutz marc.mutz at kdab.com
Mon Jul 23 12:58:38 CEST 2012


On Friday July 20 2012, Olivier Goffart wrote:
> 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.

Of course... how embarrassing.. :)

> 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.

Sounds like a plan, yes.

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions



More information about the Development mailing list