[utilities/kdebugsettings] src/quickapps/qml: Assign values

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

Assign values

M  +13   -0    src/quickapps/qml/CategoryComboBox.qml
M  +1    -1    src/quickapps/qml/EditCustomRuleDialog.qml

https://invent.kde.org/utilities/kdebugsettings/-/commit/7e2dd22dc3e9e0ebc1da34ed18005cd8c982d7c4

diff --git a/src/quickapps/qml/CategoryComboBox.qml b/src/quickapps/qml/CategoryComboBox.qml
index c9406287..b64463eb 100644
--- a/src/quickapps/qml/CategoryComboBox.qml
+++ b/src/quickapps/qml/CategoryComboBox.qml
@@ -6,6 +6,19 @@ import org.kde.kdebugsettings
 
 QQC2.ComboBox {
     id: categoryType
+
+    property int loggingType: -1
+
+    onLoggingTypeChanged: {
+        currentIndex = count > 0 ? indexOfValue(loggingType) : -1
+    }
+
+    onCurrentIndexChanged: {
+        if (currentIndex >= 0 && currentValue !== undefined) {
+            loggingType = currentValue
+        }
+    }
+
     model: CategoryTypeProxyModel {
         sourceModel: LoggingManager.categoryTypeModel
         showOffType: true
diff --git a/src/quickapps/qml/EditCustomRuleDialog.qml b/src/quickapps/qml/EditCustomRuleDialog.qml
index 14355728..1e0e4b00 100644
--- a/src/quickapps/qml/EditCustomRuleDialog.qml
+++ b/src/quickapps/qml/EditCustomRuleDialog.qml
@@ -13,9 +13,9 @@ Kirigami.Dialog {
     showCloseButton: false
     property alias categoryName: categoryNameField.text
     property alias categoryEnabled: categoryEnabled.checked
+    property alias categoryType: categoryType.loggingType
     property bool editMode: false
 
-
     standardButtons: QQC2.Dialog.Ok | QQC2.Dialog.Cancel
     RowLayout {
         id: mainColumn
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.