aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index 5a2c87f221..0de097e81e 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -1088,12 +1088,12 @@ QVariant QQmlPropertyPrivate::readValueProperty()
if (core.propType() == QMetaType::QVariant) {
args[0] = &value;
} else {
- value = QVariant(core.propType(), (void*)nullptr);
+ value = QVariant(QMetaType(core.propType()), (void*)nullptr);
args[0] = value.data();
}
core.readPropertyWithArgs(object, args);
if (core.propType() != QMetaType::QVariant && args[0] != value.data())
- return QVariant((QVariant::Type)core.propType(), args[0]);
+ return QVariant(QMetaType(core.propType()), args[0]);
return value;
}
@@ -1244,7 +1244,7 @@ bool QQmlPropertyPrivate::write(
// This reflects the fact that you can assign a nullptr to a QObject pointer
// Without the change to QObjectStar, rawMetaObjectForType would not give us a QQmlMetaObject
varType = QMetaType::QObjectStar;
- val = QVariant(QMetaType::QObjectStar, nullptr);
+ val = QVariant(QMetaType::fromType<QObject *>(), nullptr);
}
QQmlMetaObject valMo = rawMetaObjectForType(enginePriv, varType);
if (valMo.isNull())