Issue with QML slot access
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot Qt Support |
Fix Committed
|
Undecided
|
Unassigned | ||
autopilot-qt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
For each function in a QML element, a slot exists. The slot's parameters are all defined in the metaobject as having a QVariant type (we are in JS). It does not work properly when calling from any autopilot binding that sends more specialized types. The matching rules for parameters does not take into account the fact that when the expected type is QVariant the rules can be relaxed a bit and the wrapped param can be sent as is instead of going for plain string type name match.
e.g.
Item {
objectName: "myobject"
function myslot(data) { ... }
}
The object created for "myobject" has a slot myslot(QVariant).
but when calling from e.g. python:
myobject.
the argument type is QString and the call fails (types dont match).
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Michael Zanetti (community): Approve
-
Diff: 99 lines (+36/-1)5 files modifieddriver/dbus_object.cpp (+11/-1)
tests/autopilot/libautopilot_qt/tests/test_main.py (+14/-0)
tests/autopilot/testapp/qt4.qml (+4/-0)
tests/autopilot/testapp/qt5.qml (+4/-0)
tests/autopilot/testapp/testapp.pro (+3/-0)
Fix committed into lp:autopilot-qt at revision 65, scheduled for release in autopilot-qt, milestone Unknown