From b3799c96d11feb52178799e43b42f3d8b446e2db Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Thu, 20 Mar 2025 17:08:31 +0200 Subject: [PATCH] QmlDesigner: Fix "no match" visible when searching materials ... in the content library Fixes: QDS-14996 Change-Id: Icba7b6b82a946824c593dad68e8198219cd6b1d5 Reviewed-by: Tim Jenssen --- .../ContentLibraryMaterialsView.qml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml index 0ace2e7efd0..2c16d17ab35 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml @@ -114,22 +114,23 @@ HelperWidgets.ScrollView { id: infoText text: { - if (!ContentLibraryBackend.rootView.isQt6Project) + if (!ContentLibraryBackend.rootView.isQt6Project) { qsTr("Content Library materials are not supported in Qt5 projects.") - else if (!ContentLibraryBackend.rootView.hasQuick3DImport) + } else if (!ContentLibraryBackend.rootView.hasQuick3DImport) { qsTr('To use Content Library, first add the QtQuick3D module in the Components view.') .arg(StudioTheme.Values.themeInteraction) - else if (!root.materialsModel.hasRequiredQuick3DImport) + } else if (!root.materialsModel.hasRequiredQuick3DImport) { qsTr("To use Content Library, version 6.3 or later of the QtQuick3D module is required.") - else if (!ContentLibraryBackend.rootView.hasMaterialLibrary) + } else if (!ContentLibraryBackend.rootView.hasMaterialLibrary) { qsTr("Content Library is disabled inside a non-visual component.") - else if (!root.materialsModel.bundleExists) + } else if (!root.materialsModel.bundleExists) { qsTr("No materials available. Make sure you have an internet connection.") - else if (!searchBox.isEmpty()) + } else if (!searchBox.isEmpty() && root.materialsModel.isEmpty) { qsTr("No match found.") - else + } else { "" + } } textFormat: Text.RichText color: StudioTheme.Values.themeTextColor