diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2012-05-15 15:40:58 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-18 21:42:58 +0200 |
commit | 8df298665a1e637ab6d26d5fcc447d5502afe31a (patch) | |
tree | 9d36f54835b70b04bd6ae0bc72aee2a8ea659143 /src/widgets/kernel | |
parent | 6c06e14a49773ce5572935864ed6b9be219c6103 (diff) |
Move QIcon metatype handlers back to QtGui
QIcon has been moved back from QWidget to QtGui, so the QIcon QVariant
and QMetaType handler can now be moved back to QtGui.
Also we can give back QIcon its old number, allowing to get rid of some
compatibility hack when unstreaming QVariant
Change-Id: I439d5c2987c06ecd619f394407850f678164afb8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qwidgetsvariant.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/widgets/kernel/qwidgetsvariant.cpp b/src/widgets/kernel/qwidgetsvariant.cpp index 15935a5886..e19d955b2b 100644 --- a/src/widgets/kernel/qwidgetsvariant.cpp +++ b/src/widgets/kernel/qwidgetsvariant.cpp @@ -41,7 +41,6 @@ #include "qvariant.h" -#include "qicon.h" #include "qsizepolicy.h" #include "private/qvariant_p.h" @@ -53,11 +52,6 @@ namespace { static void construct(QVariant::Private *x, const void *copy) { switch (x->type) { -#ifndef QT_NO_ICON - case QVariant::Icon: - v_construct<QIcon>(x, copy); - break; -#endif case QVariant::SizePolicy: v_construct<QSizePolicy>(x, copy); break; @@ -72,11 +66,6 @@ static void construct(QVariant::Private *x, const void *copy) static void clear(QVariant::Private *d) { switch (d->type) { -#ifndef QT_NO_ICON - case QVariant::Icon: - v_clear<QIcon>(d); - break; -#endif case QVariant::SizePolicy: v_clear<QSizePolicy>(d); break; @@ -93,12 +82,6 @@ static void clear(QVariant::Private *d) static bool isNull(const QVariant::Private *d) { - switch(d->type) { -#ifndef QT_NO_ICON - case QVariant::Icon: - return v_cast<QIcon>(d)->isNull(); -#endif - } return false; } @@ -106,10 +89,6 @@ static bool compare(const QVariant::Private *a, const QVariant::Private *b) { Q_ASSERT(a->type == b->type); switch(a->type) { -#ifndef QT_NO_ICON - case QVariant::Icon: - return false; -#endif case QVariant::SizePolicy: return *v_cast<QSizePolicy>(a) == *v_cast<QSizePolicy>(b); default: @@ -133,11 +112,6 @@ static void streamDebug(QDebug dbg, const QVariant &v) { QVariant::Private *d = const_cast<QVariant::Private *>(&v.data_ptr()); switch (d->type) { -#ifndef QT_NO_ICON - case QVariant::Icon: - dbg.nospace() << *v_cast<QIcon>(d); - break; -#endif case QVariant::SizePolicy: dbg.nospace() << *v_cast<QSizePolicy>(d); break; |