forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user