forked from qt-creator/qt-creator
QtVersion: Get version string from qmake -query
We need to run qmake -query during initialization anyway, so it makes no sense to use the faste qmake --version to get the Qt version number. Change-Id: If4f5efa074885a9be8938d54767008d8f1dc0d6b Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -755,16 +755,7 @@ BaseQtVersion::QmakeBuildConfigs BaseQtVersion::defaultBuildConfig() const
|
||||
|
||||
QString BaseQtVersion::qtVersionString() const
|
||||
{
|
||||
if (!m_qtVersionString.isNull())
|
||||
return m_qtVersionString;
|
||||
m_qtVersionString.clear();
|
||||
if (m_qmakeIsExecutable) {
|
||||
const QString qmake = qmakeCommand().toString();
|
||||
m_qtVersionString =
|
||||
ProjectExplorer::DebuggingHelperLibrary::qtVersionForQMake(qmake, &m_qmakeIsExecutable);
|
||||
} else {
|
||||
qWarning("Cannot determine the Qt version: %s cannot be run.", qPrintable(qmakeCommand().toString()));
|
||||
}
|
||||
updateVersionInfo();
|
||||
return m_qtVersionString;
|
||||
}
|
||||
|
||||
@@ -844,6 +835,7 @@ void BaseQtVersion::updateVersionInfo() const
|
||||
if (fi.exists())
|
||||
m_hasDemos = true;
|
||||
}
|
||||
m_qtVersionString = m_versionInfo.value(QLatin1String("QT_VERSION"), QString());
|
||||
|
||||
m_versionInfoUpToDate = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user