summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/postbuild/global.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/postbuild/global.h b/tests/postbuild/global.h
index b4278200..8cbd3f15 100644
--- a/tests/postbuild/global.h
+++ b/tests/postbuild/global.h
@@ -83,6 +83,18 @@ QHash<QString, QString> qt_tests_shared_global_get_modules(const QString &config
return modules;
}
+QByteArray qt_tests_shared_global_get_modules_pro_lines(const QHash<QString, QString> &modules)
+{
+ QByteArray result;
+ foreach (QString moduleName, modules.values()) {
+ QByteArray module = moduleName.toLatin1();
+ result += "qtHaveModule(" + module + ") {\n" +
+ " QT += " + module + "\n" +
+ "}\n";
+ }
+ return result;
+}
+
QStringList qt_tests_shared_global_get_include_paths(const QString &workDir, QHash<QString, QString> &modules)
{
QString proFile = workDir + "/global.pro";
@@ -97,8 +109,8 @@ QStringList qt_tests_shared_global_get_include_paths(const QString &workDir, QHa
return incPaths;
}
- QByteArray proLine = "QT += " + QStringList(modules.values()).join(" ").toLatin1() + "\n";
- file.write(proLine);
+ QByteArray proLines = qt_tests_shared_global_get_modules_pro_lines(modules);
+ file.write(proLines);
file.flush();
file.close();