From 73d1476fb1397948a4d806bd921fce372bd8d63b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 2 Dec 2019 17:54:48 +0100 Subject: Replace most use of QVariant::type and occurrences of QVariant::Type I made a clazy automated check that replaced the use of QVariant::Type by the equivalent in QMetaType. This has been deprecated since Qt 5.0, but many uses were not yet removed. In addition, there was some manual changes to fix the compilation errors. Adapted the Private API of QDateTimeParser and QMimeDataPrivate and adjust QDateTimeEdit and QSpinBox. QVariant(QVariant::Invalid) in qstylesheet made no sense. But note that in QVariant::save, we actually wanted to use the non-user type. In the SQL module, many changes were actually reverted because the API still expects QVarient::Type. Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e Reviewed-by: Lars Knoll --- src/corelib/kernel/qvariant_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/kernel/qvariant_p.h') diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h index b8b63b5e6f..94781a9957 100644 --- a/src/corelib/kernel/qvariant_p.h +++ b/src/corelib/kernel/qvariant_p.h @@ -362,7 +362,7 @@ class QVariantConstructor FilteredConstructor(const QVariantConstructor &tc) { // ignore types that lives outside of the current library - tc.m_x->type = QVariant::Invalid; + tc.m_x->type = QMetaType::UnknownType; } }; public: @@ -430,7 +430,7 @@ public: {} ~QVariantDestructor() { - m_d->type = QVariant::Invalid; + m_d->type = QMetaType::UnknownType; m_d->is_null = true; m_d->is_shared = false; } -- cgit v1.2.3