forked from qt-creator/qt-creator
AutoTest: Ignore nullptr documents
It could happen that Qml related docs have not been added to the QmlJSModelManager when trying to use them on our side. Just ignore them when this happens as they will be added manually as they will get added automatically when parsing the respective main cpp file. Change-Id: I25c4b6d9159ad4ff8def3148c2a04356380fbd27 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
committed by
David Schulz
parent
a2170bd690
commit
02a0c6f486
@@ -434,6 +434,8 @@ static void checkQmlDocumentForTestCode(QFutureInterface<TestParseResult> future
|
|||||||
const QmlJS::Document::Ptr &qmlJSDoc,
|
const QmlJS::Document::Ptr &qmlJSDoc,
|
||||||
const QString &proFile = QString())
|
const QString &proFile = QString())
|
||||||
{
|
{
|
||||||
|
if (qmlJSDoc.isNull())
|
||||||
|
return;
|
||||||
QmlJS::AST::Node *ast = qmlJSDoc->ast();
|
QmlJS::AST::Node *ast = qmlJSDoc->ast();
|
||||||
QTC_ASSERT(ast, return);
|
QTC_ASSERT(ast, return);
|
||||||
TestQmlVisitor qmlVisitor(qmlJSDoc);
|
TestQmlVisitor qmlVisitor(qmlJSDoc);
|
||||||
|
Reference in New Issue
Block a user