diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-10-06 11:39:54 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-10-07 14:37:04 +0200 |
commit | 3ecd6ad4cd0bcec11e17f69e9e5d25057634b048 (patch) | |
tree | 3b31726e55e548e8f1643243715daa4305972995 /tools/qscxmlc/scxmlcppdumper.cpp | |
parent | 8f8aacdeadea1ddf92923f6183c4c67925a25db2 (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: I4b4548c9d4a13337731159c1e1184e48bb0a328b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qscxmlc/scxmlcppdumper.cpp')
-rw-r--r-- | tools/qscxmlc/scxmlcppdumper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp index 5e19d33..46eb496 100644 --- a/tools/qscxmlc/scxmlcppdumper.cpp +++ b/tools/qscxmlc/scxmlcppdumper.cpp @@ -512,7 +512,7 @@ void CppDumper::writeImplStart() << Qt::endl; QStringList includes; - for (DocumentModel::ScxmlDocument *doc : qAsConst(m_translationUnit->allDocuments)) { + for (DocumentModel::ScxmlDocument *doc : std::as_const(m_translationUnit->allDocuments)) { switch (doc->root->dataModel) { case DocumentModel::Scxml::NullDataModel: includes += l("QScxmlNullDataModel"); @@ -534,7 +534,7 @@ void CppDumper::writeImplStart() cpp << Qt::endl << QStringLiteral("#include <qscxmlinvokableservice.h>") << Qt::endl << QStringLiteral("#include <qscxmltabledata.h>") << Qt::endl; - for (const QString &inc : qAsConst(includes)) { + for (const QString &inc : std::as_const(includes)) { cpp << l("#include <") << inc << l(">") << Qt::endl; } cpp << Qt::endl |