diff --git a/sources/shortcutmanager.cpp b/sources/shortcutmanager.cpp index 083c4a44a..a6792159c 100644 --- a/sources/shortcutmanager.cpp +++ b/sources/shortcutmanager.cpp @@ -21,6 +21,7 @@ #include #include #include +#include namespace { const QString SETTINGS_GROUP = QStringLiteral("shortcuts/"); @@ -143,7 +144,7 @@ void ShortcutManager::setSequence(const QString &id, const QKeySequence &sequenc settings.setValue(key, sequence.toString()); } - for (const QPointer &target : qAsConst(it->targets)) { + for (const QPointer &target : std::as_const(it->targets)) { if (target) { target->setProperty("shortcut", QVariant::fromValue(sequence)); } diff --git a/sources/ui/configpage/shortcutsconfigpage.cpp b/sources/ui/configpage/shortcutsconfigpage.cpp index f5bf58f94..f13f12fe5 100644 --- a/sources/ui/configpage/shortcutsconfigpage.cpp +++ b/sources/ui/configpage/shortcutsconfigpage.cpp @@ -31,6 +31,7 @@ #include #include #include +#include /** @brief ShortcutsConfigPage::ShortcutsConfigPage @@ -198,7 +199,7 @@ void ShortcutsConfigPage::resetRow(int row_index) void ShortcutsConfigPage::resetAllRows() { - for (const Row &row : qAsConst(m_rows)) { + for (const Row &row : std::as_const(m_rows)) { row.edit->setKeySequence(row.default_sequence); } checkConflicts(); @@ -211,7 +212,7 @@ void ShortcutsConfigPage::resetAllRows() */ void ShortcutsConfigPage::applyConf() { - for (const Row &row : qAsConst(m_rows)) { + for (const Row &row : std::as_const(m_rows)) { ShortcutManager::instance().setSequence(row.id, row.edit->keySequence()); } }