[Development] Qt 5.5.0 header diff: QtCore.diff

Olivier Goffart olivier at woboq.com
Mon Jun 8 11:28:48 CEST 2015


On Saturday 6. June 2015 11:17:30 Thiago Macieira wrote:
> On Friday 05 June 2015 10:11:28 Frederik Gladhorn wrote:
> 
> 
> I can't tell if the qmetatype.h template magic is binary compatible or not.
> As evidenced by a recent push [1] about the IsGadget flag, it isn't.
> 
> I'm going to put a stop to this. qmetatype.h template magic is now frozen as
> of Qt 5.5 and until Qt 6.0, aside from bugfixes or pure additions that do
> not modify existing template classes.
> 
> [1] https://codereview.qt-project.org/113652

The problem here is the qFail. We can just remove the qFail in this case (what 
the patch does) and we will be fine.

There is no reason to stop improving qmetatype.

> >      Q_DECLARE_FLAGS(LoadHints, LoadHint)
> > 
> > +    Q_FLAG(LoadHint)
> > +    Q_FLAG(LoadHints)
> 
> Do we need both Q_FLAG? That looks like a mistake.


The code was just moved from Q_FLAGS to Q_FLAG.  Both were there before and I 
kept it like that.

It cannot really be changed otherwise code like 
staticQtMetaObject.indexOfEnumerator("LoadHint") or 
staticQtMetaObject.indexOfEnumerator("LoadHints") will break.

The use of Q_ENUMS and Q_FLAGS with QFlags types is not really consistent 
within Qt.  

-- 
Olivier 

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




More information about the Development mailing list