From 7482bef085e67949be14c1d04dd8e532f4cf73e7 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 18 Sep 2017 15:11:09 +0200 Subject: [PATCH] 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 --- src/declarativeimports/plasmacomponents/qml/Dialog.qml | 2 +- src/declarativeimports/plasmacomponents/qml/Sheet.qml | 2 +- .../plasmacomponents/qml/private/AppManager.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarativeimports/plasmacomponents/qml/Dialog.qml b/src/declarativeimports/plasmacomponents/qml/Dialog.qml index 0e6b11333..b6f1e6450 100644 --- a/src/declarativeimports/plasmacomponents/qml/Dialog.qml +++ b/src/declarativeimports/plasmacomponents/qml/Dialog.qml @@ -230,7 +230,7 @@ Item { property bool loadCompleted: false Component.onCompleted: { - rootItem = Utils.rootObject() + rootItem = Utils.rootObject(this) loadCompleted = true } diff --git a/src/declarativeimports/plasmacomponents/qml/Sheet.qml b/src/declarativeimports/plasmacomponents/qml/Sheet.qml index 39fe305a8..9392c0d5a 100644 --- a/src/declarativeimports/plasmacomponents/qml/Sheet.qml +++ b/src/declarativeimports/plasmacomponents/qml/Sheet.qml @@ -277,7 +277,7 @@ Item { } Component.onCompleted: { - rootItem = Utils.rootObject() + rootItem = Utils.rootObject(this) } } } diff --git a/src/declarativeimports/plasmacomponents/qml/private/AppManager.js b/src/declarativeimports/plasmacomponents/qml/private/AppManager.js index 5f78d95e6..a6e8520f8 100644 --- a/src/declarativeimports/plasmacomponents/qml/private/AppManager.js +++ b/src/declarativeimports/plasmacomponents/qml/private/AppManager.js @@ -40,8 +40,8 @@ .pragma library -function rootObject() { - var next = parent +function rootObject(item) { + var next = item.parent while (next && next.parent) next = next.parent return next