From 1052aaed63bab5f7c10346c097f95793343df5d5 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 6 Oct 2022 11:45:10 +0200 Subject: Port from qAsConst() to std::as_const() We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I4b5f85df579532c2af938fe70db945ba273782fb Reviewed-by: Allan Sandfeld Jensen --- examples/webenginewidgets/stylesheetbrowser/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/webenginewidgets/stylesheetbrowser/mainwindow.cpp b/examples/webenginewidgets/stylesheetbrowser/mainwindow.cpp index cbe678fc8..ab786d5c9 100644 --- a/examples/webenginewidgets/stylesheetbrowser/mainwindow.cpp +++ b/examples/webenginewidgets/stylesheetbrowser/mainwindow.cpp @@ -27,7 +27,7 @@ MainWindow::MainWindow(const QUrl &url) : // Add back default style sheets if the user cleared them out loadDefaultStyleSheets(); } else { - for (auto name : qAsConst(styleSheets)) { + for (auto name : std::as_const(styleSheets)) { StyleSheet styleSheet = settings.value(name).value(); if (styleSheet.second) insertStyleSheet(name, styleSheet.first, false); -- cgit v1.2.1