automoc: add test for including a moc_abc_p.cpp file
Alex
This commit is contained in:
parent
30fd8e603a
commit
bc7560e6e5
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "abc.h"
|
#include "abc.h"
|
||||||
|
#include "abc_p.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -35,11 +36,14 @@ void Abc::doAbc()
|
||||||
{
|
{
|
||||||
PrintAbc pa;
|
PrintAbc pa;
|
||||||
pa.print();
|
pa.print();
|
||||||
|
AbcP abcP;
|
||||||
|
abcP.doAbcP();
|
||||||
}
|
}
|
||||||
|
|
||||||
// check that including the moc file for the cpp file and the header works:
|
// check that including the moc file for the cpp file and the header works:
|
||||||
#include "abc.moc"
|
#include "abc.moc"
|
||||||
#include "moc_abc.cpp"
|
#include "moc_abc.cpp"
|
||||||
|
#include "moc_abc_p.cpp"
|
||||||
|
|
||||||
// check that including a moc file from another header works:
|
// check that including a moc file from another header works:
|
||||||
#include "moc_xyz.cpp"
|
#include "moc_xyz.cpp"
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*============================================================================
|
||||||
|
CMake - Cross Platform Makefile Generator
|
||||||
|
Copyright 2004-2011 Kitware, Inc.
|
||||||
|
Copyright 2011 Alexander Neundorf (neundorf@kde.org)
|
||||||
|
|
||||||
|
Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
see accompanying file Copyright.txt for details.
|
||||||
|
|
||||||
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the License for more information.
|
||||||
|
============================================================================*/
|
||||||
|
|
||||||
|
#ifndef ABC_P_H
|
||||||
|
#define ABC_P_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
class AbcP : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AbcP() {}
|
||||||
|
public slots:
|
||||||
|
void doAbcP() { printf("I am private abc !\n"); }
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue