EditorManager: Small API clean-up

- Move private enum to private header
- Add missing parameter to openEditorAtSearchResult
- Remove convenience singular close* methods, we have {} nowadays

Change-Id: Ic5b6d831a9f506ffee09b89b3358874433d62998
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2020-09-29 10:24:48 +02:00
parent 52d1b31a67
commit f811b87c66
18 changed files with 42 additions and 74 deletions

View File

@@ -666,7 +666,7 @@ void CppToolsPlugin::test_modelmanager_gc_if_last_cppeditor_closed()
helper.waitForRefreshedSourceFiles();
// Close file/editor
Core::EditorManager::closeDocument(editor->document(), /*askAboutModifiedEditors=*/ false);
Core::EditorManager::closeDocuments({editor->document()}, /*askAboutModifiedEditors=*/false);
helper.waitForFinishedGc();
// Check: File is removed from the snapshpt
@@ -705,7 +705,7 @@ void CppToolsPlugin::test_modelmanager_dont_gc_opened_files()
QVERIFY(mm->snapshot().contains(file));
// Close editor
Core::EditorManager::closeDocument(editor->document());
Core::EditorManager::closeDocuments({editor->document()});
helper.waitForFinishedGc();
QVERIFY(mm->snapshot().isEmpty());
}