mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 13:33:55 -07:00
backwards compatibility with qt5
This commit is contained in:
parent
83c05382b0
commit
33defff1cb
1 changed files with 3 additions and 2 deletions
|
|
@ -66,8 +66,9 @@ QList<TallyRow> countSubtypes(const QList<CardItem *> &cards)
|
||||||
});
|
});
|
||||||
|
|
||||||
// convert entries into TallyRows
|
// convert entries into TallyRows
|
||||||
QList<TallyRow> rows = QList<TallyRow>(entries.size());
|
QList<TallyRow> rows;
|
||||||
std::transform(entries.begin(), entries.end(), rows.begin(),
|
rows.reserve(entries.size()); // for backwards compatibility with Qt5
|
||||||
|
std::transform(entries.begin(), entries.end(), std::back_inserter(rows),
|
||||||
[](const SubtypeEntry &e) { return TallyRow{e.name, QString::number(e.count)}; });
|
[](const SubtypeEntry &e) { return TallyRow{e.name, QString::number(e.count)}; });
|
||||||
|
|
||||||
return rows;
|
return rows;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue