forked from qt-creator/qt-creator
EditorManager: Close documents instead of editors where appropriate
This is the first step in actually making "closeEditor(s)" close editors instead of documents. Change-Id: I02761e0cef950b8fc093f65a90df04a9a7550681 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -104,11 +104,11 @@ void MemoryAgent::closeEditors()
|
||||
if (m_editors.isEmpty())
|
||||
return;
|
||||
|
||||
QList<IEditor *> editors;
|
||||
QSet<IDocument *> documents;
|
||||
foreach (QPointer<IEditor> editor, m_editors)
|
||||
if (editor)
|
||||
editors.append(editor.data());
|
||||
EditorManager::closeEditors(editors);
|
||||
documents.insert(editor->document());
|
||||
EditorManager::closeDocuments(documents.toList());
|
||||
m_editors.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user