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:
@@ -730,7 +730,7 @@ void CppToolsPlugin::test_modelmanager_gc_if_last_cppeditor_closed()
|
||||
helper.waitForRefreshedSourceFiles();
|
||||
|
||||
// Close file/editor
|
||||
Core::EditorManager::closeEditor(editor, /*askAboutModifiedEditors=*/ false);
|
||||
Core::EditorManager::closeDocument(editor->document(), /*askAboutModifiedEditors=*/ false);
|
||||
helper.waitForFinishedGc();
|
||||
|
||||
// Check: File is removed from the snapshpt
|
||||
@@ -769,7 +769,7 @@ void CppToolsPlugin::test_modelmanager_dont_gc_opened_files()
|
||||
QVERIFY(mm->snapshot().contains(file));
|
||||
|
||||
// Close editor
|
||||
Core::EditorManager::closeEditor(editor);
|
||||
Core::EditorManager::closeDocument(editor->document());
|
||||
helper.waitForFinishedGc();
|
||||
QVERIFY(mm->snapshot().isEmpty());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user