diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-07 11:51:19 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-07 11:51:19 +0100 |
commit | 11dd3dd1345d08e5f9d2ded4d0e5a3f6d3a8fdef (patch) | |
tree | 396c008a9c94b6d7d9a140bd72b0fce2da6e7b14 | |
parent | d18f6c27af18c2cf4090b456349196e9f563e9b3 (diff) | |
parent | 179c4b689d1a7b9e9edb71ddf545dc237bca6704 (diff) |
Merge remote-tracking branch 'origin/5.12.6' into 5.12
Change-Id: I2b6a5d21048f5e2af435ff0d32f68ce332cd04d3
-rw-r--r-- | dist/changes-5.12.6 | 47 | ||||
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 55 | ||||
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject_p.h | 18 |
3 files changed, 68 insertions, 52 deletions
diff --git a/dist/changes-5.12.6 b/dist/changes-5.12.6 new file mode 100644 index 0000000000..bbf8e77008 --- /dev/null +++ b/dist/changes-5.12.6 @@ -0,0 +1,47 @@ +Qt 5.12.6 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.5. + +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-77761] Fix loading of EcmaScript modules when using the Qt Quick + Compiler. + - [QTBUG-77954] Fix parsing errors when using a semicolon after an object + literal in property bindings. + - [QTBUG-76866] Fix crash with null value type objects. + - [QTBUG-74087] The JavaScript engine will parse lists iteratively now, + using less stack space. This allows for more complex JavaScript to be + parsed. + +**************************************************************************** +* QtQuick * +**************************************************************************** + + - [QTBUG-76137] QQuickTextNodeEngine: don't create a new rectangle node as + the background of text when the alpha of it is 0. + - [QTBUG-77173][QTBUG-59620][QTBUG-59052] QQuickPathView: Fix stopping and + snapping behavior when interrupting the movement with a mouse click. + - [QTBUG-77418] QQuickListView: Respect highlight properties after changing + currentIndex. + - [QTBUG-77142] Also deliver touch points to MultiPointTouchArea if only + secondary properties, like pressure, have changed. + - [QTBUG-78468] FolderListModel: Avoid infinite update loop over name + filters on iOS. + - Add documentation for HoverHandler. diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 6bc469c836..15fb181516 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -388,57 +388,20 @@ void QQmlVMEMetaObject::writeProperty(int id, double v) void QQmlVMEMetaObject::writeProperty(int id, const QString& v) { QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); - if (md) - md->set(engine, id, engine->newString(v)); -} - -void QQmlVMEMetaObject::writeProperty(int id, const QUrl& v) -{ - QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); - if (md) - md->set(engine, id, engine->newVariantObject(QVariant::fromValue(v))); -} - -void QQmlVMEMetaObject::writeProperty(int id, const QDate& v) -{ - QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); - if (md) - md->set(engine, id, engine->newVariantObject(QVariant::fromValue(v))); -} - -void QQmlVMEMetaObject::writeProperty(int id, const QDateTime& v) -{ - QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); - if (md) - md->set(engine, id, engine->newVariantObject(QVariant::fromValue(v))); -} - -void QQmlVMEMetaObject::writeProperty(int id, const QPointF& v) -{ - QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); - if (md) - md->set(engine, id, engine->newVariantObject(QVariant::fromValue(v))); -} - -void QQmlVMEMetaObject::writeProperty(int id, const QSizeF& v) -{ - QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); - if (md) - md->set(engine, id, engine->newVariantObject(QVariant::fromValue(v))); -} - -void QQmlVMEMetaObject::writeProperty(int id, const QRectF& v) -{ - QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); - if (md) - md->set(engine, id, engine->newVariantObject(QVariant::fromValue(v))); + if (md) { + QV4::Scope scope(engine); + QV4::Scoped<QV4::MemberData>(scope, md)->set(engine, id, engine->newString(v)); + } } void QQmlVMEMetaObject::writeProperty(int id, QObject* v) { QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); - if (md) - md->set(engine, id, QV4::Value::fromReturnedValue(QV4::QObjectWrapper::wrap(engine, v))); + if (md) { + QV4::Scope scope(engine); + QV4::Scoped<QV4::MemberData>(scope, md)->set(engine, id, QV4::Value::fromReturnedValue( + QV4::QObjectWrapper::wrap(engine, v))); + } QQmlVMEVariantQObjectPtr *guard = getQObjectGuardForProperty(id); if (v && !guard) { diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index dbcc9d2884..35bc35ce4b 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -196,12 +196,18 @@ public: void writeProperty(int id, bool v); void writeProperty(int id, double v); void writeProperty(int id, const QString& v); - void writeProperty(int id, const QPointF& v); - void writeProperty(int id, const QSizeF& v); - void writeProperty(int id, const QUrl& v); - void writeProperty(int id, const QDate& v); - void writeProperty(int id, const QDateTime& v); - void writeProperty(int id, const QRectF& v); + + template<typename VariantCompatible> + void writeProperty(int id, const VariantCompatible &v) + { + QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); + if (md) { + QV4::Scope scope(engine); + QV4::Scoped<QV4::MemberData>(scope, md)->set(engine, id, engine->newVariantObject( + QVariant::fromValue(v))); + } + } + void writeProperty(int id, QObject *v); void ensureQObjectWrapper(); |