Comment 0 for bug 1182369

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Found this in the Indicators. Not sure if it's a problem with autopilot or qt.
If the subclass does not have it's own local properties the class name end's up at the first ancestor which does.

eg: (from indicators-client)

"BasicMenu.qml"
ListItem.Standard {
    property bool listViewIsCurrentItem : false
    property QtObject menu
    . . .
}

"Menu.qml"
BasicMenu {
    . . .
    color: "#221e1c"
    HLine { ... }
    HLine { ... }
    . . .
}

"SwitchMenu.qml"
Menu {
    id: _switchMenu
    . . .
   control: Switch { ... }
   DBusActionState { ... }
    . . .
}

self.app.select_single("SwitchMenu", _switchMenu") returns None
self.app.select_single("*", _switchMenu") returns a BasicMenu_QMLTYPE_XXX

If you add a local property to SwitchMenu (eg property alias checked : switch.checked)
self.app.select_single("SwitchMenu", _switchMenu") returns a SwitchMenu_QMLTYPE_XXX

Could be something to do with the metaType className ?