aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/room.cpp2
-rw-r--r--lib/settings.cpp11
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 0a4e041b..6b2b7b23 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -553,7 +553,7 @@ QStringList Room::localAliases() const
QStringList Room::remoteAliases() const
{
QStringList result;
- for (const auto& s : d->aliasServers)
+ for (const auto& s : std::as_const(d->aliasServers))
result += d->getCurrentState<RoomAliasesEvent>(s)->aliases();
return result;
}
diff --git a/lib/settings.cpp b/lib/settings.cpp
index 5413693d..dd086d9c 100644
--- a/lib/settings.cpp
+++ b/lib/settings.cpp
@@ -53,11 +53,12 @@ bool Settings::contains(const QString& key) const
QStringList Settings::childGroups() const
{
- auto l = QSettings::childGroups();
- for (const auto& g: legacySettings.childGroups())
- if (!l.contains(g))
- l.push_back(g);
- return l;
+ auto groups = QSettings::childGroups();
+ const auto& legacyGroups = legacySettings.childGroups();
+ for (const auto& g: legacyGroups)
+ if (!groups.contains(g))
+ groups.push_back(g);
+ return groups;
}
void SettingsGroup::setValue(const QString& key, const QVariant& value)