From 7fa19e4db74cbc56b539027c32ed717a103b5280 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Thu, 19 Mar 2026 04:37:45 +0000 Subject: [PATCH] fix(qml): resolve property color shadow crashes in CBadge and CChip CBadge: rename 'color' prop to 'badgeColor' (avoids Rectangle.color conflict) CChip: rename 'color' prop to 'chipColor' (same issue) Update all callers in WorkflowEditor and UserManagement. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontends/qt6/UserManagement.qml | 4 ++-- frontends/qt6/WorkflowEditor.qml | 12 ++++++------ qml/components/core/CChip.qml | 4 ++-- qml/components/data-display/CBadge.qml | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontends/qt6/UserManagement.qml b/frontends/qt6/UserManagement.qml index b4e04a060..ff27fff6e 100644 --- a/frontends/qt6/UserManagement.qml +++ b/frontends/qt6/UserManagement.qml @@ -595,7 +595,7 @@ Rectangle { onTextChanged: formPassword = text } - CBadge { text: "SHA-512 hashed"; color: "#607d8b" } + CBadge { text: "SHA-512 hashed"; badgeColor: "#607d8b" } } ColumnLayout { @@ -689,7 +689,7 @@ Rectangle { onTextChanged: formPassword = text } - CBadge { text: "SHA-512 hashed"; color: "#607d8b" } + CBadge { text: "SHA-512 hashed"; badgeColor: "#607d8b" } } ColumnLayout { diff --git a/frontends/qt6/WorkflowEditor.qml b/frontends/qt6/WorkflowEditor.qml index 53f8fb8cb..5e44196ea 100644 --- a/frontends/qt6/WorkflowEditor.qml +++ b/frontends/qt6/WorkflowEditor.qml @@ -355,7 +355,7 @@ Rectangle { model: workflowTags.length > 3 ? 3 : workflowTags.length CChip { text: workflowTags[index] ? workflowTags[index].name : "" - color: Theme.border + chipColor: Theme.border } } @@ -537,7 +537,7 @@ Rectangle { CChip { text: "All" selected: paletteGroup === "" - color: Theme.primary + chipColor: Theme.primary MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor @@ -549,7 +549,7 @@ Rectangle { CChip { text: modelData selected: paletteGroup === modelData - color: groupColor(modelData + ".x") + chipColor: groupColor(modelData + ".x") MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor @@ -1131,7 +1131,7 @@ Rectangle { CText { variant: "body2"; text: "Type" } CChip { text: selectedNode ? selectedNode.type : "" - color: selectedNode ? groupColor(selectedNode.type) : Theme.primary + chipColor: selectedNode ? groupColor(selectedNode.type) : Theme.primary } } @@ -1249,7 +1249,7 @@ Rectangle { model: selectedNode ? (selectedNode.inputs || []) : [] CChip { text: modelData.displayName || modelData.name - color: Theme.primary + chipColor: Theme.primary } } CText { @@ -1267,7 +1267,7 @@ Rectangle { model: selectedNode ? (selectedNode.outputs || []) : [] CChip { text: modelData.displayName || modelData.name - color: Theme.success + chipColor: Theme.success } } CText { diff --git a/qml/components/core/CChip.qml b/qml/components/core/CChip.qml index a2a87077e..89ab7d4f4 100644 --- a/qml/components/core/CChip.qml +++ b/qml/components/core/CChip.qml @@ -25,7 +25,7 @@ Rectangle { property bool closable: false property bool checked: false property bool selected: false - property color color: Theme.primary + property color chipColor: Theme.primary signal clicked() signal closeClicked() @@ -47,7 +47,7 @@ Rectangle { case "error": return Theme.error case "info": return Theme.info case "primary": return Theme.primary - default: return color + default: return chipColor } } diff --git a/qml/components/data-display/CBadge.qml b/qml/components/data-display/CBadge.qml index ea1217a5a..5f3dab0aa 100644 --- a/qml/components/data-display/CBadge.qml +++ b/qml/components/data-display/CBadge.qml @@ -15,7 +15,7 @@ Rectangle { property string text: "" property bool accent: false - property color color: accent ? Theme.primary : Theme.error + property color badgeColor: accent ? Theme.primary : Theme.error property int count: 0 property bool dot: false property string variant: "primary" // primary, success, warning, error (legacy compat) @@ -27,7 +27,7 @@ Rectangle { case "success": return Theme.success case "warning": return Theme.warning case "error": return Theme.error - default: return color + default: return badgeColor } }