Commit 186fe7fa authored by Nate Graham's avatar Nate Graham
Browse files

Fix error about "reversed" not being defined

Instead of assuming that the property is visible via the object
hierarchy, it's best to explicitly pass it around as a property to
ensure that it will always be available when queried for.


(cherry picked from commit 01f3b8b3)
parent d566b87b
......@@ -17,12 +17,11 @@ MouseArea {
id: resultDelegate
property variant theModel: model
property bool reversed: false
readonly property bool isCurrent: ListView.isCurrentItem // cannot properly Connect {} to this
readonly property bool sectionHasChanged: typeof reversed !== "undefined" && (
(reversed && ListView.section != ListView.nextSection)
|| (!reversed && ListView.section != ListView.previousSection)
)
readonly property bool sectionHasChanged: (reversed && ListView.section != ListView.nextSection)
|| (!reversed && ListView.section != ListView.previousSection)
property int activeAction: -1
......
......@@ -102,6 +102,7 @@ ListView {
delegate: ResultDelegate {
id: resultDelegate
width: listView.width
reversed: listView.reversed
}
//
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment