0855f62791
The use of QT_OVERLOADED_MACRO combined with pedantic warnings would result in warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments] when used with a single argument, as the QT_VA_ARGS_COUNT macro would end up not passing anything to the last ... argument of the helper macro QT_VA_ARGS_CHOOSE. To work around this we extend the arguments passed to QT_VA_ARGS_CHOOSE by one, adding a zero-count, so that the variadic parameter always has at least one argument. Unfortunately this doesn't give us a count of 0 if a overloaded Qt macro is used without arguments, due to __VA_ARGS__ always being treated as an argument to QT_VA_ARGS_CHOOSE, even when empty, due to the comma after it. The result is that we end up calling the 1-argument macro for this case as well. Getting a correct zero-count, for both MSVC and GCC/Clang, without using GCC extensions, is quite involved, so we're opting to live with this limitation. See https://stackoverflow.com/a/62183700 for details. Fixes: QTBUG-93750 Pick-to: 6.1 Change-Id: Ib7b26216f36a639642a70387e0d73223633ba6b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.prev_configure.cmake | ||
.prev_qt_cmdline.cmake | ||
.qmake.conf | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
configure.json | ||
dependencies.yaml | ||
INSTALL | ||
LICENSE.FDL | ||
LICENSE.GPL2 | ||
LICENSE.GPL3 | ||
LICENSE.GPL3-EXCEPT | ||
LICENSE.LGPL3 | ||
LICENSE.LGPLv3 | ||
LICENSE.QT-LICENSE-AGREEMENT | ||
qt_cmdline.cmake | ||
sync.profile |