mirror of
https://github.com/reactos/CMake.git
synced 2024-12-03 00:57:25 +00:00
321e348e13
Avoid using the moc from Qt 5 with Qt 4 based targets. Moc generates a version check to ensure that such generated code does not compile. The Qt4And5Automoc unit test should have been testing this, but it was not because the test was broken. In that unit test, moc was run on trivial files which have no significant content, and in particular no Q_OBJECT macro. Therefore moc was generating empty files which do not even contain the version check. Fix this by generating files for input to moc at cmake time.
19 lines
202 B
C++
19 lines
202 B
C++
|
|
#include <QObject>
|
|
|
|
class SomeObject : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit SomeObject(QObject *parent = 0)
|
|
: QObject(parent)
|
|
{
|
|
|
|
}
|
|
};
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
return 0;
|
|
}
|