Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
3
-
4111059b2 (dev), 9d89e28f1 (6.8), b1b3af02c (dev), f3007e862 (6.8)
-
Foundation Sprint 110, Foundation Sprint 111, Foundation Sprint 112, Foundation Sprint 113, Foundation Sprint 114, Foundation Sprint 115, Foundation Sprint 116, Foundation Sprint 117, Foundation Sprint 118, Foundation Sprint 119, Foundation Sprint 120, Foundation Sprint 121, Foundation Sprint 122
Description
Compiling tst_moc always throws some moc warnings because we test some stuff. Consider porting those tests that cause moc to warn to the framework since developed in tst_moc whereby the test itself runs moc and scans the output for expected warnings.
That will help keep the build clean.
Example output:
[2037/5626] Automatic MOC for target tst_moc AutoMoc: /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/tst_moc.cpp:1900:1: warning: Property declaration dummy has neither an associated QProperty<> member, nor a READ accessor function nor an associated MEMBER variable. The property will be invalid. [2081/5626] Generating moc_pure-virtual-signals.cpp /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/pure-virtual-signals.h:13:1: warning: Signals cannot be declared virtual /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/pure-virtual-signals.h:15:1: warning: Signals cannot be declared virtual [2093/5626] Generating moc_using-namespaces.cpp /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/using-namespaces.h: note: No relevant classes found. No output generated. [2109/5626] Building CXX object tests/auto/tools/moc/CMakeFiles/tst_moc.dir/moc_backslash-newlines.cpp.o In file included from /home/marc/Qt/qtbase-submit-build-2/tests/auto/tools/moc/moc_backslash-newlines.cpp:9: /home/marc/Qt/qtbase-submit-build-2/tests/auto/tools/moc/../../../../../qtbase-submit/tests/auto/tools/moc/backslash-newlines.h:35:1: warning: multi-line comment [-Wcomment] 35 | // ends with \\\r should not make moc crash (QTBUG-53441) (no new lines on purpose!!) \ | ^ [2322/5626] Building CXX object tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o In file included from /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/tst_moc.cpp:20: /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/backslash-newlines.h:35:1: warning: multi-line comment [-Wcomment] 35 | // ends with \\\r should not make moc crash (QTBUG-53441) (no new lines on purpose!!) \ | ^ In file included from /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/tst_moc.cpp:19: /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/single_function_keyword.h:27:26: warning: inline function ‘void SingleFunctionKeywordBeforeInline::mySignal()’ used but never defined 27 | Q_SIGNAL inline void mySignal(); | ^~~~~~~~ /home/marc/Qt/qtbase-submit/tests/auto/tools/moc/single_function_keyword.h:41:26: warning: inline function ‘void SingleFunctionKeywordAfterInline::mySignal()’ used but never defined 41 | inline Q_SIGNAL void mySignal(); | ^~~~~~~~