Fix a few more windows warnings

This commit is contained in:
Nicolas Werner 2022-10-02 12:31:03 +02:00
parent 1365e4e266
commit b3c5f41625
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 6 additions and 5 deletions

View file

@ -619,7 +619,7 @@ ChatPage::handleSyncResponse(const mtx::responses::Sync &res, const std::string
nhlog::net()->warn("Duplicate sync, dropping");
return;
}
} catch (const lmdb::error &e) {
} catch (const lmdb::error &) {
nhlog::db()->warn("Logged out in the mean time, dropping sync");
return;
}

View file

@ -31,7 +31,7 @@ MemberListBackend::MemberListBackend(const QString &room_id, QObject *parent)
// HACK: due to QTBUG-1020169, we'll load a big chunk to speed things up
auto members = cache::getMembers(room_id_.toStdString(), 0, -1);
addUsers(members);
numUsersLoaded_ = members.size();
numUsersLoaded_ = (int)members.size();
} catch (const lmdb::error &e) {
nhlog::db()->critical("Failed to retrieve members from cache: {}", e.what());
}
@ -40,7 +40,8 @@ MemberListBackend::MemberListBackend(const QString &room_id, QObject *parent)
void
MemberListBackend::addUsers(const std::vector<RoomMember> &members)
{
beginInsertRows(QModelIndex{}, m_memberList.count(), m_memberList.count() + members.size() - 1);
beginInsertRows(
QModelIndex{}, m_memberList.count(), m_memberList.count() + (int)members.size() - 1);
for (const auto &member : members)
m_memberList.push_back(
@ -113,7 +114,7 @@ MemberListBackend::fetchMore(const QModelIndex &)
auto members = cache::getMembers(room_id_.toStdString(), rowCount());
addUsers(members);
numUsersLoaded_ += members.size();
numUsersLoaded_ += (int)members.size();
emit numUsersLoadedChanged();
loadingMoreMembers_ = false;

View file

@ -45,7 +45,7 @@ EmojiModel::roleNames() const
int
EmojiModel::rowCount(const QModelIndex &parent) const
{
return parent == QModelIndex() ? (qsizetype)Provider::emoji.size() : 0;
return parent == QModelIndex() ? (int)Provider::emoji.size() : 0;
}
QVariant