diff options
author | hjk <[email protected]> | 2019-10-25 09:55:32 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2019-11-19 11:05:52 +0000 |
commit | 27586827238ca9079860e77a7b23ae20d163143e (patch) | |
tree | 2197dc7f97a4a70524381071888336558dc0b4a3 /src/plugins/qmakeprojectmanager/qmakeparsernodes.h | |
parent | 9073c46c9c431ec0e83987a5781163ca7b1f7ea7 (diff) |
ProjectExplorer: Move BuildSystem owership to BuildConfiguration
... or Target.
This patch moves build system from conceptually "one per project"
to "one per target (i.e. per project-and-kit)" or "per
BuildConfigurations" for targets where the builds differ
significantly.
Building requires usually items from the kit (Qt version, compiler,
...) so a target-agnostic build is practically almost always wrong.
Moving the build system to the target also has the potential
to solve issues caused by switching targets while parsing, that
used Project::activeTarget() regularly, with potentially different
results before and after the switch.
This patch might create performance/size regressions when several
targets are set up per project as the build system implementation's
internal data are duplicated in this case.
The idea is to fix that by sharing per-project pieces again in
the project implementation once these problems occur.
Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca
Reviewed-by: Christian Stenger <[email protected]>
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/qmakeprojectmanager/qmakeparsernodes.h')
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeparsernodes.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h index 538d1a65e91..25dc5c5acf5 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h @@ -47,10 +47,10 @@ class FileSystemWatcher; } // namespace Utils; namespace QtSupport { class ProFileReader; } -namespace ProjectExplorer { class RunConfiguration; } namespace QmakeProjectManager { class QmakeBuildConfiguration; +class QmakeBuildSystem; class QmakeProFile; class QmakeProject; @@ -122,7 +122,7 @@ using SourceFiles = QSet<SourceFile>; class QMAKEPROJECTMANAGER_EXPORT QmakePriFile { public: - QmakePriFile(QmakeProject *project, QmakeProFile *qmakeProFile, const Utils::FilePath &filePath); + QmakePriFile(QmakeBuildSystem *buildSystem, QmakeProFile *qmakeProFile, const Utils::FilePath &filePath); virtual ~QmakePriFile(); Utils::FilePath filePath() const; @@ -178,6 +178,8 @@ public: void scheduleUpdate(); + QmakeBuildSystem *buildSystem() const; + protected: void setIncludedInExactParse(bool b); static QStringList varNames(ProjectExplorer::FileType type, QtSupport::ProFileReader *readerExact); @@ -225,7 +227,7 @@ private: QString continuationIndent() const; - QmakeProject *m_project = nullptr; + QPointer<QmakeBuildSystem> m_buildSystem; QmakeProFile *m_qmakeProFile = nullptr; QmakePriFile *m_parent = nullptr; QVector<QmakePriFile *> m_children; @@ -289,7 +291,7 @@ public: class QMAKEPROJECTMANAGER_EXPORT QmakeProFile : public QmakePriFile { public: - QmakeProFile(QmakeProject *project, const Utils::FilePath &filePath); + QmakeProFile(QmakeBuildSystem *buildSystem, const Utils::FilePath &filePath); ~QmakeProFile() override; bool isParent(QmakeProFile *node); @@ -309,7 +311,7 @@ public: } Utils::FilePath sourceDir() const; - Utils::FilePath buildDir(QmakeBuildConfiguration *bc = nullptr) const; + Utils::FilePath buildDir(ProjectExplorer::BuildConfiguration *bc = nullptr) const; Utils::FilePathList generatedFiles(const Utils::FilePath &buildDirectory, const Utils::FilePath &sourceFile, |