QtSupport: Improve the qtquickcompiler feature detection

Check for qtquickcompiler.prf instead of for the binary. That is
compatible with (commercial) Qt < 5.11 with the original
qtquickcompiler, and now additionally with Qt >= 5.11 with qmlcachegen.

Task-number: QTCREATORBUG-19993
Change-Id: Ie0ba30a590828f13b330a62acb9d1d5c84a5916b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2018-05-15 17:36:45 +02:00
parent 23ac1d18e1
commit 850a35aae5

View File

@@ -1815,9 +1815,8 @@ bool BaseQtVersion::isQtQuickCompilerSupported(QString *reason) const
return false; return false;
} }
const QString qtQuickCompilerExecutable = const QString qtQuickCompilerPrf = mkspecsPath().toString() + "/features/qtquickcompiler.prf";
HostOsInfo::withExecutableSuffix(binPath().toString() + "/qtquickcompiler"); if (!QFileInfo::exists(qtQuickCompilerPrf)) {
if (!QFileInfo::exists(qtQuickCompilerExecutable)) {
if (reason) if (reason)
*reason = QCoreApplication::translate("BaseQtVersion", "This Qt Version does not contain Qt Quick Compiler."); *reason = QCoreApplication::translate("BaseQtVersion", "This Qt Version does not contain Qt Quick Compiler.");
return false; return false;