From fb99da23df3b420a0bf475ec56576cf9b199ffcc Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Fri, 29 Apr 2016 15:32:59 +0300 Subject: Add version tag to QQmlExtensionInterface_iid Commit 392c7b99348e2a96ef11adb5712095fbd13fb780 introduced version checking that checks QML extension plugin interface version name. Unfortunately many plugins inside and outside qtdeclarative already defined the string with interface version, leading to plugin not being loaded. Task-number: QTBUG-53090 Change-Id: I792df4ba06753bc21eab4adcd6f2068543d02368 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlextensioninterface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml') diff --git a/src/qml/qml/qqmlextensioninterface.h b/src/qml/qml/qqmlextensioninterface.h index b64fbef1bf..d639ef85d0 100644 --- a/src/qml/qml/qqmlextensioninterface.h +++ b/src/qml/qml/qqmlextensioninterface.h @@ -60,7 +60,7 @@ public: Q_DECLARE_INTERFACE(QQmlTypesExtensionInterface, "org.qt-project.Qt.QQmlTypesExtensionInterface/1.0") -#define QQmlExtensionInterface_iid "org.qt-project.Qt.QQmlExtensionInterface" +#define QQmlExtensionInterface_iid "org.qt-project.Qt.QQmlExtensionInterface/1.0" Q_DECLARE_INTERFACE(QQmlExtensionInterface, QQmlExtensionInterface_iid) -- cgit v1.2.3 From 1650377af7dfb01a0641d4e21bf1ba33e6a7320f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 29 Apr 2016 09:55:49 +0200 Subject: Fix crash when trying to call a property of the scope or context object For calls on properties of the scope or context object the thisObject parameter in the callData is a reference to the QmlContext, not a real object - therefore the toString conversion fails. Task-number: QTBUG-52340 Change-Id: I08d01cc5c05920c2fac46ddd40fa41e630bcade3 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4runtime.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/qml') diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index a988313f5f..d8ae7d4e92 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -953,10 +953,9 @@ ReturnedValue Runtime::callQmlScopeObjectProperty(ExecutionEngine *engine, int p Scope scope(engine); ScopedFunctionObject o(scope, getQmlScopeObjectProperty(engine, callData->thisObject, propertyIndex)); if (!o) { - QString error = QStringLiteral("Property '%1' of object %2 is not a function").arg(propertyIndex).arg(callData->thisObject.toQStringNoThrow()); + QString error = QStringLiteral("Property '%1' of scope object is not a function").arg(propertyIndex); return engine->throwTypeError(error); } - return o->call(callData); } @@ -965,7 +964,7 @@ ReturnedValue Runtime::callQmlContextObjectProperty(ExecutionEngine *engine, int Scope scope(engine); ScopedFunctionObject o(scope, getQmlContextObjectProperty(engine, callData->thisObject, propertyIndex)); if (!o) { - QString error = QStringLiteral("Property '%1' of object %2 is not a function").arg(propertyIndex).arg(callData->thisObject.toQStringNoThrow()); + QString error = QStringLiteral("Property '%1' of context object is not a function").arg(propertyIndex); return engine->throwTypeError(error); } -- cgit v1.2.3