Qt5 compat

Reverts 33defff1cb from #7021
This commit is contained in:
tooomm 2026-07-06 18:33:11 +02:00
parent c3f8ca5aee
commit 9b02dae1fa

View file

@ -66,9 +66,8 @@ QList<TallyRow> countSubtypes(const QList<CardItem *> &cards)
});
// convert entries into TallyRows
QList<TallyRow> rows;
rows.reserve(entries.size()); // for backwards compatibility with Qt5
std::transform(entries.begin(), entries.end(), std::back_inserter(rows),
QList<TallyRow> rows = QList<TallyRow>(entries.size());
std::transform(entries.begin(), entries.end(), rows.begin(),
[](const SubtypeEntry &e) { return TallyRow{e.name, QString::number(e.count)}; });
return rows;