1 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2    file Copyright.txt or https://cmake.org/licensing for details.  */
3 #include "abc.h"
4 
5 #include <stdio.h>
6 
7 #include "abc_p.h"
8 
9 class PrintAbc : public QObject
10 {
11   Q_OBJECT
12 public:
PrintAbc()13   PrintAbc()
14     : QObject()
15   {
16   }
17 public slots:
print() const18   void print() const { printf("abc\n"); }
19 };
20 
Abc()21 Abc::Abc()
22   : QObject()
23 {
24 }
25 
doAbc()26 void Abc::doAbc()
27 {
28   PrintAbc pa;
29   pa.print();
30   AbcP abcP;
31   abcP.doAbcP();
32 }
33 
34 // check that including the moc file for the cpp file and the header works:
35 #include "abc.moc"
36 #include "moc_abc.cpp"
37 #include "moc_abc_p.cpp"
38 
39 // check that including a moc file from another header works:
40 #include "moc_xyz.cpp"
41