From 4d93a8b663480582948b612516b7a471812e9b92 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 9 Apr 2025 14:33:18 +0200 Subject: [PATCH] QmlDesigner: Fix crash in project storage builds Display name does not work at all and makes no sense here. We use the first exported type name. Task-number: QDS-15029 Change-Id: I825447e18c940996dc7c80ff9ff31aded7d8b666 Reviewed-by: Marco Bubke --- .../components/bindingeditor/bindingeditor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp b/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp index bb98db869c4..2a066343ca6 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp @@ -260,8 +260,12 @@ void BindingEditor::prepareBindings() } if (!binding.properties.isEmpty()) { - binding.item = metaInfo.displayName(); - bindings.append(binding); + for (auto &exportedType : + metaInfo.exportedTypeNamesForSourceId(model->fileUrlSourceId())) { + binding.item = exportedType.name.toQString(); + bindings.append(binding); + break; + } } } }