summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-06-11 09:11:46 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-06-11 10:58:05 (GMT)
commit713e52d9531277b8c13856246701729de16d4502 (patch)
tree4ecee572d3037ab168940b502a9a051e61073fe3 /src/tools/moc/moc.h
parent0295d0aa5111f31eec8dd8109b4df6389f4efbce (diff)
downloadQt-713e52d9531277b8c13856246701729de16d4502.zip
Qt-713e52d9531277b8c13856246701729de16d4502.tar.gz
Qt-713e52d9531277b8c13856246701729de16d4502.tar.bz2
Only include QMetaType if required in moc generated files
Including it might cause build errors. (and thus break source compatibility) The problem was seen on KDE where some cpp files included x11 headers and then later included the .moc file, then qmetatype.h complains that Bool is defined Reviewed-by: Brad
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r--src/tools/moc/moc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index 689104c..4a1dee9 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -177,13 +177,14 @@ class Moc : public Parser
{
public:
Moc()
- : noInclude(false), generatedCode(false)
+ : noInclude(false), generatedCode(false), mustIncludeQMetaTypeH(false)
{}
QByteArray filename;
bool noInclude;
bool generatedCode;
+ bool mustIncludeQMetaTypeH;
QByteArray includePath;
QList<QByteArray> includeFiles;
QList<ClassDef> classList;