Redefinition of QVariant::Type.
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>
Mon, 28 Nov 2011 09:33:50 +0000 (10:33 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 29 Nov 2011 13:00:01 +0000 (14:00 +0100)
QVariant::Type is redundant, it copies QMetaType::Type enum. In long
term it might be removed completely, but it wouldn't be a source
compatible change.

Change-Id: Ibe79ca0ab43918b4cf767cd7a5040f865abbf03f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/kernel/qvariant.h

index ea333c1..e082659 100644 (file)
@@ -93,66 +93,64 @@ class Q_CORE_EXPORT QVariant
 {
  public:
     enum Type {
-        Invalid = 0,
-
-        Bool = 1,
-        Int = 2,
-        UInt = 3,
-        LongLong = 4,
-        ULongLong = 5,
-        Double = 6,
-        Char = 7,
-        Map = 8,
-        List = 9,
-        String = 10,
-        StringList = 11,
-        ByteArray = 12,
-        BitArray = 13,
-        Date = 14,
-        Time = 15,
-        DateTime = 16,
-        Url = 17,
-        Locale = 18,
-        Rect = 19,
-        RectF = 20,
-        Size = 21,
-        SizeF = 22,
-        Line = 23,
-        LineF = 24,
-        Point = 25,
-        PointF = 26,
-        RegExp = 27,
-        Hash = 28,
-        EasingCurve = 29,
-        LastCoreType = EasingCurve,
-
-        // value 62 is internally reserved
-        Font = 64,
-        Pixmap = 65,
-        Brush = 66,
-        Color = 67,
-        Palette = 68,
-        Image = 69,
-        Polygon = 70,
-        Region = 71,
-        Bitmap = 72,
-        Cursor = 73,
-        KeySequence = 74,
-        Pen = 75,
-        TextLength = 76,
-        TextFormat = 77,
-        Matrix = 78,
-        Transform = 79,
-        Matrix4x4 = 80,
-        Vector2D = 81,
-        Vector3D = 82,
-        Vector4D = 83,
-        Quaternion = 84,
-        PolygonF = 85,
-        LastGuiType = PolygonF,
-
-        Icon = 120,
-        SizePolicy = 121,
+        Invalid = QMetaType::Void,
+        Bool = QMetaType::Bool,
+        Int = QMetaType::Int,
+        UInt = QMetaType::UInt,
+        LongLong = QMetaType::LongLong,
+        ULongLong = QMetaType::ULongLong,
+        Double = QMetaType::Double,
+        Char = QMetaType::QChar,
+        Map = QMetaType::QVariantMap,
+        List = QMetaType::QVariantList,
+        String = QMetaType::QString,
+        StringList = QMetaType::QStringList,
+        ByteArray = QMetaType::QByteArray,
+        BitArray = QMetaType::QBitArray,
+        Date = QMetaType::QDate,
+        Time = QMetaType::QTime,
+        DateTime = QMetaType::QDateTime,
+        Url = QMetaType::QUrl,
+        Locale = QMetaType::QLocale,
+        Rect = QMetaType::QRect,
+        RectF = QMetaType::QRectF,
+        Size = QMetaType::QSize,
+        SizeF = QMetaType::QSizeF,
+        Line = QMetaType::QLine,
+        LineF = QMetaType::QLineF,
+        Point = QMetaType::QPoint,
+        PointF = QMetaType::QPointF,
+        RegExp = QMetaType::QRegExp,
+        Hash = QMetaType::QVariantHash,
+        EasingCurve = QMetaType::QEasingCurve,
+        LastCoreType = QMetaType::LastCoreType,
+
+        Font = QMetaType::QFont,
+        Pixmap = QMetaType::QPixmap,
+        Brush = QMetaType::QBrush,
+        Color = QMetaType::QColor,
+        Palette = QMetaType::QPalette,
+        Image = QMetaType::QImage,
+        Polygon = QMetaType::QPolygon,
+        Region = QMetaType::QRegion,
+        Bitmap = QMetaType::QBitmap,
+        Cursor = QMetaType::QCursor,
+        KeySequence = QMetaType::QKeySequence,
+        Pen = QMetaType::QPen,
+        TextLength = QMetaType::QTextLength,
+        TextFormat = QMetaType::QTextFormat,
+        Matrix = QMetaType::QMatrix,
+        Transform = QMetaType::QTransform,
+        Matrix4x4 = QMetaType::QMatrix4x4,
+        Vector2D = QMetaType::QVector2D,
+        Vector3D = QMetaType::QVector3D,
+        Vector4D = QMetaType::QVector4D,
+        Quaternion = QMetaType::QQuaternion,
+        PolygonF = QMetaType::QPolygonF,
+        LastGuiType = QMetaType::LastGuiType,
+
+        Icon = QMetaType::QIcon,
+        SizePolicy = QMetaType::QSizePolicy,
 
         UserType = 127,
         LastType = 0xffffffff // need this so that gcc >= 3.4 allocates 32 bits for Type