It should be possible to search the object tree recursively starting from a given node
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot |
Fix Released
|
High
|
Christopher Lee | ||
autopilot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Raring |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
There are two main functions used in autopilot to search for objects:
- select_single()
- get_children_
select_single() does recursion, but it always searches the whole tree.
get_children_
In my opinion all object search methods should be capable to recurse starting from a certain node. It would be very useful to be able to call select_single() on a node to search a child node. Especially with QML that would ease things up a lot. Also, it'd be useful to get a nodes children by type, but recursing.
This has been the very first thing I missed in autopilot and every developer I introduced to autopilot asked this as the very first question (after setting up the environment)
Adding this should not remove the possibility to only search for direct children without recursion as that is sometimes needed as well.
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Thomi Richards (community): Approve
-
Diff: 308 lines (+233/-47)3 files modifiedautopilot/introspection/__init__.py (+2/-47)
autopilot/introspection/dbus.py (+70/-0)
autopilot/tests/test_dbus_query.py (+161/-0)
Changed in autopilot: | |
status: | New → Confirmed |
information type: | Public → Private Security |
information type: | Private Security → Public |
Changed in autopilot: | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
Changed in autopilot: | |
milestone: | none → 1.3 |
Changed in autopilot: | |
assignee: | Thomi Richards (thomir) → Christopher Lee (veebers) |
status: | Triaged → In Progress |
Changed in autopilot: | |
status: | Fix Committed → Fix Released |
+1