Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
4.7.1
Description
If two headers in different sub-folders both have the same filename and invoke the Q_OBJECT macro, reduce the possibility of conflicts in the generated files.
Consider the following files:
slider/view.hpp
button/view.hpp
If they both invoke Q_OBJECT macro, the resulting makefile will attempt to generate moc_view.cpp for each.
A possible solution is to detect such a conflict, and find the minimal difference in path and add a sentry for conflict mode. So the above would generate:
mocc_slider_view.cpp
mocc_button_view.cpp