From 0ba063f4361e543d0d359d403acf978c92a990a8 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 27 Dec 2022 15:41:55 +0100 Subject: [PATCH] Enable QT_NO_AS_CONST globally All current modules are free of qAsConst, make sure new ones will be, too. Change-Id: Iae3c67bca86eddf62ae664b00ff39a9b513d7290 Reviewed-by: Thiago Macieira Reviewed-by: Volker Hilsheimer --- .cmake.conf | 1 - cmake/QtInternalTargets.cmake | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.cmake.conf b/.cmake.conf index d176a5ab757..f183bf63379 100644 --- a/.cmake.conf +++ b/.cmake.conf @@ -5,7 +5,6 @@ # (directly by qtbase) we actually add the extra definitions if (NOT DEFINED QT_SUPERBUILD OR DEFINED QT_REPO_MODULE_VERSION) set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_LEAN_HEADERS=1") - list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") endif() set(QT_REPO_MODULE_VERSION "6.6.0") diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 8de5f8a080a..21730457d84 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -151,6 +151,7 @@ qt_internal_add_target_aliases(PlatformToolInternal) target_link_libraries(PlatformToolInternal INTERFACE PlatformAppInternal) qt_internal_add_global_definition(QT_NO_JAVA_STYLE_ITERATORS) +qt_internal_add_global_definition(QT_NO_AS_CONST) qt_internal_add_global_definition(QT_NO_QEXCHANGE) qt_internal_add_global_definition(QT_NO_NARROWING_CONVERSIONS_IN_CONNECT) qt_internal_add_global_definition(QT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH)