QmlDesigner: Allow removing modules in item library

Since we have no information currently about modules being in use,
we allow removing any module except QtQuick in item library, as it must
be possible to remove modules somehow.

Fixes: QDS-15123
Change-Id: Id0ad463f4fa580e8585335f0d01b693e4a15c4e7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2025-04-11 16:06:36 +03:00
parent 21a6368db5
commit dae1d22c2a

View File

@@ -239,8 +239,12 @@ ItemLibraryImport::SectionType ItemLibraryImport::sectionType() const
void ItemLibraryImport::updateRemovable()
{
#ifdef QDS_USE_PROJECTSTORAGE
bool importRemovable = m_sectionType == SectionType::Default && m_import.url() != "QtQuick";
#else
bool importRemovable = !m_importUsed && m_sectionType == SectionType::Default
&& m_import.url() != "QtQuick";
#endif
if (importRemovable != m_importRemovable) {
m_importRemovable = importRemovable;
emit importRemovableChanged();