diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-10-22 17:38:39 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-10-22 17:38:39 (GMT) |
commit | 56aa6ffae75dd2567d2041147774bb1a9a3a1bdf (patch) | |
tree | 378c183d5b02a87b81b667d6f6498b45e2921bb8 /Tests/QtAutomoc/foo.cpp | |
parent | af772893b856b50697f18c9bb7b1a0fb326cf715 (diff) | |
download | CMake-56aa6ffae75dd2567d2041147774bb1a9a3a1bdf.zip CMake-56aa6ffae75dd2567d2041147774bb1a9a3a1bdf.tar.gz CMake-56aa6ffae75dd2567d2041147774bb1a9a3a1bdf.tar.bz2 |
automoc:run moc on the header if the source file contains include "foo.moc"
This fixes #12533.
Before automoc did not check the header if the source file contained a
statement, now it does.
Additionally, moc is now only run on explicitely listed headers which
contain a Q_OBJECT macro.
Alex
Diffstat (limited to 'Tests/QtAutomoc/foo.cpp')
-rw-r--r-- | Tests/QtAutomoc/foo.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Tests/QtAutomoc/foo.cpp b/Tests/QtAutomoc/foo.cpp new file mode 100644 index 0000000..a7a4783 --- /dev/null +++ b/Tests/QtAutomoc/foo.cpp @@ -0,0 +1,26 @@ +#include "foo.h" + +#include <stdio.h> + +class FooFoo : public QObject +{ + Q_OBJECT + public: + FooFoo():QObject() {} + public slots: + int getValue() const { return 12; } +}; + +Foo::Foo() +:QObject() +{ +} + + +void Foo::doFoo() +{ + FooFoo ff; + printf("Hello automoc: %d\n", ff.getValue()); +} + +#include "foo.moc" |