forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user