diff options
author | Daniel Teske <daniel.teske@digia.com> | 2014-09-12 13:38:49 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2014-09-18 17:10:06 +0200 |
commit | 347cb21ae2d24fc7194acbb2cb396aaa8a8a5a3e (patch) | |
tree | 97c1570ebeef827bc358705342ea88f78743151e /src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp | |
parent | 2cc17a61eb6d0fee80fd388fcc5be03a59e4f2b5 (diff) | |
download | qt-creator-347cb21ae2d24fc7194acbb2cb396aaa8a8a5a3e.tar.gz |
DesktopQmakeRunConfiguration: Optimize response to proFile parsing
Only emit the environment changed signal after everything has parsed.
Change-Id: Iba26c8ba2fc7de9e03ec1368917985538ffbbfb9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp')
-rw-r--r-- | src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp index ed754db15c..5150152aae 100644 --- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp @@ -128,18 +128,8 @@ QString DesktopQmakeRunConfiguration::disabledReason() const void DesktopQmakeRunConfiguration::proFileUpdated(QmakeProFileNode *pro, bool success, bool parseInProgress) { - LocalEnvironmentAspect *aspect = extraAspect<LocalEnvironmentAspect>(); - QTC_ASSERT(aspect, return); - - if (m_proFilePath != pro->path()) { - if (!parseInProgress) { - // We depend on all .pro files for the LD_LIBRARY_PATH so we emit a signal for all .pro files - // This can be optimized by checking whether LD_LIBRARY_PATH changed - aspect->buildEnvironmentHasChanged(); - } + if (m_proFilePath != pro->path()) return; - } - bool enabled = isEnabled(); QString reason = disabledReason(); m_parseSuccess = success; @@ -149,10 +139,21 @@ void DesktopQmakeRunConfiguration::proFileUpdated(QmakeProFileNode *pro, bool su if (!parseInProgress) { emit effectiveTargetInformationChanged(); + LocalEnvironmentAspect *aspect = extraAspect<LocalEnvironmentAspect>(); + QTC_ASSERT(aspect, return); aspect->buildEnvironmentHasChanged(); } } +void DesktopQmakeRunConfiguration::proFileEvaluated() +{ + // We depend on all .pro files for the LD_LIBRARY_PATH so we emit a signal for all .pro files + // This can be optimized by checking whether LD_LIBRARY_PATH changed + LocalEnvironmentAspect *aspect = extraAspect<LocalEnvironmentAspect>(); + QTC_ASSERT(aspect, return); + aspect->buildEnvironmentHasChanged(); +} + void DesktopQmakeRunConfiguration::ctor() { setDefaultDisplayName(defaultDisplayName()); @@ -163,6 +164,8 @@ void DesktopQmakeRunConfiguration::ctor() QmakeProject *project = static_cast<QmakeProject *>(target()->project()); connect(project, &QmakeProject::proFileUpdated, this, &DesktopQmakeRunConfiguration::proFileUpdated); + connect(project, &QmakeProject::proFilesEvaluated, + this, &DesktopQmakeRunConfiguration::proFileEvaluated); connect(target(), &Target::kitChanged, this, &DesktopQmakeRunConfiguration::kitChanged); } |