Commit 79c27ec6 authored by Eike Ziller's avatar Eike Ziller
Browse files

Avoid running qmake by using unsortedVersions



Use unsortedVersions() instead of versions() where possible, since
versions() sorts by version numbers, and therefore needs "qmake -query"
to have run.

Change-Id: I76a05f1647d2baacbd33829c6b3bf719a1c8dcbb
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 609bc2a3
......@@ -298,7 +298,7 @@ void AndroidSettingsWidget::check(AndroidSettingsWidget::Mode mode)
toolchainsForAbi.insert(ati.abi);
QSet<ProjectExplorer::Abi> qtVersionsForAbi;
foreach (QtSupport::BaseQtVersion *qtVersion, QtSupport::QtVersionManager::versions()) {
foreach (QtSupport::BaseQtVersion *qtVersion, QtSupport::QtVersionManager::unsortedVersions()) {
if (qtVersion->type() != QLatin1String(Constants::ANDROIDQT) || qtVersion->qtAbis().isEmpty())
continue;
qtVersionsForAbi.insert(qtVersion->qtAbis().first());
......
......@@ -144,7 +144,7 @@ static QHash<Platform, ClangToolChain *> findToolChains(const QList<Platform> &p
static QHash<Abi::Architecture, QSet<BaseQtVersion *>> iosQtVersions()
{
QHash<Abi::Architecture, QSet<BaseQtVersion *>> versions;
foreach (BaseQtVersion *qtVersion, QtVersionManager::versions()) {
foreach (BaseQtVersion *qtVersion, QtVersionManager::unsortedVersions()) {
if (!qtVersion->isValid() || qtVersion->type() != QLatin1String(Constants::IOSQT))
continue;
foreach (const Abi &abi, qtVersion->qtAbis())
......
......@@ -108,7 +108,7 @@ QList<BuildInfo *> QmakeProjectImporter::import(const FileName &importPath, bool
qCDebug(logs) << " QMake:" << canonicalQmakeBinary;
BaseQtVersion *version
= Utils::findOrDefault(QtVersionManager::versions(),
= Utils::findOrDefault(QtVersionManager::unsortedVersions(),
[&canonicalQmakeBinary](BaseQtVersion *v) -> bool {
QFileInfo vfi = v->qmakeCommand().toFileInfo();
FileName current = FileName::fromString(vfi.canonicalFilePath());
......
......@@ -503,7 +503,7 @@ static void updateDocumentation()
void QtVersionManager::updateDumpFor(const FileName &qmakeCommand)
{
foreach (BaseQtVersion *v, versions()) {
foreach (BaseQtVersion *v, unsortedVersions()) {
if (v->qmakeCommand() == qmakeCommand)
v->recheckDumper();
}
......@@ -631,7 +631,7 @@ void QtVersionManager::setNewQtVersions(QList<BaseQtVersion *> newVersions)
BaseQtVersion *QtVersionManager::qtVersionForQMakeBinary(const FileName &qmakePath)
{
return Utils::findOrDefault(versions(), Utils::equal(&BaseQtVersion::qmakeCommand, qmakePath));
return Utils::findOrDefault(unsortedVersions(), Utils::equal(&BaseQtVersion::qmakeCommand, qmakePath));
}
} // namespace QtVersion
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment