QmlDesigner: Remove unnecessary method param

Introduced by d37f6648f3

Change-Id: Ib2f824c0a3755f4551b93f700bd0bb719a099003
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Mahmoud Badri
2021-03-19 14:40:06 +02:00
parent 9e960d09a3
commit e43a67447f
6 changed files with 11 additions and 11 deletions

View File

@@ -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();
}