OptionSelector and ItemSelector share API and most of the implementation
Bug #1240019 reported by
Tim Peeters
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
lp://staging/~nicolas-doffay/ubuntu-ui-toolkit/fix-1240019
Superseded
for merging
into
lp://staging/ubuntu-ui-toolkit
- Zsombor Egri: Needs Fixing
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 319 lines (+62/-41)9 files modifiedCHANGES (+3/-0)
components.api (+1/-0)
examples/ubuntu-ui-toolkit-gallery/OptionSelectors.qml (+27/-24)
modules/Ubuntu/Components/ListItems/ItemSelector.qml (+3/-0)
modules/Ubuntu/Components/ListItems/ValueSelector.qml (+3/-1)
modules/Ubuntu/Components/OptionSelector.qml (+12/-4)
modules/Ubuntu/Components/OptionSelectorDelegate.qml (+10/-10)
modules/Ubuntu/Components/Themes/Ambiance/OptionSelectorStyle.qml (+1/-0)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py (+2/-2)
Changed in ubuntu-ui-toolkit: | |
importance: | Undecided → Low |
assignee: | nobody → Nicolas d'Offay (nicolas-doffay) |
Changed in ubuntu-ui-toolkit: | |
status: | New → In Progress |
Changed in ubuntu-ui-toolkit: | |
assignee: | Nicolas d'Offay (nicolas-doffay) → nobody |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
importance: | Undecided → Low |
status: | New → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Incomplete |
To post a comment you must log in.
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.