aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-04-25 15:07:33 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-04-26 13:51:18 +0000
commit3a349ea9229eae7e3e189e92e3124b169fe4f447 (patch)
treece382aef20923e903229b5836b16a707ca19598d /src/qml
parenteb363c3a0b7f96015d7b8f2551dbeaa86f5acf16 (diff)
Don't call unknown types "null"
That is rather confusing. Task-number: QTBUG-74815 Change-Id: Id683a7f9efd63c8859c5740ceab9f161cea46ee3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 5467e730e3..6fed538fa8 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -565,9 +565,9 @@ void QObjectWrapper::setProperty(ExecutionEngine *engine, QObject *object, QQmlP
QQmlContextData *callingQmlContext = scope.engine->callingQmlContext();
if (!QQmlPropertyPrivate::write(object, *property, v, callingQmlContext)) {
- const char *valueType = nullptr;
- if (v.userType() == QVariant::Invalid) valueType = "null";
- else valueType = QMetaType::typeName(v.userType());
+ const char *valueType = (v.userType() == QMetaType::UnknownType)
+ ? "an unknown type"
+ : QMetaType::typeName(v.userType());
const char *targetTypeName = QMetaType::typeName(property->propType());
if (!targetTypeName)