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>
This commit is contained in:
Stephen Kelly 2012-08-31 17:08:04 +02:00 committed by Qt by Nokia
parent d6d7aebd03
commit dcf4d152b5
3 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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,