From a3bfda06f65b734dc35837e7992889de3d256e4a Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 22 Jul 2016 21:46:00 +0000 Subject: [PATCH] say goodbye to QVariant(Qt::GlobalColor) Signed-off-by: Ivailo Monev --- src/core/kernel/qvariant.cpp | 14 -------------- src/core/kernel/qvariant.h | 1 - src/gui/kernel/qguivariant.cpp | 8 -------- 3 files changed, 23 deletions(-) diff --git a/src/core/kernel/qvariant.cpp b/src/core/kernel/qvariant.cpp index 8d45019c1..e0c6ff8e6 100644 --- a/src/core/kernel/qvariant.cpp +++ b/src/core/kernel/qvariant.cpp @@ -1759,19 +1759,6 @@ QVariant::QVariant(const char *val) Constructs a new variant with the regexp value \a regExp. */ -/*! \since 4.2 - \fn QVariant::QVariant(Qt::GlobalColor color) - - Constructs a new variant of type QVariant::Color and initializes - it with \a color. - - This is a convenience constructor that allows \c{QVariant(Qt::blue);} - to create a valid QVariant storing a QColor. - - Note: This constructor will assert if the application does not link - to the Qt GUI library. - */ - QVariant::QVariant(Type type) { create(type, 0); } QVariant::QVariant(int typeOrUserType, const void *copy) @@ -1857,7 +1844,6 @@ QVariant::QVariant(const QJsonObject &jsonObject) { d.is_null = false; d.type = QVariant::QVariant(const QJsonArray &jsonArray) { d.is_null = false; d.type = JsonArray; v_construct(&d, jsonArray); } QVariant::QVariant(const QJsonDocument &jsonDocument) { d.is_null = false; d.type = JsonDocument; v_construct(&d, jsonDocument); } #endif -QVariant::QVariant(Qt::GlobalColor color) { create(62, &color); } /*! Returns the storage type of the value stored in the variant. diff --git a/src/core/kernel/qvariant.h b/src/core/kernel/qvariant.h index 763afa28a..005a0c30f 100644 --- a/src/core/kernel/qvariant.h +++ b/src/core/kernel/qvariant.h @@ -210,7 +210,6 @@ class Q_CORE_EXPORT QVariant #ifndef QT_BOOTSTRAPPED QVariant(const QEasingCurve &easing); #endif - QVariant(Qt::GlobalColor color); QVariant& operator=(const QVariant &other); #ifdef Q_COMPILER_RVALUE_REFS diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp index a4ab97dc8..088f64468 100644 --- a/src/gui/kernel/qguivariant.cpp +++ b/src/gui/kernel/qguivariant.cpp @@ -136,14 +136,6 @@ static void construct(QVariant::Private *x, const void *copy) v_construct(x, copy); break; #endif - case 62: { - // small 'trick' to let a QVariant(Qt::blue) create a variant - // of type QColor - x->type = QVariant::Color; - QColor color(*reinterpret_cast(copy)); - v_construct(x, &color); - break; - } #ifndef QT_NO_MATRIX4X4 case QVariant::Matrix4x4: v_construct(x, copy); -- 2.11.0