Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.3, 6.5, 6.6.0 Beta2, 6.7.0 FF, 6.7
-
6.5.1, 6.6.0 Beta1
-
None
-
b7b63ba92 (dev), 039c48b0e (6.6), bca9e06ac (6.5)
Description
Attached a simple QML example with a Loader. Building this example with a standard cmake setup works fine.
Enabling the -Werror and -Wshadow flags causes a compilation failure:
/home/gagi/work/tests/build-qml_wshadow-Desktop_Qt_6_6_0_GCC_64bit-Debug/.rcc/qmlcache/appqml_wshadow_Main_qml.cpp: In lambda function: /home/gagi/work/tests/build-qml_wshadow-Desktop_Qt_6_6_0_GCC_64bit-Debug/.rcc/qmlcache/appqml_wshadow_Main_qml.cpp:259:114: error: declaration of ‘void** argumentsPtr’ shadows a parameter [-Werror=shadow] 259 | wrapCall(aotContext, dataPtr, argumentsPtr, [](const QQmlPrivate::AOTCompiledContext *aotContext, void **argumentsPtr) { | ~~~~~~~^~~~~~~~~~~~ /home/gagi/work/tests/build-qml_wshadow-Desktop_Qt_6_6_0_GCC_64bit-Debug/.rcc/qmlcache/appqml_wshadow_Main_qml.cpp:258:81: note: shadowed declaration is here 258 | [](const QQmlPrivate::AOTCompiledContext *aotContext, void *dataPtr, void **argumentsPtr) { | ~~~~~~~^~~~~~~~~~~~ /home/gagi/work/tests/build-qml_wshadow-Desktop_Qt_6_6_0_GCC_64bit-Debug/.rcc/qmlcache/appqml_wshadow_Main_qml.cpp:259:95: error: declaration of ‘const QQmlPrivate::AOTCompiledContext* aotContext’ shadows a parameter [-Werror=shadow] 259 | wrapCall(aotContext, dataPtr, argumentsPtr, [](const QQmlPrivate::AOTCompiledContext *aotContext, void **argumentsPtr) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /home/gagi/work/tests/build-qml_wshadow-Desktop_Qt_6_6_0_GCC_64bit-Debug/.rcc/qmlcache/appqml_wshadow_Main_qml.cpp:258:47: note: shadowed declaration is here 258 | [](const QQmlPrivate::AOTCompiledContext *aotContext, void *dataPtr, void **argumentsPtr) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ cc1plus: all warnings being treated as errors