diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-08-31 17:08:04 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-03 11:05:49 +0200 |
commit | dcf4d152b5395da405cda174dbf007f904a8353b (patch) | |
tree | b170d2f1f1f30e96bd6ace0e72af104ab80bed5d /src | |
parent | d6d7aebd03e0fdaf8072b8ea99ed1d8ca07908af (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 7 |
2 files changed, 4 insertions, 5 deletions
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, |