summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-10-13 23:28:57 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-10-13 23:29:32 +0200
commit45ecb71444143a6f7ae8d2ae21a1b071fc708616 (patch)
treeb8c33354879575e84e4219b0eb7a4b11da740d60 /src/timeline
parentFix (hopefully) HiDPI scaling issues with edit and encryption icons (diff)
downloadnheko-45ecb71444143a6f7ae8d2ae21a1b071fc708616.tar.xz
Qt6.6 compatibility
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/CommunitiesModel.cpp2
-rw-r--r--src/timeline/DelegateChooser.cpp4
-rw-r--r--src/timeline/EventDelegateChooser.cpp4
-rw-r--r--src/timeline/EventStore.cpp2
-rw-r--r--src/timeline/InputBar.cpp2
-rw-r--r--src/timeline/RoomlistModel.cpp4
6 files changed, 9 insertions, 9 deletions
diff --git a/src/timeline/CommunitiesModel.cpp b/src/timeline/CommunitiesModel.cpp

index 3c09d747..e1018f38 100644 --- a/src/timeline/CommunitiesModel.cpp +++ b/src/timeline/CommunitiesModel.cpp
@@ -581,7 +581,7 @@ CommunitiesModel::setCurrentTagId(const QString &tagId) if (tagId.startsWith(QLatin1String("tag:"))) { auto tag = tagId.mid(4); - for (const auto &t : qAsConst(tags_)) { + for (const auto &t : std::as_const(tags_)) { if (t == tag) { this->currentTagId_ = tagId; UserSettings::instance()->setCurrentTagId(tagId); diff --git a/src/timeline/DelegateChooser.cpp b/src/timeline/DelegateChooser.cpp
index 91b2194b..b95116ec 100644 --- a/src/timeline/DelegateChooser.cpp +++ b/src/timeline/DelegateChooser.cpp
@@ -96,7 +96,7 @@ DelegateChooser::clearChoices(QQmlListProperty<DelegateChoice> *p) void DelegateChooser::recalcChild() { - for (const auto choice : qAsConst(choices_)) { + for (const auto choice : std::as_const(choices_)) { const auto &choiceValue = choice->roleValueRef(); if (choiceValue == roleValue_ || (!choiceValue.isValid() && !roleValue_.isValid())) { if (child_) { @@ -134,7 +134,7 @@ DelegateChooser::DelegateIncubator::statusChanged(QQmlIncubator::Status status) } else if (status == QQmlIncubator::Error) { auto errors_ = errors(); - for (const auto &e : qAsConst(errors_)) + for (const auto &e : std::as_const(errors_)) nhlog::ui()->error("Error instantiating delegate: {}", e.toString().toStdString()); } } diff --git a/src/timeline/EventDelegateChooser.cpp b/src/timeline/EventDelegateChooser.cpp
index 4367bb9c..19a5357a 100644 --- a/src/timeline/EventDelegateChooser.cpp +++ b/src/timeline/EventDelegateChooser.cpp
@@ -242,7 +242,7 @@ EventDelegateChooser::DelegateIncubator::reset(QString id) .toInt(); this->oldType = role; - for (const auto choice : qAsConst(chooser.choices_)) { + for (const auto choice : std::as_const(chooser.choices_)) { const auto &choiceValue = choice->roleValues(); if (choiceValue.contains(role) || choiceValue.empty()) { // nhlog::ui()->debug( @@ -288,7 +288,7 @@ EventDelegateChooser::DelegateIncubator::statusChanged(QQmlIncubator::Status sta chooser.polish(); } else if (status == QQmlIncubator::Error) { auto errors_ = errors(); - for (const auto &e : qAsConst(errors_)) + for (const auto &e : std::as_const(errors_)) nhlog::ui()->error("Error instantiating delegate: {}", e.toString().toStdString()); } } diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp
index e29dfb4c..3db70f77 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp
@@ -800,7 +800,7 @@ EventStore::enableKeyRequests(bool suppressKeyRequests_) { if (!suppressKeyRequests_) { auto keys = decryptedEvents_.keys(); - for (const auto &key : qAsConst(keys)) + for (const auto &key : std::as_const(keys)) if (key.room == this->room_id_) decryptedEvents_.remove(key); suppressKeyRequests = false; diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index a371e2b4..fcec8e9c 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp
@@ -491,7 +491,7 @@ InputBar::message(const QString &msg, MarkdownOverride useMarkdown, bool rainbow QString body; bool firstLine = true; auto lines = QStringView(related.quoted_body).split(u'\n'); - for (auto line : qAsConst(lines)) { + for (auto line : std::as_const(lines)) { if (firstLine) { firstLine = false; body = QStringLiteral("> <%1> %2\n").arg(related.quoted_user, line); diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp
index 2bffc9be..5ea6f8c8 100644 --- a/src/timeline/RoomlistModel.cpp +++ b/src/timeline/RoomlistModel.cpp
@@ -340,7 +340,7 @@ RoomlistModel::addRoom(const QString &room_id, bool suppressInsertNotification) int total_unread_msgs = 0; - for (const auto &room : qAsConst(models)) { + for (const auto &room : std::as_const(models)) { if (!room.isNull() && !room->isSpace()) total_unread_msgs += room->notificationCount(); } @@ -948,7 +948,7 @@ FilteredRoomlistModel::updateHiddenTagsAndSpaces() hideDMs = false; auto hidden = UserSettings::instance()->hiddenTags(); - for (const auto &t : qAsConst(hidden)) { + for (const auto &t : std::as_const(hidden)) { if (t.startsWith(u"tag:")) hiddenTags.push_back(t.mid(4)); else if (t.startsWith(u"space:"))