summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qvariant.cpp14
-rw-r--r--src/corelib/kernel/qvariant.h1
-rw-r--r--src/gui/kernel/qguivariant.cpp9
3 files changed, 0 insertions, 24 deletions
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 &regExp) { d.is_null = false; d.type = RegExp;
QVariant::QVariant(const QRegularExpression &re) { d.is_null = false; d.type = QMetaType::QRegularExpression; v_construct<QRegularExpression>(&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.
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index fb0e059f45..cd8ac9823d 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -248,7 +248,6 @@ class Q_CORE_EXPORT QVariant
QVariant(const QUrl &url);
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 44dc2d27ca..9d1294d588 100644
--- a/src/gui/kernel/qguivariant.cpp
+++ b/src/gui/kernel/qguivariant.cpp
@@ -108,15 +108,6 @@ struct GuiTypesFilter {
static void construct(QVariant::Private *x, const void *copy)
{
const int type = x->type;
- if (Q_UNLIKELY(type == 62)) {
- // small 'trick' to let a QVariant(Qt::blue) create a variant
- // of type QColor
- // TODO Get rid of this hack.
- x->type = QVariant::Color;
- QColor color(*reinterpret_cast<const Qt::GlobalColor *>(copy));
- v_construct<QColor>(x, &color);
- return;
- }
QVariantConstructor<GuiTypesFilter> constructor(x, copy);
QMetaTypeSwitcher::switcher<void>(constructor, type, 0);
}