mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix a few more windows warnings
This commit is contained in:
parent
1365e4e266
commit
b3c5f41625
3 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue