Skip to content
Snippets Groups Projects
Commit 29f95586 authored by Daniel Teske's avatar Daniel Teske
Browse files

BuildManager: Don't clear the tasklist between init() and run()


Also emit the preamble messages earlier

Change-Id: Iba0308255ba77584e85f52ebc6f422187383ddec
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 1b26e8a2
No related branches found
No related tags found
No related merge requests found
...@@ -299,7 +299,7 @@ bool BuildManager::tasksAvailable() ...@@ -299,7 +299,7 @@ bool BuildManager::tasksAvailable()
return count > 0; return count > 0;
} }
void BuildManager::startBuildQueue(const QStringList &preambleMessage) void BuildManager::startBuildQueue()
{ {
if (d->m_buildQueue.isEmpty()) { if (d->m_buildQueue.isEmpty()) {
emit m_instance->buildQueueFinished(true); emit m_instance->buildQueueFinished(true);
...@@ -310,11 +310,6 @@ void BuildManager::startBuildQueue(const QStringList &preambleMessage) ...@@ -310,11 +310,6 @@ void BuildManager::startBuildQueue(const QStringList &preambleMessage)
// Progress Reporting // Progress Reporting
d->m_progressFutureInterface = new QFutureInterface<void>; d->m_progressFutureInterface = new QFutureInterface<void>;
d->m_progressWatcher.setFuture(d->m_progressFutureInterface->future()); d->m_progressWatcher.setFuture(d->m_progressFutureInterface->future());
foreach (const QString &str, preambleMessage)
addToOutputWindow(str, BuildStep::MessageOutput, BuildStep::DontAppendNewline);
TaskHub::clearTasks(Constants::TASK_CATEGORY_COMPILE);
TaskHub::clearTasks(Constants::TASK_CATEGORY_BUILDSYSTEM);
TaskHub::clearTasks(Constants::TASK_CATEGORY_DEPLOYMENT);
ProgressManager::setApplicationLabel(QString()); ProgressManager::setApplicationLabel(QString());
d->m_futureProgress = ProgressManager::addTask(d->m_progressFutureInterface->future(), d->m_futureProgress = ProgressManager::addTask(d->m_progressFutureInterface->future(),
QString(), "ProjectExplorer.Task.Build", QString(), "ProjectExplorer.Task.Build",
...@@ -483,9 +478,18 @@ void BuildManager::nextStep() ...@@ -483,9 +478,18 @@ void BuildManager::nextStep()
} }
} }
bool BuildManager::buildQueueAppend(QList<BuildStep *> steps, QStringList names) bool BuildManager::buildQueueAppend(QList<BuildStep *> steps, QStringList names, const QStringList &preambleMessage)
{ {
d->m_outputWindow->clearContents(); if (!d->m_running) {
d->m_outputWindow->clearContents();
TaskHub::clearTasks(Constants::TASK_CATEGORY_COMPILE);
TaskHub::clearTasks(Constants::TASK_CATEGORY_BUILDSYSTEM);
TaskHub::clearTasks(Constants::TASK_CATEGORY_DEPLOYMENT);
foreach (const QString &str, preambleMessage)
addToOutputWindow(str, BuildStep::MessageOutput, BuildStep::DontAppendNewline);
}
int count = steps.size(); int count = steps.size();
bool init = true; bool init = true;
int i = 0; int i = 0;
...@@ -549,7 +553,7 @@ bool BuildManager::buildLists(QList<BuildStepList *> bsls, const QStringList &st ...@@ -549,7 +553,7 @@ bool BuildManager::buildLists(QList<BuildStepList *> bsls, const QStringList &st
} }
} }
bool success = buildQueueAppend(steps, names); bool success = buildQueueAppend(steps, names, preambelMessage);
if (!success) { if (!success) {
d->m_outputWindow->popup(IOutputPane::NoModeSwitch); d->m_outputWindow->popup(IOutputPane::NoModeSwitch);
return false; return false;
...@@ -557,7 +561,7 @@ bool BuildManager::buildLists(QList<BuildStepList *> bsls, const QStringList &st ...@@ -557,7 +561,7 @@ bool BuildManager::buildLists(QList<BuildStepList *> bsls, const QStringList &st
if (ProjectExplorerPlugin::projectExplorerSettings().showCompilerOutput) if (ProjectExplorerPlugin::projectExplorerSettings().showCompilerOutput)
d->m_outputWindow->popup(IOutputPane::NoModeSwitch); d->m_outputWindow->popup(IOutputPane::NoModeSwitch);
startBuildQueue(preambelMessage); startBuildQueue();
return true; return true;
} }
......
...@@ -99,10 +99,10 @@ private slots: ...@@ -99,10 +99,10 @@ private slots:
static void finish(); static void finish();
private: private:
static void startBuildQueue(const QStringList &preambleMessage = QStringList()); static void startBuildQueue();
static void nextStep(); static void nextStep();
static void clearBuildQueue(); static void clearBuildQueue();
static bool buildQueueAppend(QList<BuildStep *> steps, QStringList names); static bool buildQueueAppend(QList<BuildStep *> steps, QStringList names, const QStringList &preambleMessage = QStringList());
static void incrementActiveBuildSteps(BuildStep *bs); static void incrementActiveBuildSteps(BuildStep *bs);
static void decrementActiveBuildSteps(BuildStep *bs); static void decrementActiveBuildSteps(BuildStep *bs);
static void disconnectOutput(BuildStep *bs); static void disconnectOutput(BuildStep *bs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment