From edbab01cdfa54b044b55d487b623976b8be75c2f Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 17 Oct 2019 13:05:48 +0200 Subject: [PATCH] get rid of most cannot stack parent warnings --- containments/homescreen/homescreen.cpp | 4 ++-- .../homescreen/package/contents/ui/launcher/LauncherGrid.qml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/containments/homescreen/homescreen.cpp b/containments/homescreen/homescreen.cpp index 0cb26abc..3ba96442 100644 --- a/containments/homescreen/homescreen.cpp +++ b/containments/homescreen/homescreen.cpp @@ -53,7 +53,7 @@ ApplicationListModel *HomeScreen::applicationListModel() void HomeScreen::stackBefore(QQuickItem *item1, QQuickItem *item2) { - if (!item1 || !item2 || item1->parentItem() != item2->parentItem()) { + if (!item1 || !item2 || item1 == item2 || item1->parentItem() != item2->parentItem()) { return; } @@ -62,7 +62,7 @@ void HomeScreen::stackBefore(QQuickItem *item1, QQuickItem *item2) void HomeScreen::stackAfter(QQuickItem *item1, QQuickItem *item2) { - if (!item1 || !item2 || item1->parentItem() != item2->parentItem()) { + if (!item1 || !item2 || item1 == item2 || item1->parentItem() != item2->parentItem()) { return; } diff --git a/containments/homescreen/package/contents/ui/launcher/LauncherGrid.qml b/containments/homescreen/package/contents/ui/launcher/LauncherGrid.qml index 2017d0cd..8cc91808 100644 --- a/containments/homescreen/package/contents/ui/launcher/LauncherGrid.qml +++ b/containments/homescreen/package/contents/ui/launcher/LauncherGrid.qml @@ -40,6 +40,7 @@ LauncherContainer { frame.width: width Repeater { + parent: root.flow model: plasmoid.nativeInterface.applicationListModel delegate: Delegate { id: delegate