Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
If one declares the same Q_PROPERTY multiple times, moc limits itself to a warning. E.g.
class Test : public QObject { Q_OBJECT Q_PROPERTY(int foo MEMBER m_foo); Q_PROPERTY(int foo MEMBER m_foo); int m_foo; };
Results in moc warning:
main.cpp:10:1: warning: The property 'foo' is defined multiple times in class Test.
IMHO this should be a plain build error. There's no defined sematnics on what happens – which declaration "wins"? What if they conflict on which getters/setters to use?