Toolchain: Allow all tool chains

Allow all tool chains if either the Qt version is invalid or
no Qt modules are not selected.

Change-Id: I9842c30aca0a8752915548dc258f257c3fd39e4d
Reviewed-on: http://codereview.qt-project.org/4990
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2011-09-15 13:30:54 +02:00
committed by Tobias Hunger
parent 971512b39c
commit ffa88df344
6 changed files with 30 additions and 1 deletions

View File

@@ -188,6 +188,8 @@ void Qt4BuildConfiguration::ctor()
this, SLOT(emitBuildDirectoryChanged()));
connect(this, SIGNAL(environmentChanged()),
this, SLOT(emitProFileEvaluateNeeded()));
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
this, SLOT(proFileUpdated()));
QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance();
connect(vm, SIGNAL(qtVersionsChanged(QList<int>)),
@@ -202,6 +204,14 @@ void Qt4BuildConfiguration::emitBuildDirectoryChanged()
}
}
void Qt4BuildConfiguration::proFileUpdated()
{
// Changing the included Qt modules from 0 to at least one might have caused the
// tool chain to become invalid.
if (!qt4Target()->possibleToolChains(this).contains(toolChain()))
setToolChain(qt4Target()->preferredToolChain(this));
}
Qt4BaseTarget *Qt4BuildConfiguration::qt4Target() const
{
return static_cast<Qt4BaseTarget *>(target());