EditorManager: Another naming correction

closeEditor(Entry) -> closeDocument(Entry)

Change-Id: I996cc8a22b670f97dc47470116003c537e7f32b0
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2014-08-15 09:13:45 +02:00
parent 746a0ba208
commit 0a3a3be432
3 changed files with 4 additions and 4 deletions

View File

@@ -1935,12 +1935,12 @@ void EditorManager::closeEditor(Core::IEditor *editor, bool askAboutModifiedEdit
closeEditors(QList<IEditor *>() << editor, askAboutModifiedEditors);
}
void EditorManager::closeEditor(DocumentModel::Entry *entry)
void EditorManager::closeDocument(DocumentModel::Entry *entry)
{
if (!entry)
return;
if (entry->document)
closeEditors(DocumentModel::editorsForDocument(entry->document));
closeDocuments(QList<IDocument *>() << entry->document);
else
DocumentModel::removeEntry(entry);
}

View File

@@ -133,7 +133,7 @@ public:
static IEditor *activateEditorForDocument(IDocument *document, OpenEditorFlags flags = 0);
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 addCurrentPositionToNavigationHistory(IEditor *editor = 0, const QByteArray &saveState = QByteArray());

View File

@@ -194,7 +194,7 @@ void OpenEditorsWidget::activateEditor(const QModelIndex &index)
void OpenEditorsWidget::closeEditor(const QModelIndex &index)
{
EditorManager::closeEditor(
EditorManager::closeDocument(
DocumentModel::entryAtRow(m_model->mapToSource(index).row()));
// work around selection changes
updateCurrentItem(EditorManager::currentEditor());