File indexing completed on 2024-05-05 05:41:37

0001 #include <QtCore/QObject>
0002 
0003 class TestBugNew : public QObject
0004 {
0005     Q_OBJECT
0006 
0007 Q_SIGNALS:
0008     void someSignal();
0009 
0010 protected:
0011     void protectedMethod();  // Needed to triggers the bug
0012 };
0013 
0014 // Needed to trigger the bug
0015 void TestBugNew::someSignal()
0016 {
0017 }
0018 
0019 // include subclass moc file which includes header of subclass with inline method using signal
0020 class SubTestBugNew : public TestBugNew
0021 {
0022     Q_OBJECT
0023 public:
0024     void otherMethod();
0025 };
0026 
0027 void SubTestBugNew::otherMethod()
0028 {
0029     emit someSignal(); // OK
0030 }