forked from qt-creator/qt-creator
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:
committed by
Tim Jenssen
parent
8b67458a95
commit
759db2b7b6
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user