[plasma/xdg-desktop-portal-kde] src: appchooserdialog: type info++

David Redondo <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 50926bd70daa79b209c2a629bd402b009f83a902 by David Redondo.
Committed on 29/07/2026 at 10:06.
Pushed by davidre into branch 'master'.

appchooserdialog: type info++

M  +1    -1    src/AppChooserDialog.qml
M  +2    -0    src/appchooserdialog.h

https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/50926bd70daa79b209c2a629bd402b009f83a902

diff --git a/src/AppChooserDialog.qml b/src/AppChooserDialog.qml
index ca19a5eb..3ea667a8 100644
--- a/src/AppChooserDialog.qml
+++ b/src/AppChooserDialog.qml
@@ -123,7 +123,7 @@ PortalDialog {
 
                 checkable: true
                 checked: !root.appModel.showOnlyPreferredApps
-                visible: root.appModel.sourceModel.hasPreferredApps
+                visible: (root.appModel.sourceModel as AppModel).hasPreferredApps
                 onVisibleChanged: root.appModel.showOnlyPreferredApps = visible
 
                 onToggled: root.appModel.showOnlyPreferredApps = !root.appModel.showOnlyPreferredApps
diff --git a/src/appchooserdialog.h b/src/appchooserdialog.h
index c82fb526..931ef22b 100644
--- a/src/appchooserdialog.h
+++ b/src/appchooserdialog.h
@@ -191,6 +191,8 @@ private:
 class AppModel : public QAbstractListModel
 {
     Q_OBJECT
+    QML_ELEMENT
+    QML_UNCREATABLE("")
     Q_PROPERTY(bool hasPreferredApps MEMBER m_hasPreferredApps NOTIFY hasPreferredAppsChanged)
 public:
     enum ItemRoles {
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.