Commit 0a3a3be4 authored by Eike Ziller's avatar Eike Ziller

EditorManager: Another naming correction

closeEditor(Entry) -> closeDocument(Entry)

Change-Id: I996cc8a22b670f97dc47470116003c537e7f32b0
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 746a0ba2
...@@ -1935,12 +1935,12 @@ void EditorManager::closeEditor(Core::IEditor *editor, bool askAboutModifiedEdit ...@@ -1935,12 +1935,12 @@ void EditorManager::closeEditor(Core::IEditor *editor, bool askAboutModifiedEdit
closeEditors(QList<IEditor *>() << editor, askAboutModifiedEditors); closeEditors(QList<IEditor *>() << editor, askAboutModifiedEditors);
} }
void EditorManager::closeEditor(DocumentModel::Entry *entry) void EditorManager::closeDocument(DocumentModel::Entry *entry)
{ {
if (!entry) if (!entry)
return; return;
if (entry->document) if (entry->document)
closeEditors(DocumentModel::editorsForDocument(entry->document)); closeDocuments(QList<IDocument *>() << entry->document);
else else
DocumentModel::removeEntry(entry); DocumentModel::removeEntry(entry);
} }
......
...@@ -133,7 +133,7 @@ public: ...@@ -133,7 +133,7 @@ public:
static IEditor *activateEditorForDocument(IDocument *document, OpenEditorFlags flags = 0); static IEditor *activateEditorForDocument(IDocument *document, OpenEditorFlags flags = 0);
static bool closeDocuments(const QList<IDocument *> &documents, bool askAboutModifiedEditors = true); static bool closeDocuments(const QList<IDocument *> &documents, bool askAboutModifiedEditors = true);
static void closeEditor(DocumentModel::Entry *entry); static void closeDocument(DocumentModel::Entry *entry);
static void closeOtherEditors(IDocument *document); static void closeOtherEditors(IDocument *document);
static void addCurrentPositionToNavigationHistory(IEditor *editor = 0, const QByteArray &saveState = QByteArray()); static void addCurrentPositionToNavigationHistory(IEditor *editor = 0, const QByteArray &saveState = QByteArray());
......
...@@ -194,7 +194,7 @@ void OpenEditorsWidget::activateEditor(const QModelIndex &index) ...@@ -194,7 +194,7 @@ void OpenEditorsWidget::activateEditor(const QModelIndex &index)
void OpenEditorsWidget::closeEditor(const QModelIndex &index) void OpenEditorsWidget::closeEditor(const QModelIndex &index)
{ {
EditorManager::closeEditor( EditorManager::closeDocument(
DocumentModel::entryAtRow(m_model->mapToSource(index).row())); DocumentModel::entryAtRow(m_model->mapToSource(index).row()));
// work around selection changes // work around selection changes
updateCurrentItem(EditorManager::currentEditor()); updateCurrentItem(EditorManager::currentEditor());
......
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