1
0

abc.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2004-2011 Kitware, Inc.
  4. Copyright 2011 Alexander Neundorf ([email protected])
  5. Distributed under the OSI-approved BSD License (the "License");
  6. see accompanying file Copyright.txt for details.
  7. This software is distributed WITHOUT ANY WARRANTY; without even the
  8. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. See the License for more information.
  10. ============================================================================*/
  11. #include "abc.h"
  12. #include "abc_p.h"
  13. #include <stdio.h>
  14. class PrintAbc : public QObject
  15. {
  16. Q_OBJECT
  17. public:
  18. PrintAbc():QObject() {}
  19. public slots:
  20. void print() const { printf("abc\n"); }
  21. };
  22. Abc::Abc()
  23. :QObject()
  24. {
  25. }
  26. void Abc::doAbc()
  27. {
  28. PrintAbc pa;
  29. pa.print();
  30. AbcP abcP;
  31. abcP.doAbcP();
  32. }
  33. // check that including the moc file for the cpp file and the header works:
  34. #include "abc.moc"
  35. #include "moc_abc.cpp"
  36. #include "moc_abc_p.cpp"
  37. // check that including a moc file from another header works:
  38. #include "moc_xyz.cpp"