Commit 7bc8dd18 authored by Christian Kamm's avatar Christian Kamm

QmlJS: Ensure the C++ model manager is available before using it.

Change-Id: I0cc4e59505a6a5baa585e3748fdf174805d661b1
Reviewed-on: http://codereview.qt.nokia.com/3913Reviewed-by: default avatarLeandro T. C. Melo <leandro.melo@nokia.com>
parent 0e784e81
......@@ -524,9 +524,11 @@ QList<LanguageUtils::FakeMetaObject::ConstPtr> FindExportedCppTypes::operator()(
FindExportsVisitor finder(document);
QList<ExportedQmlType> exports = finder();
CppModelManagerInterface::instance()->setExtraDiagnostics(
document->fileName(), CppModelManagerInterface::ExportedQmlTypesDiagnostic,
finder.messages());
if (CppModelManagerInterface *cppModelManager = CppModelManagerInterface::instance()) {
cppModelManager->setExtraDiagnostics(
document->fileName(), CppModelManagerInterface::ExportedQmlTypesDiagnostic,
finder.messages());
}
if (exports.isEmpty())
return noResults;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment