Commit ca660802 authored by Daniel Teske's avatar Daniel Teske

BuildManager: Don't count disabled steps in progress

QFuture limits the signals that are emitted for progress. A disabled
step takes so little time that its progress information is lost.
Since technically a disabled step never finishes, counting them in the
progress was dubious anyway.

Task-number: QTCREATORBUG-10606
Change-Id: I1860c65242282e8e2890f4977c487a6e6dcfbf2d
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 94c10ae6
...@@ -387,7 +387,8 @@ void BuildManager::nextBuildQueue() ...@@ -387,7 +387,8 @@ void BuildManager::nextBuildQueue()
} }
disconnectOutput(d->m_currentBuildStep); disconnectOutput(d->m_currentBuildStep);
++d->m_progress; if (!d->m_skipDisabled)
++d->m_progress;
d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100, msgProgress(d->m_progress, d->m_maxProgress)); d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100, msgProgress(d->m_progress, d->m_maxProgress));
decrementActiveBuildSteps(d->m_currentBuildStep); decrementActiveBuildSteps(d->m_currentBuildStep);
...@@ -511,10 +512,12 @@ bool BuildManager::buildQueueAppend(QList<BuildStep *> steps, QStringList names) ...@@ -511,10 +512,12 @@ bool BuildManager::buildQueueAppend(QList<BuildStep *> steps, QStringList names)
// Everthing init() well // Everthing init() well
for (i = 0; i < count; ++i) { for (i = 0; i < count; ++i) {
++d->m_maxProgress;
d->m_buildQueue.append(steps.at(i)); d->m_buildQueue.append(steps.at(i));
d->m_stepNames.append(names.at(i)); d->m_stepNames.append(names.at(i));
d->m_enabledState.append(steps.at(i)->enabled()); bool enabled = steps.at(i)->enabled();
d->m_enabledState.append(enabled);
if (enabled)
++d->m_maxProgress;
incrementActiveBuildSteps(steps.at(i)); incrementActiveBuildSteps(steps.at(i));
} }
return true; return true;
......
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