Merge pull request #20449 from hyarion/refactor/cpp20-contains

Avoid using `count` and `std::find` where `contains` and `isEmpty` express intent better
This commit is contained in:
Chris Hennes
2025-05-05 10:31:33 -05:00
committed by GitHub
43 changed files with 118 additions and 103 deletions

View File

@@ -404,7 +404,7 @@ void MaterialSave::onSelectModel(const QItemSelection& selected, const QItemSele
_filename = QString(ui->editFilename->text()); // No filename by default
auto model = static_cast<QStandardItemModel*>(ui->treeMaterials->model());
QModelIndexList indexes = selected.indexes();
if (indexes.count() == 0) {
if (indexes.isEmpty()) {
_selectedPath = QStringLiteral("/") + _libraryName;
_selectedFull = _selectedPath;
_selectedUUID = QString();