blub.cpp 1002 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 "blub.h"
  12. #include <stdio.h>
  13. class BlubBlub : public QObject
  14. {
  15. Q_OBJECT
  16. public:
  17. BlubBlub()
  18. : QObject()
  19. {
  20. }
  21. public slots:
  22. int getValue() const { return 13; }
  23. };
  24. Blub::Blub()
  25. {
  26. }
  27. void Blub::blubber()
  28. {
  29. BlubBlub bb;
  30. printf("Blub blub %d ! \n", bb.getValue());
  31. }
  32. // test the case that the wrong moc-file is included, it should
  33. // actually be "blub.moc"
  34. #include "moc_blub.cpp"