Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.6.0 Beta1
-
None
-
-
2b9ef2eb4 (dev), 343fa701e (6.6)
Description
Code like
QObject::connect(a, &QAction::triggered, &w, []() { qDebug(__FUNCTION__); });
triggers
main.cpp C:\Qt\6.6.0\msvc2019_64\include\QtCore/qobject.h(210): warning C4189: 'SlotArgumentCount': local variable is initialized but not referenced ..\untitled\main.cpp(16): note: see reference to function template instantiation 'QMetaObject::Connection QObject::connect<void(__cdecl QAction::* )(bool),main::<lambda_1>>(const QAction *,Func1,const QtPrivate::ContextTypeForFunctor<main::<lambda_1>,void>::ContextType *,Func2 &&,Qt::ConnectionType)' being compiled with [ Func1=void (__cdecl QAction::* )(bool), Func2=main::<lambda_1> ] link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\untitled.exe @C:\temp\untitled.exe.3368.2422.jom
with
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32535 for x64
Attachments
For Gerrit Dashboard: QTBUG-114781 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
487187,3 | Pacify MSVC compiler incorrectly warning about unused variable | dev | qt/qtbase | Status: MERGED | +2 | 0 |
487299,2 | Pacify MSVC compiler incorrectly warning about unused variable | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |