From 3a07c391847b81c7bf40d95fc4d7c49f63073abc Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 11 Nov 2022 16:26:04 +0100 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. This is a 6.4 re-run of the script we ran in dev, in order to avoid conflicts between the branches when cherry-picking. Change-Id: I5eca3df3179dfb2b2682c75a479ba9a4259cc703 Reviewed-by: Volker Hilsheimer --- src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp') diff --git a/src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp index 70fb1fe62d..b0b0500fab 100644 --- a/src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp +++ b/src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp @@ -34,7 +34,7 @@ exec(e->globalPos()); //! [6] QMenu menu; QAction *at = actions[0]; // Assumes actions is not empty -for (QAction *a : qAsConst(actions)) +for (QAction *a : std::as_const(actions)) menu.addAction(a); menu.exec(pos, at); //! [6] -- cgit v1.2.1