diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-06-11 23:23:38 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-06-11 23:23:38 (GMT) |
commit | b6cf52001e6c961f78fd3ebf19f09a94ddf52a97 (patch) | |
tree | 958b0660a1d6313db9841f77693dd26ba0da05ff /src/tools | |
parent | 344279da7e1cfbc4a28fd46931301d08ed9ef7d8 (diff) | |
parent | 66f34c40dbc52b76434db4ccac6c43101bd57e1e (diff) | |
download | Qt-b6cf52001e6c961f78fd3ebf19f09a94ddf52a97.zip Qt-b6cf52001e6c961f78fd3ebf19f09a94ddf52a97.tar.gz Qt-b6cf52001e6c961f78fd3ebf19f09a94ddf52a97.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts:
src/gui/graphicsview/qgraphicswidget.cpp
src/gui/painting/qdrawutil.cpp
src/gui/painting/qpainterpath.cpp
tools/qdoc3/test/qt-cpp-ignore.qdocconf
tools/qdoc3/test/qt-inc.qdocconf
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/moc/moc.cpp | 8 | ||||
-rw-r--r-- | src/tools/moc/moc.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 38b0a59..6c01ae3 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -770,7 +770,8 @@ void Moc::generate(FILE *out) if (classList.size() && classList.first().classname == "Qt") fprintf(out, "#include <QtCore/qobject.h>\n"); - fprintf(out, "#include <QtCore/qmetatype.h>\n"); + if (mustIncludeQMetaTypeH) + fprintf(out, "#include <QtCore/qmetatype.h>\n"); fprintf(out, "#if !defined(Q_MOC_OUTPUT_REVISION)\n" "#error \"The header file '%s' doesn't include <QObject>.\"\n", (const char *)fn); @@ -903,6 +904,9 @@ void Moc::parseProperty(ClassDef *def) type = "qlonglong"; else if (type == "ULongLong") type = "qulonglong"; + else if (type == "qreal") + mustIncludeQMetaTypeH = true; + propDef.type = type; next(); @@ -964,7 +968,7 @@ void Moc::parseProperty(ClassDef *def) msg += " has no READ accessor function. The property will be invalid."; warning(msg.constData()); } - if(!propDef.notify.isEmpty()) + if(!propDef.notify.isEmpty()) def->notifyableProperties++; def->propertyList += propDef; diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index c02864a..8e59e2d 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -178,13 +178,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; |