Skip to content

Commit 2e4641d

Browse files
committed
Replace deprecated qAsConst usage
../src/customeditor/customeditor.cpp:152:40: warning: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<QString>; typename std::add_const<_Tp>::type = const QList<QString>]’ is deprecated: Use std::as_const() instead. [-Wdeprecated-declarations]
1 parent 25636ec commit 2e4641d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/customeditor/customeditor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ QLayout *CustomEditor::buildKeyboard()
149149

150150
// Otherwise try to get a sane fallback
151151
QStringList langs({ "US", "German" });
152-
for (const QString &lang : qAsConst(langs)) {
152+
for (const QString &lang : std::as_const(langs)) {
153153
if (keyboardKeys.contains(lang)) {
154154
qWarning("Failed to find a compatible layout for keyboard layout %s, using %s as fallback.", qUtf8Printable(kbdLayout), qUtf8Printable(lang));
155155
return buildLayoutFromJson(keyboardKeys[lang].toObject());
@@ -366,7 +366,7 @@ void CustomEditor::clearAll()
366366
device->displayCustomFrame();
367367

368368
// Reset view
369-
for (auto matrixPushButton : qAsConst(matrixPushButtons)) {
369+
for (auto matrixPushButton : std::as_const(matrixPushButtons)) {
370370
matrixPushButton->resetButtonColor();
371371
}
372372

0 commit comments

Comments
 (0)