From 3e7d93c788773c7f8194a5465ee0f46961432d76 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 14 Feb 2023 15:47:22 +0100 Subject: ProjectExplorer: Move some not-fully-session related bits ... out of SessionManager. The idea is to later move SessionManager into the Core plugin, which both is sensible conceptually and also prerequisite to merge the Bookmark plugin into TextEditor plugin. Currently, only the interface is split, as the load/save implemetations are non-mechanical to disentangle. Change-Id: I31631db3094ea192825a2ccaa6add6188662940b Reviewed-by: Eike Ziller Reviewed-by: --- src/plugins/python/pythonutils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/python/pythonutils.cpp') diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 346c42d183..8635605092 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include @@ -31,9 +31,9 @@ static QHash &userDefinedPythonsForDocument() FilePath detectPython(const FilePath &documentPath) { Project *project = documentPath.isEmpty() ? nullptr - : SessionManager::projectForFile(documentPath); + : ProjectManager::projectForFile(documentPath); if (!project) - project = SessionManager::startupProject(); + project = ProjectManager::startupProject(); Environment env = Environment::systemEnvironment(); @@ -107,7 +107,7 @@ void openPythonRepl(QObject *parent, const FilePath &file, ReplType type) { static const auto workingDir = [](const FilePath &file) { if (file.isEmpty()) { - if (Project *project = SessionManager::startupProject()) + if (Project *project = ProjectManager::startupProject()) return project->projectDirectory(); return FilePath::currentWorkingPath(); } @@ -155,7 +155,7 @@ QString pythonName(const FilePath &pythonPath) PythonProject *pythonProjectForFile(const FilePath &pythonFile) { - for (Project *project : SessionManager::projects()) { + for (Project *project : ProjectManager::projects()) { if (auto pythonProject = qobject_cast(project)) { if (pythonProject->isKnownFile(pythonFile)) return pythonProject; -- cgit v1.2.1