diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-05-07 16:10:07 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-08-13 12:35:49 +0000 |
commit | 33108795d6b2dd1e91942efb3c1c27ad23342295 (patch) | |
tree | 084d21ac56db3c55c84f242acc8400f2e68cd81c /src/plugins/cpptools/cppprojectupdater.h | |
parent | 3143ba79e3d954e006f261cc0a535724a4fdc08a (diff) | |
download | qt-creator-33108795d6b2dd1e91942efb3c1c27ad23342295.tar.gz |
CppTools: Turn some classes into pure value types
ProjectInfo, ProjectPart and ProjectUpdateInfo used to carry pointers
to Project and/or Toolchain, even though they were used in contexts
where these pointers were either unsafe to access or not guaranteed to
be valid anymore, which made their use difficult and error-prone.
We turn these classes into pure value types by copying in all relevant
information before the first async operation takes place.
Fixes: QTCREATORBUG-25678
Change-Id: I1914b0dbda6c7dfba6c95e5e92f2d69977755590
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppprojectupdater.h')
-rw-r--r-- | src/plugins/cpptools/cppprojectupdater.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppprojectupdater.h b/src/plugins/cpptools/cppprojectupdater.h index c356ab63d1..a76122d4b4 100644 --- a/src/plugins/cpptools/cppprojectupdater.h +++ b/src/plugins/cpptools/cppprojectupdater.h @@ -63,7 +63,6 @@ public: void cancel() override; private: - void onToolChainRemoved(ProjectExplorer::ToolChain *); void onProjectInfoGenerated(); void checkForExtraCompilersFinished(); @@ -71,7 +70,7 @@ private: ProjectExplorer::ProjectUpdateInfo m_projectUpdateInfo; QList<QPointer<ProjectExplorer::ExtraCompiler>> m_extraCompilers; - QFutureWatcher<ProjectInfo> m_generateFutureWatcher; + QFutureWatcher<ProjectInfo::Ptr> m_generateFutureWatcher; bool m_isProjectInfoGenerated = false; QSet<QFutureWatcher<void> *> m_extraCompilersFutureWatchers; std::unique_ptr<QFutureInterface<void>> m_projectUpdateFutureInterface; |