Mark the module free of qAsConst()

Change-Id: I914ccc09297ac6283d7cf24d5afc96ebdaf294d0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Marc Mutz 2022-11-21 11:40:33 +01:00
parent 0f2a7b1932
commit afc2abdebf
3 changed files with 3 additions and 2 deletions

View File

@ -2,5 +2,6 @@ set(QT_REPO_MODULE_VERSION "6.5.0")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_LEAN_HEADERS=1")
list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
# Use cpp-based syncqt
set(QT_USE_SYNCQT_CPP TRUE)

View File

@ -485,7 +485,7 @@ void QQmlJSImporter::processImport(const QQmlJSScope::Import &importDescription,
}
}
for (const auto &val : qAsConst(import.objects)) {
for (const auto &val : std::as_const(import.objects)) {
// Otherwise we have already done it in localFile2ScopeTree()
if (!val.scope.factory() && val.scope->baseType().isNull()) {

View File

@ -418,7 +418,7 @@ QQmlJSScope::ImportedScope<QQmlJSScope::ConstPtr> QQmlJSScope::findType(
if (outerType == contextualTypes.types().constEnd())
break;
for (const auto &innerType : qAsConst(outerType->scope->m_childScopes)) {
for (const auto &innerType : std::as_const(outerType->scope->m_childScopes)) {
if (innerType->m_internalName == name) {
useType();
return { innerType, outerType->revision };