forked from qt-creator/qt-creator
EditorManager: Another naming correction
closeEditor(Entry) -> closeDocument(Entry) Change-Id: I996cc8a22b670f97dc47470116003c537e7f32b0 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user