From 7e7246bd25bdabb2f325fe5f76fc7e4293b7dca5 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 13 Jun 2016 20:49:41 +0200 Subject: [PATCH] QmlJS: Do not rely on Qt Creator plugins running This is not the case in some tests. Change-Id: I531997bc6eb0b9cb8057b7e488bca1c301c88add Reviewed-by: Marco Benelli --- src/plugins/qmljstools/qmljsmodelmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index f165f2b3f01..cc033ae05c7 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -242,6 +242,10 @@ void ModelManager::writeMessageInternal(const QString &msg) const ModelManagerInterface::WorkingCopy ModelManager::workingCopyInternal() const { WorkingCopy workingCopy; + + if (!Core::ICore::instance()) + return workingCopy; + foreach (IDocument *document, DocumentModel::openedDocuments()) { const QString key = document->filePath().toString(); if (TextEditor::TextDocument *textDocument = qobject_cast(document)) {