abc.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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()
  19. : QObject()
  20. {
  21. }
  22. public slots:
  23. void print() const { printf("abc\n"); }
  24. };
  25. Abc::Abc()
  26. : QObject()
  27. {
  28. }
  29. void Abc::doAbc()
  30. {
  31. PrintAbc pa;
  32. pa.print();
  33. AbcP abcP;
  34. abcP.doAbcP();
  35. }
  36. // check that including the moc file for the cpp file and the header works:
  37. #include "abc.moc"
  38. #include "moc_abc.cpp"
  39. #include "moc_abc_p.cpp"
  40. // check that including a moc file from another header works:
  41. #include "moc_xyz.cpp"