Pass item to rootObject() since it's now a singleton
The "parent" used to be resolved by the place where the utils.js was imported from. However, it was changed into a singleton and now this didn't work. BUG: 384776
This commit is contained in:
parent
df8ecfa929
commit
7482bef085
@ -230,7 +230,7 @@ Item {
|
|||||||
property bool loadCompleted: false
|
property bool loadCompleted: false
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
rootItem = Utils.rootObject()
|
rootItem = Utils.rootObject(this)
|
||||||
loadCompleted = true
|
loadCompleted = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
rootItem = Utils.rootObject()
|
rootItem = Utils.rootObject(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
.pragma library
|
.pragma library
|
||||||
|
|
||||||
function rootObject() {
|
function rootObject(item) {
|
||||||
var next = parent
|
var next = item.parent
|
||||||
while (next && next.parent)
|
while (next && next.parent)
|
||||||
next = next.parent
|
next = next.parent
|
||||||
return next
|
return next
|
||||||
|
Loading…
Reference in New Issue
Block a user