Commit f8a1b943 authored by Daniel Teske's avatar Daniel Teske
Browse files

Don't react to profileUpdated on failure or while still in progress



Change-Id: I88fa7b7e3165d3b89af4e68a1b1c17082f29510a
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent b2c73f6e
......@@ -189,7 +189,7 @@ void Qt4BuildConfiguration::ctor()
connect(this, SIGNAL(environmentChanged()),
this, SLOT(emitProFileEvaluateNeeded()));
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
this, SLOT(proFileUpdated()));
this, SLOT(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance();
connect(vm, SIGNAL(qtVersionsChanged(QList<int>)),
......@@ -204,10 +204,12 @@ void Qt4BuildConfiguration::emitBuildDirectoryChanged()
}
}
void Qt4BuildConfiguration::proFileUpdated()
void Qt4BuildConfiguration::proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *, bool success, bool parseInProgress)
{
// Changing the included Qt modules from 0 to at least one might have caused the
// tool chain to become invalid.
if (!success || parseInProgress)
return;
if (!qt4Target()->possibleToolChains(this).contains(toolChain()))
setToolChain(qt4Target()->preferredToolChain(this));
}
......
......@@ -146,7 +146,7 @@ signals:
private slots:
void qtVersionsChanged(const QList<int> &changedVersions);
void emitBuildDirectoryChanged();
void proFileUpdated();
void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *, bool, bool parseInProgress);
protected:
Qt4BuildConfiguration(Qt4BaseTarget *target, Qt4BuildConfiguration *source);
......
......@@ -1598,6 +1598,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
if (!m_readerExact)
return;
if (evalResult == EvalFail || m_project->wasEvaluateCanceled()) {
m_validParse = false;
m_project->destroyProFileReader(m_readerExact);
m_project->destroyProFileReader(m_readerCumulative);
m_readerExact = m_readerCumulative = 0;
......
......@@ -123,7 +123,7 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4BaseTarget *target)
this, SLOT(updateImportLabel()));
connect(target->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
this, SLOT(updateToolChainCombo()));
this, SLOT(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
connect(ProjectExplorer::ToolChainManager::instance(), SIGNAL(toolChainsChanged()),
this, SLOT(updateToolChainCombo()));
......@@ -539,6 +539,13 @@ void Qt4ProjectConfigWidget::toolChainChanged()
}
}
void Qt4ProjectConfigWidget::proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *node, bool success, bool parseInProgress)
{
if (!success || parseInProgress)
return;
updateToolChainCombo();
}
void Qt4ProjectConfigWidget::updateToolChainCombo()
{
m_ui->toolChainComboBox->clear();
......
......@@ -46,6 +46,7 @@ namespace Utils {
namespace Qt4ProjectManager {
class Qt4BaseTarget;
class Qt4BuildConfiguration;
class Qt4ProFileNode;
namespace Internal {
namespace Ui {
......@@ -80,6 +81,7 @@ private slots:
void toolChainChanged();
void updateImportLabel();
void environmentChanged();
void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool);
void updateToolChainCombo();
private:
......
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