From ff55d64f6788563a6ef9da2b6d0b6dc23bb936aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Fri, 13 Apr 2012 14:52:34 +0200 Subject: Remove QVariant constructor taking Qt::GlobalColor. The constructor is wrong, it creates instance of QVariant encapsulating a QColor instance. QVariant should not implicitly convert data, never. Change-Id: Idc794ecdecb42d8b53fee3f993bf51ddd43f595d Reviewed-by: Lars Knoll --- src/corelib/kernel/qvariant.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/corelib/kernel/qvariant.cpp') diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 179a33ca6e..10b86bcb48 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1349,19 +1349,6 @@ QVariant::QVariant(const char *val) Constructs a new variant with the regular expression value \a re. */ -/*! \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 typeId, const void *copy) @@ -1443,7 +1430,6 @@ QVariant::QVariant(const QRegExp ®Exp) { d.is_null = false; d.type = RegExp; QVariant::QVariant(const QRegularExpression &re) { d.is_null = false; d.type = QMetaType::QRegularExpression; v_construct(&d, re); } #endif // QT_BOOTSTRAPPED #endif // QT_NO_REGEXP -QVariant::QVariant(Qt::GlobalColor color) { create(62, &color); } /*! Returns the storage type of the value stored in the variant. -- cgit v1.2.3