Example for UbuntuListView mix versions and doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
High
|
Adnane Belmadiaf |
Bug Description
The UbuntuListView example on wily contains 2 examples:
- the first one exercise the 1.3 Ubuntu SDK version (import Ubuntu.Components 1.3)
- the second one exercise the 1.2 Ubuntu SDK version. (import Ubuntu.Components 1.2)
This is confusing to the developers, only one version import should be shown (another bug is opened so that it matches the imports version on which you press F1).
In addition to this, the second example doesn't work:
import QtQuick 2.4
import Ubuntu.Components 1.2
import Ubuntu.
UbuntuListView {
width: units.gu(40)
height: units.gu(71)
model: XmlListModel {
source: "http://
query: "/rss/channel/item"
XmlRole { name: "title"; query: "title/string()" }
}
// let refresh control know when the refresh gets completed
pullToRefresh {
enable: true
refreshing: model.status === XmlListModel.
onRefresh: model.reload()
}
delegate: ListItem.Standard {
width: ListView.view.width
height: units.gu(5)
text: modelData
onClicked: {
}
}
}
It misses some import for QtQuick.
ListItem.Standard - ListItem is not a namespace.
Related branches
- ubuntu-sdk-build-bot: Approve (continuous-integration)
- Cris Dywan: Approve
-
Diff: 11 lines (+1/-0)1 file modifiedsrc/imports/Components/1.3/UbuntuListView.qml (+1/-0)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Adnane Belmadiaf (daker) |
status: | Triaged → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
This is indeed buggy, however where do you see 1.3 imports?