CppTools: Move ProjectUpdateInfo to ProjectExplorer

Used for updating project parts, so move it near RawProjectPart.

Change-Id: I77aeffbdbfb3d2ec0de600f61dcf7fbb7a355a98
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Eike Ziller
2019-08-29 09:59:45 +02:00
parent 295fb99cc6
commit ed9177f74c
17 changed files with 147 additions and 225 deletions

View File

@@ -25,48 +25,14 @@
#include "projectinfo.h"
#include "cppkitinfo.h"
#include <projectexplorer/abi.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/rawprojectpart.h>
#include <projectexplorer/toolchain.h>
namespace CppTools {
ToolChainInfo::ToolChainInfo(const ProjectExplorer::ToolChain *toolChain,
const QString &sysRootPath, const Utils::Environment &env)
{
if (toolChain) {
// Keep the following cheap/non-blocking for the ui thread...
type = toolChain->typeId();
isMsvc2015ToolChain
= toolChain->targetAbi().osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor;
wordWidth = toolChain->targetAbi().wordWidth();
targetTriple = toolChain->originalTargetTriple();
extraCodeModelFlags = toolChain->extraCodeModelFlags();
// ...and save the potentially expensive operations for later so that
// they can be run from a worker thread.
this->sysRootPath = sysRootPath;
headerPathsRunner = toolChain->createBuiltInHeaderPathsRunner(env);
macroInspectionRunner = toolChain->createMacroInspectionRunner();
}
}
ProjectUpdateInfo::ProjectUpdateInfo(ProjectExplorer::Project *project,
const KitInfo &kitInfo,
const Utils::Environment &env,
const ProjectExplorer::RawProjectParts &rawProjectParts)
: project(project)
, rawProjectParts(rawProjectParts)
, cToolChain(kitInfo.cToolChain)
, cxxToolChain(kitInfo.cxxToolChain)
, cToolChainInfo(ToolChainInfo(cToolChain, kitInfo.sysRootPath, env))
, cxxToolChainInfo(ToolChainInfo(cxxToolChain, kitInfo.sysRootPath, env))
{
}
ProjectInfo::ProjectInfo(QPointer<ProjectExplorer::Project> project)
: m_project(project)
{