Commit 6027c5a0 authored by con's avatar con
Browse files

Avoid build progress' error widget flickering, and popping up as toplevel on Mac

When a build was started after a build had errors, the error widget
would be made visible before it had a parent, leading to it being shown
as a top level for a split second.
So, clear the tasks before creating the new error widget, and assume
that we start without errors in the error widget.
parent 87e0e925
......@@ -244,6 +244,9 @@ void BuildManager::startBuildQueue()
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
m_progressFutureInterface = new QFutureInterface<void>;
m_progressWatcher.setFuture(m_progressFutureInterface->future());
m_outputWindow->clearContents();
m_taskWindow->clearTasks(Constants::TASK_CATEGORY_COMPILE);
m_taskWindow->clearTasks(Constants::TASK_CATEGORY_BUILDSYSTEM);
progressManager->setApplicationLabel("");
Core::FutureProgress *progress = progressManager->addTask(m_progressFutureInterface->future(),
tr("Build"),
......@@ -257,9 +260,6 @@ void BuildManager::startBuildQueue()
m_running = true;
m_canceling = false;
m_progressFutureInterface->reportStarted();
m_outputWindow->clearContents();
m_taskWindow->clearTasks(Constants::TASK_CATEGORY_COMPILE);
m_taskWindow->clearTasks(Constants::TASK_CATEGORY_BUILDSYSTEM);
nextStep();
} else {
// Already running
......
......@@ -79,7 +79,6 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow)
hide();
connect(m_taskWindow, SIGNAL(tasksChanged()), this, SLOT(updateState()));
updateState();
}
void BuildProgress::updateState()
......@@ -98,9 +97,9 @@ void BuildProgress::updateState()
m_warningLabel->setText(QString("%1").arg(warnings));
// Hide warnings and errors unless you need them
setVisible(haveWarnings | haveErrors);
m_warningIcon->setVisible(haveWarnings);
m_warningLabel->setVisible(haveWarnings);
m_errorIcon->setVisible(haveErrors);
m_errorLabel->setVisible(haveErrors);
setVisible(haveWarnings || haveErrors);
}
Supports Markdown
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