diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-14 12:28:18 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-14 12:28:18 +0200 |
commit | 83aff8d6acd0b5beabe26a5ae6518bb0a4d0567b (patch) | |
tree | 6c265dfc2d5d218fee95b8c0f6571158b6e0f123 | |
parent | 74bdd7b588528ecdbffa3872706a9ada2b83b716 (diff) | |
parent | 101799f8acdbfc4ebd05f37a7c09544d24b41af1 (diff) |
Merge remote-tracking branch 'origin/5.12.8' into 5.12
Change-Id: I064b346257bd24160f5b54770b2ee6ed6075e22d
-rw-r--r-- | dist/changes-5.12.8 | 36 | ||||
-rw-r--r-- | src/qml/qml/qqmlvaluetypewrapper.cpp | 12 |
2 files changed, 46 insertions, 2 deletions
diff --git a/dist/changes-5.12.8 b/dist/changes-5.12.8 new file mode 100644 index 0000000000..b6b5d0f2e1 --- /dev/null +++ b/dist/changes-5.12.8 @@ -0,0 +1,36 @@ +Qt 5.12.8 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.7. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* QtQml * +**************************************************************************** + + - [QTBUG-48809] Fixed a warning about non-relative paths in qmldir files. + We now permit the use of resource urls in qmldir files to allow a plugin + to include its .qml files in resources, optionally compiled ahead of time. + - [QTBUG-81123] Fixed a crash when objects were deleted from a QML list property. + +**************************************************************************** +* QtQuick * +**************************************************************************** + + - [QTBUG-76362] Fixed behavior of ListView with PullBackHeader positioning + mode in combination with snapMode. + - [QTBUG-64138] Particle effects can now run continuously over longer + periods of time. diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp index b22d1530e2..5d7a2130b2 100644 --- a/src/qml/qml/qqmlvaluetypewrapper.cpp +++ b/src/qml/qml/qqmlvaluetypewrapper.cpp @@ -192,7 +192,11 @@ ReturnedValue QQmlValueTypeWrapper::create(ExecutionEngine *engine, QObject *obj r->d()->object = object; r->d()->property = property; r->d()->setPropertyCache(QJSEnginePrivate::get(engine)->cache(metaObject)); - r->d()->valueType = QQmlValueTypeFactory::valueType(typeId); + auto valueType = QQmlValueTypeFactory::valueType(typeId); + if (!valueType) { + return engine->throwTypeError(QString::fromLatin1("Type %1 is not a value type").arg(QString::fromLocal8Bit(QMetaType::typeName(typeId)))); + } + r->d()->valueType = valueType; r->d()->gadgetPtr = nullptr; return r->asReturnedValue(); } @@ -204,7 +208,11 @@ ReturnedValue QQmlValueTypeWrapper::create(ExecutionEngine *engine, const QVaria Scoped<QQmlValueTypeWrapper> r(scope, engine->memoryManager->allocate<QQmlValueTypeWrapper>()); r->d()->setPropertyCache(QJSEnginePrivate::get(engine)->cache(metaObject)); - r->d()->valueType = QQmlValueTypeFactory::valueType(typeId); + auto valueType = QQmlValueTypeFactory::valueType(typeId); + if (!valueType) { + return engine->throwTypeError(QString::fromLatin1("Type %1 is not a value type").arg(QString::fromLocal8Bit(QMetaType::typeName(typeId)))); + } + r->d()->valueType = valueType; r->d()->gadgetPtr = nullptr; r->d()->setValue(value); return r->asReturnedValue(); |