Written by marcelpetrick
on September 4, 2019
This error is too ‘good’ to be just put into “Today I learned”.
While adapting some unit-testing-code for one of the classes, I received from minGW a error stating:
1 2 3 |
Output ------ C:/Repos/repoName/filename.h:23: Error: Not a signal or slot declaration |
What is the problem? The member-declaration looked totally valid.
Until I realized I had removed the (now commented) “private”-statement and therefore the pointers were seen by the MOC as signals/slots. Which they weren’t!
1 2 3 4 5 6 7 8 9 |
.. private Q_SLOTS: void initTestCase( void ); void cleanupTestCase( void ); //private: classA* _serialPort = nullptr; classB* _flickerSensor = nullptr; .. |
Shame on me :’)