Adapt to various Qt6 container changes

QHash::unite is gone, container sizes are no longer int, comparison
operators are enforced to be const.
This commit is contained in:
Volker Krause 2022-03-10 19:04:10 +01:00 committed by Vlad Zahorodnii
parent 945a2059b8
commit ad09d9cc1e
3 changed files with 4 additions and 5 deletions

View file

@ -21,9 +21,8 @@ RuleBookModel::~RuleBookModel()
QHash<int, QByteArray> RuleBookModel::roleNames() const
{
static auto roles = QHash<int, QByteArray> {
{ DescriptionRole, QByteArray("display") },
}.unite(QAbstractListModel::roleNames());
auto roles = QAbstractListModel::roleNames();
roles.insert(DescriptionRole, QByteArray("display"));
return roles;
}

View file

@ -63,7 +63,7 @@ private:
QString caption;
QString icon;
bool operator==(const ThumbnailInfo &other) {
bool operator==(const ThumbnailInfo &other) const {
return wId == other.wId;
}
};

View file

@ -184,7 +184,7 @@ bool X11SyncManager::endFrame()
return true;
}
for (int i = 0; i < std::min(2, m_fences.count() - 1); i++) {
for (int i = 0; i < std::min<int>(2, m_fences.count() - 1); i++) {
const int index = (m_next + i) % m_fences.count();
X11SyncObject *fence = m_fences[index];