mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Use std::as_const here
This commit is contained in:
parent
a4a14ca162
commit
293af7df36
2 changed files with 4 additions and 4 deletions
|
|
@ -62,7 +62,7 @@ void DesktopModel::loadSettings()
|
||||||
m_appOrder = m_applet->config().readEntry("AppOrder", QStringList());
|
m_appOrder = m_applet->config().readEntry("AppOrder", QStringList());
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (const QString &app : qAsConst(m_appOrder)) {
|
for (const QString &app : std::as_const(m_appOrder)) {
|
||||||
m_appPositions[app] = i;
|
m_appPositions[app] = i;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
@ -223,7 +223,7 @@ void DesktopModel::moveItem(int row, int destination)
|
||||||
m_appOrder.clear();
|
m_appOrder.clear();
|
||||||
m_appPositions.clear();
|
m_appPositions.clear();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (const ApplicationData &app : qAsConst(m_applicationList)) {
|
for (const ApplicationData &app : std::as_const(m_applicationList)) {
|
||||||
m_appOrder << app.uniqueId;
|
m_appOrder << app.uniqueId;
|
||||||
m_appPositions[app.uniqueId] = i;
|
m_appPositions[app.uniqueId] = i;
|
||||||
++i;
|
++i;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ void LanguageModel::loadPlugins()
|
||||||
langPaths << it.next();
|
langPaths << it.next();
|
||||||
}
|
}
|
||||||
m_languages.clear();
|
m_languages.clear();
|
||||||
for (const auto &langPath : qAsConst(langPaths)) {
|
for (const auto &langPath : std::as_const(langPaths)) {
|
||||||
QPluginLoader langPlugin(langPath);
|
QPluginLoader langPlugin(langPath);
|
||||||
const auto &metadata = langPlugin.metaData().value("MetaData").toObject();
|
const auto &metadata = langPlugin.metaData().value("MetaData").toObject();
|
||||||
Data lang;
|
Data lang;
|
||||||
|
|
@ -79,7 +79,7 @@ bool LanguageModel::setData(const QModelIndex &index, const QVariant &value, int
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList enabledLangs;
|
QStringList enabledLangs;
|
||||||
for (const auto &data : qAsConst(m_languages)) {
|
for (const auto &data : std::as_const(m_languages)) {
|
||||||
if (data.enabled) {
|
if (data.enabled) {
|
||||||
enabledLangs << data.langCode;
|
enabledLangs << data.langCode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue