mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
fix c++11 range-loop might detach Qt container
This commit is contained in:
parent
d113733ce0
commit
c5af3543e6
2 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ UserMentions::initializeMentions(const QMap<QString, mtx::responses::Notificatio
|
||||||
nhlog::ui()->debug("Initializing " + std::to_string(notifs.size()) + " notifications.");
|
nhlog::ui()->debug("Initializing " + std::to_string(notifs.size()) + " notifications.");
|
||||||
|
|
||||||
for (const auto &item : notifs) {
|
for (const auto &item : notifs) {
|
||||||
for (const auto notif : item.notifications) {
|
for (const auto ¬if : item.notifications) {
|
||||||
const auto event_id = QString::fromStdString(utils::event_id(notif.event));
|
const auto event_id = QString::fromStdString(utils::event_id(notif.event));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -91,7 +91,7 @@ DelegateChooser::clearChoices(QQmlListProperty<DelegateChoice> *p)
|
||||||
void
|
void
|
||||||
DelegateChooser::recalcChild()
|
DelegateChooser::recalcChild()
|
||||||
{
|
{
|
||||||
for (const auto choice : choices_) {
|
for (const auto choice : qAsConst(choices_)) {
|
||||||
auto choiceValue = choice->roleValue();
|
auto choiceValue = choice->roleValue();
|
||||||
if (!roleValue_.isValid() || !choiceValue.isValid() || choiceValue == roleValue_) {
|
if (!roleValue_.isValid() || !choiceValue.isValid() || choiceValue == roleValue_) {
|
||||||
if (child) {
|
if (child) {
|
||||||
|
|
Loading…
Reference in a new issue