VCS: Use documents instead of editors a bit more.

This patch mostly gets rid of EditorManager::openedEditors usage. The
VCS editors should have a better widget<>document separation, also to
make it possible to split/duplicate them, but that's for another time.

Change-Id: Idd92a6a4884ff69fba4f4793d182aa7ff68d79e4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Eike Ziller
2013-07-17 09:42:44 +02:00
parent c97e894a24
commit bc88c0b89e
3 changed files with 12 additions and 15 deletions

View File

@@ -739,9 +739,9 @@ private:
Core::IEditor *locateEditor(const char *property, const QString &entry)
{
foreach (Core::IEditor *ed, Core::ICore::editorManager()->openedEditors())
if (ed->document()->property(property).toString() == entry)
return ed;
foreach (Core::IDocument *document, Core::EditorManager::documentModel()->openedDocuments())
if (document->property(property).toString() == entry)
return Core::EditorManager::documentModel()->editorsForDocument(document).first();
return 0;
}