forked from qt-creator/qt-creator
QmlDesigner: Remove unnecessary method param
Introduced by d37f6648f3
Change-Id: Ib2f824c0a3755f4551b93f700bd0bb719a099003
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -163,7 +163,7 @@ void ItemLibraryModel::setSearchText(const QString &searchText)
|
||||
m_searchText = lowerSearchText;
|
||||
|
||||
bool changed = false;
|
||||
updateVisibility(&changed, !m_searchText.isEmpty());
|
||||
updateVisibility(&changed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,18 +401,18 @@ void ItemLibraryModel::updateUsedImports(const QList<Import> &usedImports)
|
||||
}
|
||||
}
|
||||
|
||||
void ItemLibraryModel::updateVisibility(bool *changed, bool expand)
|
||||
void ItemLibraryModel::updateVisibility(bool *changed)
|
||||
{
|
||||
for (ItemLibraryImport *import : std::as_const(m_importList)) {
|
||||
bool categoryChanged = false;
|
||||
bool hasVisibleItems = import->updateCategoryVisibility(m_searchText, &categoryChanged, expand);
|
||||
bool hasVisibleItems = import->updateCategoryVisibility(m_searchText, &categoryChanged);
|
||||
*changed |= categoryChanged;
|
||||
|
||||
if (import->sectionType() == ItemLibraryImport::SectionType::Unimported)
|
||||
*changed |= import->setVisible(!m_searchText.isEmpty());
|
||||
|
||||
// expand import if it has an item matching search criteria
|
||||
if (expand && hasVisibleItems && !import->importExpanded())
|
||||
if (!m_searchText.isEmpty() && hasVisibleItems && !import->importExpanded())
|
||||
import->setImportExpanded();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user