QmlDesigner: Polish error handling for integrated text editor

The integrated text editor requires a couple of fixes and features
in the error handling.

The errors are now handled by the model and not the document management
anymore.
The text editor does not get disabled if there is an error. Instead
we show the error in a status bar.
The form editor is blocked if there is a QML an error and we show the
error message inside the form editor.

Change-Id: I4bfb9b33b09e444ec1de31dd531ce83b32cbcf88
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-01-10 16:36:55 +01:00
committed by Tim Jenssen
parent 8b67458a95
commit 759db2b7b6
30 changed files with 383 additions and 114 deletions

View File

@@ -264,6 +264,25 @@ void DebugView::auxiliaryDataChanged(const ModelNode &node, const PropertyName &
}
}
void DebugView::documentMessagesChanged(const QList<RewriterError> &errors, const QList<RewriterError> &warnings)
{
if (isDebugViewEnabled()) {
QTextStream message;
QString string;
message.setString(&string);
foreach (const RewriterError &error, errors) {
message << error.toString();
}
foreach (const RewriterError &warning, warnings) {
message << warning.toString();
}
log("::documentMessageChanged:", string);
}
}
void DebugView::rewriterBeginTransaction()
{
if (isDebugViewEnabled())