forked from qt-creator/qt-creator
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 <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include <cppeditor/cppmodelmanager.h>
|
||||
#include <projectexplorer/buildsystem.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/projectmanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/asynctask.h>
|
||||
@@ -33,7 +33,7 @@ using namespace ProjectExplorer;
|
||||
|
||||
static bool isProjectParsing()
|
||||
{
|
||||
const BuildSystem *bs = SessionManager::startupBuildSystem();
|
||||
const BuildSystem *bs = ProjectManager::startupBuildSystem();
|
||||
return bs && bs->isParsing();
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ void TestCodeParser::setState(State state)
|
||||
}
|
||||
m_parserState = state;
|
||||
|
||||
if (m_parserState == Idle && SessionManager::startupProject()) {
|
||||
if (m_parserState == Idle && ProjectManager::startupProject()) {
|
||||
if (m_postponedUpdateType == UpdateType::FullUpdate || m_dirty) {
|
||||
emitUpdateTestTree();
|
||||
} else if (m_postponedUpdateType == UpdateType::PartialUpdate) {
|
||||
@@ -130,7 +130,7 @@ void TestCodeParser::updateTestTree(const QSet<ITestParser *> &parsers)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SessionManager::startupProject())
|
||||
if (!ProjectManager::startupProject())
|
||||
return;
|
||||
|
||||
m_postponedUpdateType = UpdateType::NoUpdate;
|
||||
@@ -149,7 +149,7 @@ void TestCodeParser::onDocumentUpdated(const FilePath &fileName, bool isQmlFile)
|
||||
if (isProjectParsing() || m_codeModelParsing || m_postponedUpdateType == UpdateType::FullUpdate)
|
||||
return;
|
||||
|
||||
Project *project = SessionManager::startupProject();
|
||||
Project *project = ProjectManager::startupProject();
|
||||
if (!project)
|
||||
return;
|
||||
// Quick tests: qml files aren't necessarily listed inside project files
|
||||
@@ -185,7 +185,7 @@ void TestCodeParser::onStartupProjectChanged(Project *project)
|
||||
|
||||
void TestCodeParser::onProjectPartsUpdated(Project *project)
|
||||
{
|
||||
if (project != SessionManager::startupProject())
|
||||
if (project != ProjectManager::startupProject())
|
||||
return;
|
||||
if (isProjectParsing() || m_codeModelParsing)
|
||||
m_postponedUpdateType = UpdateType::FullUpdate;
|
||||
@@ -277,7 +277,7 @@ void TestCodeParser::scanForTests(const FilePaths &fileList, const QList<ITestPa
|
||||
m_reparseTimerTimedOut = false;
|
||||
m_postponedFiles.clear();
|
||||
bool isFullParse = fileList.isEmpty();
|
||||
Project *project = SessionManager::startupProject();
|
||||
Project *project = ProjectManager::startupProject();
|
||||
if (!project)
|
||||
return;
|
||||
FilePaths list;
|
||||
|
||||
Reference in New Issue
Block a user