QmlDesigner: merge QmlWarningDialog and DocumentWarningWidget

- fixed cases where the user got the one and the other
    dialog
  - not only the first error is shown, the user can browse

Task-number: QTCREATORBUG-15772
Change-Id: I27786b0e4f9c987646a69d8d7d9ff33e3702587a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-05-18 17:27:45 +02:00
parent 5f45ed1c7b
commit 6512227302
12 changed files with 183 additions and 319 deletions

View File

@@ -242,7 +242,7 @@ void DesignModeWidget::updateErrorStatus(const QList<RewriterError> &errors)
enableWidgets();
} else if (!errors.isEmpty()) {
disableWidgets();
showMessageBox(errors);
showErrorMessageBox(errors);
}
}
@@ -551,10 +551,17 @@ QWidget *DesignModeWidget::createCrumbleBarFrame()
return frame;
}
void DesignModeWidget::showMessageBox(const QList<RewriterError> &errors)
void DesignModeWidget::showErrorMessageBox(const QList<RewriterError> &errors)
{
Q_ASSERT(!errors.isEmpty());
m_warningWidget->setError(errors.first());
m_warningWidget->setErrors(errors);
m_warningWidget->setVisible(true);
}
void DesignModeWidget::showWarningMessageBox(const QList<RewriterError> &warnings)
{
Q_ASSERT(!warnings.isEmpty());
m_warningWidget->setWarnings(warnings);
m_warningWidget->setVisible(true);
}