From dcf4d152b5395da405cda174dbf007f904a8353b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 31 Aug 2012 17:08:04 +0200 Subject: Change SChar to metatype id 40. This fills the gap left by QWidgetStar, making the sequence between FirstCoreType and LastCoreType contiguous, which some benchmarks assume to be true anyway. Change-Id: I2d5d202b6246a9065fdf77f325a4a04279dbe4b7 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qmetatype.cpp | 2 +- src/corelib/kernel/qmetatype.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 82a3eb6cd6..5379601619 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -604,7 +604,7 @@ int QMetaType::registerNormalizedTypedef(const NS(QByteArray) &normalizedTypeNam bool QMetaType::isRegistered(int type) { // predefined type - if ((type >= FirstCoreType && type <= LastCoreType && type != 40) // 40 is the type that QWidgetStar used to be + if ((type >= FirstCoreType && type <= LastCoreType) || (type >= FirstGuiType && type <= LastGuiType) || (type >= FirstWidgetsType && type <= LastWidgetsType)) { return true; diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index cc4626f5eb..5424b76640 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE F(UShort, 36, ushort) \ F(UChar, 37, uchar) \ F(Float, 38, float) \ - F(SChar, 49, signed char) \ + F(SChar, 40, signed char) \ #define QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(F)\ F(VoidStar, 31, void*) \ @@ -205,7 +205,7 @@ public: QT_FOR_EACH_STATIC_TYPE(QT_DEFINE_METATYPE_ID) FirstCoreType = Bool, - LastCoreType = SChar, + LastCoreType = QJsonDocument, FirstGuiType = QFont, LastGuiType = QPolygonF, FirstWidgetsType = QSizePolicy, @@ -231,8 +231,7 @@ public: QEasingCurve = 29, QUuid = 30, QVariant = 41, QModelIndex = 42, QRegularExpression = 44, QJsonValue = 45, QJsonObject = 46, QJsonArray = 47, QJsonDocument = 48, - SChar = 49, - QObjectStar = 39, + QObjectStar = 39, SChar = 40, Void = 43, QVariantMap = 8, QVariantList = 9, QVariantHash = 28, QFont = 64, QPixmap = 65, QBrush = 66, QColor = 67, QPalette = 68, -- cgit v1.2.3