diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2012-04-13 14:52:34 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-19 10:09:39 +0200 |
commit | ff55d64f6788563a6ef9da2b6d0b6dc23bb936aa (patch) | |
tree | 127307cf68730ea4b133c4563c9048cf9750c65f /src/gui/kernel/qguivariant.cpp | |
parent | 10c88faf79de45f86a0826d104e202b4e12eba6b (diff) |
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 <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui/kernel/qguivariant.cpp')
-rw-r--r-- | src/gui/kernel/qguivariant.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
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); } |