diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-07-12 12:19:34 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-08-24 00:17:05 +0200 |
commit | 73fd7f2efcdb31e33febe840357a9d7b05e89165 (patch) | |
tree | 5a2a5756e03892c55856a4275521c1924213e3b9 /src/widgets | |
parent | a701b0ed30cda064aea111f18355c8b268c22974 (diff) |
Use QMetaTypeModuleHelper as the interface to do type conversions
Move the type conversions from QVariant::Helper to QMetaType. Only do
this for Qt Gui in a first step.
This makes it possible to completely remove the Handler struct in
QVariant, and now allows QMetaType to also convert Gui types.
Moving the conversion of Core types into QMetaType will require
further work.
Change-Id: I061f789deca1b595d92bb29227eb54b8e71a3ee3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidgetsvariant.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/widgets/kernel/qwidgetsvariant.cpp b/src/widgets/kernel/qwidgetsvariant.cpp index 27d4d9e2fe..935a53935f 100644 --- a/src/widgets/kernel/qwidgetsvariant.cpp +++ b/src/widgets/kernel/qwidgetsvariant.cpp @@ -49,20 +49,6 @@ QT_BEGIN_NAMESPACE namespace { -static bool convert(const QVariant::Private *d, int type, void *result, bool *ok) -{ - Q_UNUSED(d); - Q_UNUSED(type); - Q_UNUSED(result); - if (ok) - *ok = false; - return false; -} - -static const QVariant::Handler widgets_handler = { - convert -}; - static const struct : QMetaTypeModuleHelper { QtPrivate::QMetaTypeInterface *interfaceForType(int type) const override { @@ -84,7 +70,6 @@ void qRegisterWidgetsVariant() { qRegisterMetaType<QWidget*>(); qMetaTypeWidgetsHelper = &qVariantWidgetsHelper; - QVariantPrivate::registerHandler(QModulesPrivate::Widgets, &widgets_handler); } Q_CONSTRUCTOR_FUNCTION(qRegisterWidgetsVariant) |