From f0ae5780516920eed7cbd05a570642893ad0c3be Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 2 Jun 2025 17:44:27 +0300 Subject: [PATCH] QmlDesigner: Refresh item library when exported types change Task-number: QDS-15210 Change-Id: Ieea544cb001259de4abda3e71f73f981f0267ea2 Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/itemlibrary/itemlibraryview.cpp | 5 +++++ .../qmldesigner/components/itemlibrary/itemlibraryview.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp index f1aa1f48e21..fda96930893 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp @@ -139,4 +139,9 @@ void ItemLibraryView::customNotification(const AbstractView *view, AbstractView::customNotification(view, identifier, nodeList, data); } +void ItemLibraryView::exportedTypeNamesChanged(const ExportedTypeNames &, const ExportedTypeNames &) +{ + m_widget->delayedUpdateModel(); +} + } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h index d18a38029b4..c479e292ca0 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.h @@ -32,6 +32,8 @@ public: void documentMessagesChanged(const QList &errors, const QList &warnings) override; void customNotification(const AbstractView *view, const QString &identifier, const QList &nodeList, const QList &data) override; + void exportedTypeNamesChanged(const ExportedTypeNames &added, + const ExportedTypeNames &removed) override; protected: void updateImports();