[plasma/discover] discover/qml: DiscoverDrawer: resolve warning

Aleix Pol Gonzalez <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 8bd3f25663cbccaa234e4b7fb6a4792a033d4fbc by Aleix Pol Gonzalez, on behalf of Aleix Pol Gonzalez.
Committed on 04/08/2026 at 09:41.
Pushed by apol into branch 'master'.

DiscoverDrawer: resolve warning

?. will give us undefined values, we should convert it into a list for
qml to know to match it with Category::contains(QVariantList).

BUG: 520790

M  +1    -1    discover/qml/DiscoverDrawer.qml

https://invent.kde.org/plasma/discover/-/commit/8bd3f25663cbccaa234e4b7fb6a4792a033d4fbc

diff --git a/discover/qml/DiscoverDrawer.qml b/discover/qml/DiscoverDrawer.qml
index 760583b89..55c520234 100644
--- a/discover/qml/DiscoverDrawer.qml
+++ b/discover/qml/DiscoverDrawer.qml
@@ -228,7 +228,7 @@ Kirigami.GlobalDrawer {
             icon.name: category?.icon + "-symbolic" ?? ""
             checked: itsMe
             enabled: (currentSearchText.length === 0
-                      || (category?.contains(window?.leftPage?.model?.subcategories) ?? false))
+                      || (category?.contains(window?.leftPage?.model?.subcategories ?? []) ?? false))
 
             visible: category?.visible
             onTriggered: {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.