diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-08-29 09:59:45 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-09-12 06:37:41 +0000 |
commit | ed9177f74cf5da5eda3d2bc670ef883b66ee9a9b (patch) | |
tree | 439123496d84c84e0977fb03034ccfea4299ff17 /src/plugins/projectexplorer/rawprojectpart.h | |
parent | 295fb99cc64243458832a3352b01707488324a6e (diff) |
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>
Diffstat (limited to 'src/plugins/projectexplorer/rawprojectpart.h')
-rw-r--r-- | src/plugins/projectexplorer/rawprojectpart.h | 68 |
1 files changed, 67 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/rawprojectpart.h b/src/plugins/projectexplorer/rawprojectpart.h index 4f6969d92a..eda3ce5ad7 100644 --- a/src/plugins/projectexplorer/rawprojectpart.h +++ b/src/plugins/projectexplorer/rawprojectpart.h @@ -31,13 +31,20 @@ #include "projectexplorer_global.h" #include "projectmacro.h" +// this include style is forced for the cpp unit test mocks +#include <projectexplorer/toolchain.h> + #include <utils/cpplanguage_details.h> +#include <utils/environment.h> + +#include <QPointer> #include <functional> namespace ProjectExplorer { -class ToolChain; +class Kit; +class Project; class PROJECTEXPLORER_EXPORT RawProjectPartFlags { @@ -114,4 +121,63 @@ public: using RawProjectParts = QVector<RawProjectPart>; +class PROJECTEXPLORER_EXPORT KitInfo +{ +public: + explicit KitInfo(Project *project); + + bool isValid() const; + + Kit *kit = nullptr; + ToolChain *cToolChain = nullptr; + ToolChain *cxxToolChain = nullptr; + + Utils::QtVersion projectPartQtVersion = Utils::QtVersion::None; + + QString sysRootPath; +}; + +class PROJECTEXPLORER_EXPORT ToolChainInfo +{ +public: + ToolChainInfo() = default; + ToolChainInfo(const ProjectExplorer::ToolChain *toolChain, + const QString &sysRootPath, + const Utils::Environment &env); + + bool isValid() const { return type.isValid(); } + +public: + Core::Id type; + bool isMsvc2015ToolChain = false; + unsigned wordWidth = 0; + QString targetTriple; + QStringList extraCodeModelFlags; + + QString sysRootPath; // For headerPathsRunner. + ProjectExplorer::ToolChain::BuiltInHeaderPathsRunner headerPathsRunner; + ProjectExplorer::ToolChain::MacroInspectionRunner macroInspectionRunner; +}; + +class PROJECTEXPLORER_EXPORT ProjectUpdateInfo +{ +public: + ProjectUpdateInfo() = default; + ProjectUpdateInfo(Project *project, + const KitInfo &kitInfo, + const Utils::Environment &env, + const RawProjectParts &rawProjectParts); + bool isValid() const; + +public: + QPointer<Project> project; + RawProjectParts rawProjectParts; + + const ToolChain *cToolChain = nullptr; + const ToolChain *cxxToolChain = nullptr; + + ToolChainInfo cToolChainInfo; + ToolChainInfo cxxToolChainInfo; +}; + } // namespace ProjectExplorer |