[utilities/kdebugsettings] src: Continue to implement saving

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 9d411b8c9ec12531dced2415acab64354d048ec8 by Laurent Montel.
Committed on 18/07/2026 at 16:17.
Pushed by mlaurent into branch 'master'.

Continue to implement saving

M  +1    -0    src/core/loggingmanager.cpp
M  +1    -1    src/core/loggingmanager.h
M  +2    -5    src/quickapps/contents/ui/KDEApplicationRulesPage.qml
M  +1    -0    src/quickapps/contents/ui/main.qml

https://invent.kde.org/utilities/kdebugsettings/-/commit/9d411b8c9ec12531dced2415acab64354d048ec8

diff --git a/src/core/loggingmanager.cpp b/src/core/loggingmanager.cpp
index 0d9b18bd..3660e459 100644
--- a/src/core/loggingmanager.cpp
+++ b/src/core/loggingmanager.cpp
@@ -15,6 +15,7 @@ LoggingManager::LoggingManager(QObject *parent)
     , mCategoryTypeModel(new CategoryTypeModel(this))
     , mKdeApplicationLoggingCategoryProxyModel(new KDEApplicationLoggingCategoryProxyModel(this))
 {
+    mKdeApplicationLoggingCategoryProxyModel->setSourceModel(mQtKdeCategoryModel);
     mLoggings.readQtLoggingFile();
     updateLoggingCategories();
 }
diff --git a/src/core/loggingmanager.h b/src/core/loggingmanager.h
index b530e66a..cd005fb4 100644
--- a/src/core/loggingmanager.h
+++ b/src/core/loggingmanager.h
@@ -43,7 +43,7 @@ public:
     void readQtLoggingFile();
     void updateLoggingCategories();
 
-    [[nodiscard]] bool saveRules(const QString &path, bool forceSavingAllRules);
+    [[nodiscard]] Q_INVOKABLE bool saveRules(const QString &path, bool forceSavingAllRules);
 
     [[nodiscard]] KDEApplicationLoggingCategoryProxyModel *kdeApplicationLoggingCategoryProxyModel() const;
 
diff --git a/src/quickapps/contents/ui/KDEApplicationRulesPage.qml b/src/quickapps/contents/ui/KDEApplicationRulesPage.qml
index d1276629..99721f5b 100644
--- a/src/quickapps/contents/ui/KDEApplicationRulesPage.qml
+++ b/src/quickapps/contents/ui/KDEApplicationRulesPage.qml
@@ -16,7 +16,7 @@ Kirigami.ScrollablePage {
     actions: [
         Kirigami.Action {
             displayComponent: Kirigami.SearchField {
-                onAccepted: loggingDebugProxyModel.filterText = text
+                onAccepted: LoggingManager.kdeApplicationLoggingCategoryProxyModel.filterText = text
             }
         }
     ]
@@ -27,10 +27,7 @@ Kirigami.ScrollablePage {
         activeFocusOnTab: true // keyboard navigation
         reuseItems: true
         clip: true
-        model: KDEApplicationLoggingCategoryProxyModel {
-            id: loggingDebugProxyModel
-            sourceModel: LoggingManager.qtKdeCategoryModel
-        }
+        model: LoggingManager.kdeApplicationLoggingCategoryProxyModel;
         delegate:  Delegates.RoundedItemDelegate {
             highlighted: ListView.isCurrentItem
             onClicked: listviewRules.currentIndex = index
diff --git a/src/quickapps/contents/ui/main.qml b/src/quickapps/contents/ui/main.qml
index 9ff64c8c..e42c5a63 100644
--- a/src/quickapps/contents/ui/main.qml
+++ b/src/quickapps/contents/ui/main.qml
@@ -73,6 +73,7 @@ Kirigami.ApplicationWindow {
         icon.name: "document-save"
         shortcut: StandardKey.Save
         onTriggered: {
+            LoggingManager.saveRules("ddd", false);
             console.debug("Not implemented yet")
             // TODO
         }
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.