mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Make clazy happy
This commit is contained in:
parent
2fde381a82
commit
bffa0115d4
1 changed files with 5 additions and 4 deletions
|
@ -692,10 +692,10 @@ PowerlevelsSpacesListModel::PowerlevelsSpacesListModel(const std::string &room_i
|
||||||
cache::client()->getStateEvent<mtx::events::state::space::Parent>(s, space);
|
cache::client()->getStateEvent<mtx::events::state::space::Parent>(s, space);
|
||||||
if (parent && parent->content.via && !parent->content.via->empty() &&
|
if (parent && parent->content.via && !parent->content.via->empty() &&
|
||||||
parent->content.canonical) {
|
parent->content.canonical) {
|
||||||
auto parent = cache::client()->getStateEvent<mtx::events::state::PowerLevels>(s);
|
auto parentPl = cache::client()->getStateEvent<mtx::events::state::PowerLevels>(s);
|
||||||
|
|
||||||
spaces.push_back(
|
spaces.push_back(Entry{
|
||||||
Entry{s, parent ? parent->content : mtx::events::state::PowerLevels{}, false});
|
s, parentPl ? parentPl->content : mtx::events::state::PowerLevels{}, false});
|
||||||
addChildren(s);
|
addChildren(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -726,6 +726,7 @@ struct PowerLevelApplier
|
||||||
if (e) {
|
if (e) {
|
||||||
if (e->status_code == 429 && e->matrix_error.retry_after.count() != 0) {
|
if (e->status_code == 429 && e->matrix_error.retry_after.count() != 0) {
|
||||||
QTimer::singleShot(e->matrix_error.retry_after,
|
QTimer::singleShot(e->matrix_error.retry_after,
|
||||||
|
ChatPage::instance(),
|
||||||
[self = std::move(self)]() mutable { self.next(); });
|
[self = std::move(self)]() mutable { self.next(); });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -746,7 +747,7 @@ PowerlevelsSpacesListModel::commit()
|
||||||
{
|
{
|
||||||
std::vector<std::string> spacesToApplyTo;
|
std::vector<std::string> spacesToApplyTo;
|
||||||
|
|
||||||
for (const auto &s : spaces)
|
for (const auto &s : qAsConst(spaces))
|
||||||
if (s.apply)
|
if (s.apply)
|
||||||
spacesToApplyTo.push_back(s.roomid);
|
spacesToApplyTo.push_back(s.roomid);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue