Commit db297753 authored by Eike Ziller's avatar Eike Ziller

QmlLivePreview: Don't use EditorManager::openedEditors.

It doesn't do what one'd think it should, and will be removed.

Change-Id: I5f496388854913d1b968a5e0ffe6eaa5ca1430f0
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@digia.com>
parent 55636048
......@@ -457,8 +457,15 @@ void QmlInspectorAdapter::initializePreviews()
}
// initial update
foreach (Core::IEditor *editor, em->openedEditors())
createPreviewForEditor(editor);
Core::DocumentModel *documentModel = Core::EditorManager::documentModel();
foreach (Core::IDocument *document, documentModel->openedDocuments()) {
QList<Core::IEditor *> editors = documentModel->editorsForDocument(document);
createPreviewForEditor(editors.takeFirst());
QmlLiveTextPreview *preview
= m_textPreviews.value(document->filePath());
foreach (Core::IEditor *editor, editors)
preview->associateEditor(editor);
}
}
}
......
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