From c6899f16389458766904d8d913054f09076e06dd Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 3 Dec 2019 20:24:38 +0100 Subject: Replace QVariant::type with QVariant::userType as type is going to be deprecated. This change was done automatically with the help of clazy. In addition, ColumnRoleMetadata was changed to take an int instead of a QVariant::Type Change-Id: Ibc02d7b52e7d931a56c19fdebc4788b5e6df2a39 Reviewed-by: Lars Knoll --- src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp') diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp index 029004ffd1..a3d19841cf 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp @@ -96,7 +96,7 @@ static bool isSaveable(const QVariant &value) { NullDevice nullDevice; QDataStream fakeStream(&nullDevice); - return QMetaType::save(fakeStream, static_cast(value.type()), value.constData()); + return QMetaType::save(fakeStream, static_cast(value.userType()), value.constData()); } QQmlEngineDebugServiceImpl::QQmlEngineDebugServiceImpl(QObject *parent) : @@ -217,7 +217,7 @@ QVariant QQmlEngineDebugServiceImpl::valueContents(QVariant value) const //QObject * is not streamable. //Convert all such instances to a String value - if (value.type() == QVariant::List) { + if (value.userType() == QMetaType::QVariantList) { QVariantList contents; QVariantList list = value.toList(); int count = list.size(); @@ -227,7 +227,7 @@ QVariant QQmlEngineDebugServiceImpl::valueContents(QVariant value) const return contents; } - if (value.type() == QVariant::Map) { + if (value.userType() == QMetaType::QVariantMap) { QVariantMap contents; const auto map = value.toMap(); for (auto i = map.cbegin(), end = map.cend(); i != end; ++i) -- cgit v1.2.3