summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/updating-selections/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/doc/snippets/updating-selections/window.cpp')
-rw-r--r--src/widgets/doc/snippets/updating-selections/window.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/doc/snippets/updating-selections/window.cpp b/src/widgets/doc/snippets/updating-selections/window.cpp
index b47e15e084..b965b81008 100644
--- a/src/widgets/doc/snippets/updating-selections/window.cpp
+++ b/src/widgets/doc/snippets/updating-selections/window.cpp
@@ -42,7 +42,7 @@ void MainWindow::updateSelection(const QItemSelection &selected,
{
QModelIndexList items = selected.indexes();
- for (const QModelIndex &index : qAsConst(items)) {
+ for (const QModelIndex &index : std::as_const(items)) {
QString text = QString("(%1,%2)").arg(index.row()).arg(index.column());
model->setData(index, text);
//! [0] //! [1]
@@ -52,7 +52,7 @@ void MainWindow::updateSelection(const QItemSelection &selected,
//! [2]
items = deselected.indexes();
- for (const QModelIndex &index : qAsConst(items)) {
+ for (const QModelIndex &index : std::as_const(items)) {
model->setData(index, QString());
}
//! [2]