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.
This commit is contained in:
con
2010-04-16 16:58:52 +02:00
parent 87e0e9253f
commit 6027c5a031
2 changed files with 4 additions and 5 deletions

View File

@@ -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

View File

@@ -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);
}