Commit Graph

11 Commits

Author SHA1 Message Date
Christian Kandeler
25ff15a1fb Add convenience functions for creating ProjectExplorer::HeaderPaths
Change-Id: I7b1f63caca6b70ba4ec1b1870b83cbf20aa6564a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-30 10:46:56 +00:00
Christian Kandeler
a952500e90 CppTools: Use only const pointers for ProjectInfo and ProjectPart
All members were already const, but this makes it clear at all points of
use that these data structures are immutable.

Change-Id: Iea615c090bde462c445d15223caccc561b0c713d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-08-27 10:53:54 +00:00
Christian Kandeler
245b6c0dc7 CppTools: Use test objects to group related test functions
Change-Id: I9ed2ad222579f49c20c75a53c862bb7251cff28d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-26 08:38:44 +00:00
Christian Kandeler
acccdd774b CppTools: Fix tests
- Prevent invalid access to temporary.
- Fix typo.
- Use accidentally unused class member.
Amends 33108795d6.

Change-Id: I2cc91e294fb4be7f4e20b383171b06a39f53c99c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-16 10:00:36 +00:00
Christian Kandeler
33108795d6 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>
2021-08-13 12:35:49 +00:00
Christian Kandeler
a3d621fbde CppTools: Move ProjectFileCategorizer tests to plugin
Change-Id: I51d66d9ff9a14e2dd04cf25448ccc8c85bcbce97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-22 07:29:46 +00:00
Christian Kandeler
709138ce61 CppTools: Remove some unneeded name qualifications in converted tests
Change-Id: Ib14f576d0502adde56e8c8b0af0c5d95fae1eddf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 09:48:59 +00:00
Christian Stenger
1a0c9a5ce4 CppTools: Fix compile with gcc7
Amends 18ab828b6b.

Change-Id: I758e0a584769b665eb7215da5a9f42938d3de5fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-21 09:21:05 +00:00
Christian Kandeler
18ab828b6b CppTools: Move HeaderPathsFilter tests to plugin
Change-Id: Iecbb0942bed51002e85b96f6cc2ab034622cd07f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-20 09:35:52 +00:00
Christian Kandeler
5ec52eef31 CppTools: Move ProjectInfoGenerator tests into the plugin
Change-Id: I40d4b0b9751e77a5bb605349c86b37ad3935ca59
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 12:09:48 +00:00
Christian Kandeler
32f46e55ed CppTools: Move ProjectPartChooser tests into the plugin
Change-Id: Ic2ef95d4d6a5bd65cbc611b66a0b297c7468bbcb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-05 07:38:10 +00:00