QmlDesigner: keep warnings for later showing

Change-Id: I5f9c51480a1d0276a356737ab1f91a8f76443c5a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-04-26 15:50:34 +02:00
parent bc08c10764
commit 61bafe3407
6 changed files with 36 additions and 13 deletions

View File

@@ -163,15 +163,22 @@ Model* DesignDocument::createInFileComponentModel()
return model;
}
/*!
Returns any errors that happened when parsing the latest qml file.
*/
QList<RewriterError> DesignDocument::qmlSyntaxErrors() const
QList<RewriterError> DesignDocument::qmlParseWarnings() const
{
return m_rewriterView->warnings();
}
bool DesignDocument::hasQmlParseWarnings() const
{
return currentModel()->rewriterView() && !currentModel()->rewriterView()->warnings().isEmpty();
}
QList<RewriterError> DesignDocument::qmlParseErrors() const
{
return m_rewriterView->errors();
}
bool DesignDocument::hasQmlSyntaxErrors() const
bool DesignDocument::hasQmlParseErrors() const
{
return currentModel()->rewriterView() && !currentModel()->rewriterView()->errors().isEmpty();
}