forked from qt-creator/qt-creator
Remove evaluateBuildSystem signal
It adds almost nothing and introduced some bugs. This fixes: Double evaluation in cmakeproject on build directory changes. Wrong runconfiguration update in cmake for set_target_properties(target PROPERTIES OUTPUT_NAME [..]) changes. Unecessary runconfiguration removal in AutoTools and Generic projectmanager. Reevaluation of .pro files on changing the active runconfiguration or deploy configuration. Task-number: QTCREATORBUG-7723 Task-number: QTCREATORBUG-7761 Change-Id: I50249b186917cd3a4f399f187f09ac8428ab6f9e Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -342,6 +342,7 @@ bool Qt4ProjectFile::reload(QString *errorString, ReloadFlag flag, ChangeType ty
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
/*!
|
||||
\class Qt4Project
|
||||
|
||||
@@ -360,7 +361,8 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) :
|
||||
m_asyncUpdateState(NoState),
|
||||
m_cancelEvaluate(false),
|
||||
m_codeModelCanceled(false),
|
||||
m_centralizedFolderWatcher(0)
|
||||
m_centralizedFolderWatcher(0),
|
||||
m_activeTarget(0)
|
||||
{
|
||||
setProjectContext(Core::Context(Qt4ProjectManager::Constants::PROJECT_ID));
|
||||
setProjectLanguage(Core::Context(ProjectExplorer::Constants::LANG_CXX));
|
||||
@@ -428,17 +430,18 @@ bool Qt4Project::fromMap(const QVariantMap &map)
|
||||
// Now we emit update once :)
|
||||
m_rootProjectNode->emitProFileUpdatedRecursive();
|
||||
|
||||
// On active buildconfiguration changes, reevaluate the .pro files
|
||||
m_activeTarget = activeTarget();
|
||||
if (m_activeTarget)
|
||||
connect(m_activeTarget, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
|
||||
this, SLOT(scheduleAsyncUpdate()));
|
||||
|
||||
connect(this, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
|
||||
this, SLOT(activeTargetWasChanged()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Qt4Project::evaluateBuildSystem()
|
||||
{
|
||||
scheduleAsyncUpdate();
|
||||
}
|
||||
|
||||
/// equalFileList compares two file lists ignoring
|
||||
/// <configuration> without generating temporary lists
|
||||
|
||||
@@ -640,7 +643,14 @@ void Qt4Project::update()
|
||||
m_asyncUpdateState = Base;
|
||||
enableActiveQt4BuildConfiguration(activeTarget(), true);
|
||||
updateBuildSystemData();
|
||||
buildSystemEvaluationFinished(true);
|
||||
updateRunConfigurations();
|
||||
emit proFilesEvaluated();
|
||||
}
|
||||
|
||||
void Qt4Project::updateRunConfigurations()
|
||||
{
|
||||
foreach (Target *t, targets())
|
||||
t->updateDefaultRunConfigurations();
|
||||
}
|
||||
|
||||
void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node)
|
||||
@@ -791,7 +801,8 @@ void Qt4Project::decrementPendingEvaluateFutures()
|
||||
updateFileList();
|
||||
updateCodeModels();
|
||||
updateBuildSystemData();
|
||||
buildSystemEvaluationFinished(true);
|
||||
updateRunConfigurations();
|
||||
emit proFilesEvaluated();
|
||||
if (debug)
|
||||
qDebug()<<" Setting state to Base";
|
||||
}
|
||||
@@ -1086,9 +1097,17 @@ QStringList Qt4Project::applicationProFilePathes(const QString &prepend) const
|
||||
|
||||
void Qt4Project::activeTargetWasChanged()
|
||||
{
|
||||
if (!activeTarget())
|
||||
disconnect(m_activeTarget, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
|
||||
this, SLOT(scheduleAsyncUpdate()));
|
||||
|
||||
m_activeTarget = activeTarget();
|
||||
|
||||
if (!m_activeTarget)
|
||||
return;
|
||||
|
||||
connect(m_activeTarget, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
|
||||
this, SLOT(scheduleAsyncUpdate()));
|
||||
|
||||
scheduleAsyncUpdate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user