QmlJS: Do not rely on Qt Creator plugins running

This is not the case in some tests.

Change-Id: I531997bc6eb0b9cb8057b7e488bca1c301c88add
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Thomas Hartmann
2016-06-13 20:49:41 +02:00
parent 3f879c0c79
commit 7e7246bd25

View File

@@ -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<TextEditor::TextDocument *>(document)) {