diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-02-07 02:52:18 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-02-07 02:56:03 +0100 |
commit | c5af3543e64c03eb22912b6317f4bbad4dbe14f5 (patch) | |
tree | 79b38b9396955cf04f59226fd6519540bb17e8b3 | |
parent | Don't leak the full file path when sending file (diff) | |
download | nheko-c5af3543e64c03eb22912b6317f4bbad4dbe14f5.tar.xz |
fix c++11 range-loop might detach Qt container
-rw-r--r-- | src/popups/UserMentions.cpp | 2 | ||||
-rw-r--r-- | src/timeline/DelegateChooser.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/popups/UserMentions.cpp b/src/popups/UserMentions.cpp index b0223f7f..2e70dbd3 100644 --- a/src/popups/UserMentions.cpp +++ b/src/popups/UserMentions.cpp @@ -74,7 +74,7 @@ UserMentions::initializeMentions(const QMap<QString, mtx::responses::Notificatio nhlog::ui()->debug("Initializing " + std::to_string(notifs.size()) + " notifications."); 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)); try { diff --git a/src/timeline/DelegateChooser.cpp b/src/timeline/DelegateChooser.cpp index 632a2a64..46ab6c0e 100644 --- a/src/timeline/DelegateChooser.cpp +++ b/src/timeline/DelegateChooser.cpp @@ -91,7 +91,7 @@ DelegateChooser::clearChoices(QQmlListProperty<DelegateChoice> *p) void DelegateChooser::recalcChild() { - for (const auto choice : choices_) { + for (const auto choice : qAsConst(choices_)) { auto choiceValue = choice->roleValue(); if (!roleValue_.isValid() || !choiceValue.isValid() || choiceValue == roleValue_) { if (child) { |