summaryrefslogtreecommitdiffstats
path: root/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:39:19 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-07 17:16:32 +0200
commitccb65cdb1b8efc4c16e6b6cee4a763f7e9e58e60 (patch)
treef4b5b0d3c3145c24f7b0d7557f8c8ba6670e338d /src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp
parentb29b3eacc3c480c39d84576705d7e1f2716a0645 (diff)
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: Ifc205a53ed6809f98d6cd552de901ea7e90716f5 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp')
-rw-r--r--src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp b/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp
index 010bddf..d654d80 100644
--- a/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp
+++ b/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp
@@ -658,7 +658,7 @@ void QAbstractItemModelReplicaImplementation::fetchPendingHeaderData()
QList<int> roles;
QList<int> sections;
QList<Qt::Orientation> orientations;
- for (const RequestedHeaderData &data : qAsConst(m_requestedHeaderData)) {
+ for (const RequestedHeaderData &data : std::as_const(m_requestedHeaderData)) {
roles.push_back(data.role);
sections.push_back(data.section);
orientations.push_back(data.orientation);
@@ -674,7 +674,7 @@ void QAbstractItemModelReplicaImplementation::onLayoutChanged(const QtPrivate::I
QAbstractItemModel::LayoutChangeHint hint)
{
QList<QPersistentModelIndex> indexes;
- for (const QtPrivate::ModelIndex &parent : qAsConst(parents)) {
+ for (const QtPrivate::ModelIndex &parent : std::as_const(parents)) {
const QModelIndex parentIndex = toQModelIndex(QtPrivate::IndexList{parent}, q);
indexes << QPersistentModelIndex(parentIndex);
}