qt6-bb10/tests/auto/tools/moc
Marc Mutz f3007e8624 tst_moc: fix 'inline function used but never defined' GCC warning
GCC doesn't have a specific warning flag for this warning, so we can't
add a GCC case to the existing Clang suppression in the header.

Hovever, the issue can be fixed by including the moc file into
tst_moc.cpp, so that the compiler sees the definition of the inline
signal provided by the said moc file. This means we can also drop the
Clang warning suppressions.

To prevent duplicate definition linker errors, remove the header file
from JSON_FILES, and the forced separate compilation that entails.

I'm pretty sure that some cmake magic could preserve the JSON test
coverage, but a) the file doesn't emit anything special in its json
(certainly nothing about the inline'ness of the signals) and b) the
presence of mySlot() and mySignal() as slot and signal on these
classes is already tested by singleFunctionKeywordSignalAndSlot().

Amends the start of the public history, but not picking back far,
because a) a prequel commit to this commit wasn't picked further,
either, and b) this has been such a long-standing issue that it's
clear no-one cares and so it's just not worth the risk, however small
that may be, to backport.

On GCC, the only remaining warnings thrown by tst_moc are now
moc-generated ones.

Task-number: QTBUG-119042
Change-Id: Icde1eee6c97bd48d72e15461b6ec80c50c044eaa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b1b3af02c0fb8084d2eb984b1f7ae68f1861f9a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-18 08:09:09 +00:00
..
Test.framework/Headers Change license for tests files 2024-02-04 09:56:42 +01:00
subdir Add copyright and licensing to .cpp and .h files missing them 2024-05-28 09:47:01 +02:00
task71021
testproject Change license for tests files 2024-02-04 09:56:42 +01:00
.gitattributes
.gitignore
CMakeLists.txt tst_moc: fix 'inline function used but never defined' GCC warning 2024-06-18 08:09:09 +00:00
Header
allmocs_baseline_in.json tst_moc: fix 'inline function used but never defined' GCC warning 2024-06-18 08:09:09 +00:00
assign-namespace.h Change license for tests files 2024-02-04 09:56:42 +01:00
backslash-newlines.h Change license for tests files 2024-02-04 09:56:42 +01:00
c-comments.h Change license for tests files 2024-02-04 09:56:42 +01:00
cstyle-enums.h Change license for tests files 2024-02-04 09:56:42 +01:00
cxx-attributes.h Change license for tests files 2024-02-04 09:56:42 +01:00
cxx11-enums.h Change license for tests files 2024-02-04 09:56:42 +01:00
cxx11-explicit-override-control.h Change license for tests files 2024-02-04 09:56:42 +01:00
cxx11-final-classes.h Change license for tests files 2024-02-04 09:56:42 +01:00
cxx11-trailing-return.h Change license for tests files 2024-02-04 09:56:42 +01:00
cxx17-namespaces.h Change license for tests files 2024-02-04 09:56:42 +01:00
dir-in-include-path.h Change license for tests files 2024-02-04 09:56:42 +01:00
dollars.h Change license for tests files 2024-02-04 09:56:42 +01:00
enum_inc.h Add copyright and licensing to .cpp and .h files missing them 2024-05-28 09:47:01 +02:00
enum_with_include.h Change license for tests files 2024-02-04 09:56:42 +01:00
error-on-wrong-notify.h Change license for tests files 2024-02-04 09:56:42 +01:00
escapes-in-string-literals.h Change license for tests files 2024-02-04 09:56:42 +01:00
extraqualification.h Change license for tests files 2024-02-04 09:56:42 +01:00
forgotten-qinterface.h Change license for tests files 2024-02-04 09:56:42 +01:00
forward-declared-param.h Change license for tests files 2024-02-04 09:56:42 +01:00
forwarddeclaredparam.h Add copyright and licensing to .cpp and .h files missing them 2024-05-28 09:47:01 +02:00
function-with-attributes.h Change license for tests files 2024-02-04 09:56:42 +01:00
fwdclass1.h Change license for tests files 2024-02-04 09:56:42 +01:00
fwdclass2.h Change license for tests files 2024-02-04 09:56:42 +01:00
fwdclass3.h Change license for tests files 2024-02-04 09:56:42 +01:00
gadgetwithnoenums.h Change license for tests files 2024-02-04 09:56:42 +01:00
grand-parent-gadget-class.h Change license for tests files 2024-02-04 09:56:42 +01:00
interface-from-framework.h Change license for tests files 2024-02-04 09:56:42 +01:00
interface-from-include.h Change license for tests files 2024-02-04 09:56:42 +01:00
macro-on-cmdline.h Change license for tests files 2024-02-04 09:56:42 +01:00
moc_include.h Change license for tests files 2024-02-04 09:56:42 +01:00
namespace.h Change license for tests files 2024-02-04 09:56:42 +01:00
namespace_no_merge.h Change license for tests files 2024-02-04 09:56:42 +01:00
namespaced-base-class.h Change license for tests files 2024-02-04 09:56:42 +01:00
namespaced-flags.h Change license for tests files 2024-02-04 09:56:42 +01:00
no-keywords.h Change license for tests files 2024-02-04 09:56:42 +01:00
non-gadget-parent-class.h Change license for tests files 2024-02-04 09:56:42 +01:00
oldstyle-casts.h Change license for tests files 2024-02-04 09:56:42 +01:00
os9-newlines.h Add REUSE ignore comment 2024-05-08 11:09:28 +00:00
parse-boost.h Change license for tests files 2024-02-04 09:56:42 +01:00
parse-defines.h Change license for tests files 2024-02-04 09:56:42 +01:00
plugin_metadata.h Change license for tests files 2024-02-04 09:56:42 +01:00
pointery_to_incomplete.h Change license for tests files 2024-02-04 09:56:42 +01:00
pp-dollar-signs.h Change license for tests files 2024-02-04 09:56:42 +01:00
pure-virtual-signals.h Change license for tests files 2024-02-04 09:56:42 +01:00
qinvokable.h Change license for tests files 2024-02-04 09:56:42 +01:00
qmlmacro.h Change license for tests files 2024-02-04 09:56:42 +01:00
qprivateslots.h Change license for tests files 2024-02-04 09:56:42 +01:00
qtbug-35657-gadget.h Change license for tests files 2024-02-04 09:56:42 +01:00
related-metaobjects-in-gadget.h Change license for tests files 2024-02-04 09:56:42 +01:00
related-metaobjects-in-namespaces.h Change license for tests files 2024-02-04 09:56:42 +01:00
related-metaobjects-name-conflict.h Change license for tests files 2024-02-04 09:56:42 +01:00
signal-with-default-arg.h Change license for tests files 2024-02-04 09:56:42 +01:00
single-quote-digit-separator-n3781.h Change license for tests files 2024-02-04 09:56:42 +01:00
single_function_keyword.h tst_moc: fix 'inline function used but never defined' GCC warning 2024-06-18 08:09:09 +00:00
slots-with-void-template.h Change license for tests files 2024-02-04 09:56:42 +01:00
task87883.h Change license for tests files 2024-02-04 09:56:42 +01:00
task192552.h Change license for tests files 2024-02-04 09:56:42 +01:00
task234909.h Change license for tests files 2024-02-04 09:56:42 +01:00
task240368.h Change license for tests files 2024-02-04 09:56:42 +01:00
tech-preview.h Long live QT_TECH_PREVIEW_API 2024-02-20 05:01:09 +01:00
template-gtgt.h Change license for tests files 2024-02-04 09:56:42 +01:00
trigraphs.h Change license for tests files 2024-02-04 09:56:42 +01:00
tst_moc.cpp tst_moc: fix 'inline function used but never defined' GCC warning 2024-06-18 08:09:09 +00:00
unterminated-function-macro.h Change license for tests files 2024-02-04 09:56:42 +01:00
using-namespaces.h Change license for tests files 2024-02-04 09:56:42 +01:00
warn-on-multiple-qobject-subclasses.h Change license for tests files 2024-02-04 09:56:42 +01:00
warn-on-property-without-read.h Change license for tests files 2024-02-04 09:56:42 +01:00
win-newlines.h Change license for tests files 2024-02-04 09:56:42 +01:00