[Development] QValidator in QtCore

Olivier Goffart olivier at woboq.com
Mon Sep 23 09:45:51 CEST 2013


On Sunday 22 September 2013 16:25:25 Thiago Macieira wrote:
> On domingo, 22 de setembro de 2013 23:28:48, Olivier Goffart wrote:
> > On Saturday 21 September 2013 19:13:41 Thiago Macieira wrote:
> > > On domingo, 22 de setembro de 2013 02:21:40, Konstantin Ritt wrote:
> > > > I remember some classes were moved from QtXml to QtCore without
> > > > breaking
> > > > the compatibility. Am I wrong?
> > > 
> > > The moving did break compatibility. Which is why for Mac 32-bit builds,
> > > the
> > > classes aren't moved at all: we added new classes to QtCore and
> > > typedef'ed.
> > > 
> > > That only broke source compatibility because you couldn't
> > > forward-declare
> > > those classes.
> > 
> > The name change was done using #define QXmlStreamWriter
> > QCoreXmlStreamWriter There is a comment saying it was done using typedef,
> > but apparently it was not.
> > http://code.woboq.org/kde/qt4/src/corelib/xml/qxmlstream.h.html So
> > compatibility was not broken (but there was ugly macro)
> > 
> > I think this prove that this is possible.
> > 
> > (And for forward declaration, i think we should have header with them and
> > forbid them)
> 
> Right now, we allow them and I don't like the idea of forbidding forward
> declarations.
> 
> Therefore, doing anything that breaks them is source-incompatible and should
> not be permitted until Qt 6.

Yes, but as stated, using macro as it was done for QXmlStreamWriter does not 
break source or binary compatibility. Hence it is possible to move a class 
from one module to a lower module.

-- 
Olivier

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





More information about the Development mailing list