Issue with QML slot access

Bug #1195379 reported by Alexandre Abreu
6
This bug affects 1 person
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.slots.myslot("mydata")

the argument type is QString and the call fails (types dont match).

Related branches

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot-qt at revision 65, scheduled for release in autopilot-qt, milestone Unknown

Changed in autopilot-qt:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopilot-qt - 1.3+13.10.20130628-0ubuntu1

---------------
autopilot-qt (1.3+13.10.20130628-0ubuntu1) saucy; urgency=low

  [ Alexandre Abreu ]
  * Fix invoking of slots with arguments. So far only no arguments, or
    arguments of type QVariant are supported. (LP: #1195379)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 65
 -- Ubuntu daily release <email address hidden> Fri, 28 Jun 2013 00:01:10 +0000

Changed in autopilot-qt (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.