From 605777e6cf557dbaf2835c63562bf3fe1620ee45 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 18 Sep 2014 17:03:44 +0200 Subject: Revert mapping of var signal parameters to QJSValue This reverts commit 70004585f89f325f398c556d101bfa1833d87b53, which is superseded by commit 3dbe05f6bf3fd51ce8097c35f6c7f12b39acb0f6, which is a much better solution. [ChangeLog][QtQml][Important Behavior Changes] Qt 5.3 changed the mapping of "var" parameters in QML declared signals to QJSValue. This was reverted to the behavior of earlier Qt versions to use QVariant. The original issue of not being able to pass function objects through var parameters of QML declared signals is solved by wrapping a QJSValue inside the QVariant. Task-number: QTBUG-39971 Change-Id: I44de2ef2660c64c68e6a3b2a1ae251ad563d6b3c Reviewed-by: Taylor Braun-Jones Reviewed-by: Lars Knoll --- src/qml/compiler/qqmltypecompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index 90f775f781..13367efc3d 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -571,7 +571,7 @@ bool QQmlPropertyCacheCreator::createMetaObject(int objectIndex, const QmlIR::Ob QV4::CompiledData::Property::Type dtype; int metaType; } builtinTypes[] = { - { QV4::CompiledData::Property::Var, qMetaTypeId() }, + { QV4::CompiledData::Property::Var, QMetaType::QVariant }, { QV4::CompiledData::Property::Variant, QMetaType::QVariant }, { QV4::CompiledData::Property::Int, QMetaType::Int }, { QV4::CompiledData::Property::Bool, QMetaType::Bool }, -- cgit v1.2.3