Qt includes: Include qglobal.h when using QT_VERSION

Task-number: QTCREATORBUG-13280
Change-Id: I81cfe7875b1c7a1f16c13b49fe56849210db3acd
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2014-10-31 13:57:13 +01:00
parent 335ada73c4
commit e0b31be804

View File

@@ -117,6 +117,12 @@ void writeQtIncludeSection(const QStringList &qt4,
QSet<QString> common = qt4Only; QSet<QString> common = qt4Only;
common.intersect(qt5Only); common.intersect(qt5Only);
// qglobal.h is needed for QT_VERSION
if (includeQtModule)
common.insert(QLatin1String("QtCore/qglobal.h"));
else
common.insert(QLatin1String("qglobal.h"));
qt4Only.subtract(common); qt4Only.subtract(common);
qt5Only.subtract(common); qt5Only.subtract(common);