OptionSelector and ItemSelector share API and most of the implementation

Bug #1240019 reported by Tim Peeters
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
In Progress
Low
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Incomplete
Low
Unassigned

Bug Description

There is a lot of code duplication between those components. I suggest that we make them one component, or if that is not possible, to have a single base component that both of them use.

Related branches

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
importance: Undecided → Low
assignee: nobody → Nicolas d'Offay (nicolas-doffay)
Revision history for this message
Nicolas d'Offay (nicolas-doffay) wrote :

My original reason for code duplication was due to the fact that QML doesn't allow abstract classes, which would mean that a user of the SDK would be able to utilise the incomplete base class which I feel is a bit problematic.

The only approach which seems to be valid is not including the base class in the qmldir file which it makes it more difficult to include in a project.

Any suggestions on how to document this are appreciated.

Revision history for this message
Tim Peeters (tpeeters) wrote :

Both OptionSelector and ItemSelector inherit from ListItem.Empty, so it seems like they can be easily merged.

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → In Progress
Revision history for this message
Nicolas d'Offay (nicolas-doffay) wrote :

A concrete decision still has to made regarding this bug.

Changed in ubuntu-ui-toolkit:
assignee: Nicolas d'Offay (nicolas-doffay) → nobody
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → Low
status: New → In Progress
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Incomplete
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.