[Development] QValidator in QtCore

Matt Broadstone mbroadst at gmail.com
Mon Sep 23 01:00:45 CEST 2013


On Sun, Sep 22, 2013 at 5:28 PM, Olivier Goffart <olivier at woboq.com> 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)
>
>
I've sort of revised my stance here: I'm more on the side of proposing a
useful alternative than moving it at this point. Not only should QValidator
be in QtCore, it also is needlessly defined as a QObject. Beyond that, it
only validates strings (rather than QVariants), so I think through and
through a better alternative could be provided. I'm working on something
now (well its done but I'm mostly massaging the api and seeing how it feels
to use in my code), I'll put it up for review when it's complete.

Matt


> --
> Olivier
>
> Woboq - Qt services and support - http://woboq.com - http://code.woboq.org
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130922/4e1f5bc9/attachment.html>


More information about the Development mailing list