Commit Graph

15 Commits

Author SHA1 Message Date
Tobias Hunger
a33cb335f7 CMake: Fileapi: Make ids unique per compile group
Make sure to generate unique ids for each project part to unconfuse the
code model.

This was never triggered so far since before PCH support all my test projects
ended up with exactly one compile group per target:-)

Change-Id: Ida34f71f77cdf679fea7007f13ac19713175d916
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-09-19 09:53:52 +00:00
Tobias Hunger
454261aaa2 CMake: Support pre-compiled headers in CMake fileapi reader
Adding this to other readers makes no sense: PCH support in cmake
is younger than fileapi.

Change-Id: I4cd88882764ab8a8f81316a17098878c8e3699eb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-09-19 09:52:53 +00:00
Eike Ziller
9cc45fe1fb CppTools: Move RawProjectPart to ProjectExplorer
Doesn't have any dependencies into CppTools anymore, therefore moving it
reduces the dependencies of the project managers to CppTools as well.

Change-Id: Ibe728abe59eb88a8877943dca1f48a85163e27ac
Reviewed-by: hjk <hjk@qt.io>
2019-09-11 06:22:12 +00:00
Eike Ziller
8452264a18 CppTools: Move QtVersion and BuildTargetType
QtVersion to utils/cpplanguage_details.h which already contains similar
flags.

BuildTargetType to ProjectExplorer, next to BuildTargetInfo (but not in the
same header to not pull that in everywhere).

Removes dependency on ProjectPart from RawProjectPart.

Change-Id: I5791065e4266f20c2657ee4b1b594df04b238a1c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-10 07:31:21 +00:00
Tobias Hunger
4aee38e04c CMake: Extract and show more CMake location information for targets
Report more cmake file locations that are relevant to a target in
the "Open..." menu entry in the target's context menu.

This information is extracted from the backtrace information that
is provided by fileapi.

Change-Id: I01659a6cc7254cd0ef6b533a0785d2f15d31c3c6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-07-29 08:46:53 +00:00
Tobias Hunger
9ae4510e27 ProjectNodes: Use QVector instead of QList for LocationInfo
Change-Id: I5bad9e1849b9d752de24626013c9102242d11a0a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-29 08:45:08 +00:00
Tobias Hunger
4daba5a9fa CMake: Fix working directory for targets in fileapi mode
Prepend the full path to the build directory.

Change-Id: I55111b656fd4b99ee68517c09117f142e88947b1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-26 11:49:01 +00:00
Tobias Hunger
ec92784778 CMake: Report absolute paths to executables in fileapi mode
Task-number: QTCREATORBUG-22610
Change-Id: Ib6abf1ce6d94abd9dc063f4f559f02f2d4ea8798
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-25 13:19:11 +00:00
Tobias Hunger
69b3d90683 CMake: Remember file location of CMake target definitions
Make fileapi remember where CMake targets were defined in the
CMakeBuildTarget struct. The other readers will just guess at
the location based on the source directory of the target.

Change-Id: Ia8fa226c548800992ccea64b1d5981d2f3013408
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-24 14:57:47 +00:00
hjk
5efa84b91f Replace remaining Utils::FileName occurrences by Utils::FilePath
Change-Id: Ic3120f18b4fbe90219de9128dba53d7453630b03
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 13:40:22 +00:00
Tobias Hunger
18eb0b39c5 CMake: Do not treat "Source Files" source file group special
The idea was to make the project tree a bit simpler by removing the
auto-generated "Source Files" group that CMake adds. But this left out
"Header Files", which is also auto-generated by CMake and might
surprise users.

So let's remove this special case again.

Change-Id: If87bf9f89e1ff0be855c2e9b915d64d77d51d2be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-21 09:37:36 +00:00
Nikolai Kosjar
b6a9f0245b CMake: Fix warning about unsigned expression
warning: comparison of unsigned expression >= 0 is always true

Change-Id: I0a794bd7aa27a8a23094db4d95c676080b6a63b6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-06-21 07:18:01 +00:00
Tobias Hunger
5bcd59c94f CMake: Simplify buildkey generation
Just use the target name as buildkey. This is unique in cmake projects, so
there is no need to mangle the source directory into the whole thing.

This is a problem since different readers might report different source
directories. That will then result in RunConfigurations getting duplicated
after switching the reader types.

Task-number: QTCREATORBUG-22129
Change-Id: I849ab68f221d732341e98faa9a4e757d3a495b2a
Reviewed-by: hjk <hjk@qt.io>
2019-06-20 14:41:04 +00:00
Tobias Hunger
add60c0148 CMake: Avoid a bit of useless processing when updating the project tree
Do not pass around a list of filenodes with all the known header files.
That list gets converted into a QSet<FilePath> and then that is used.

Just generate the QSet<FilePath> directly and avoid that conversion.

Change-Id: I2444a2a6b4a1600fe476e66673a1a2e9c8900764
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-06-20 14:40:55 +00:00
Tobias Hunger
a95eb53d3b CMake: Add initial fileapireader class
Change-Id: I620cba7cc1c2a5ac56789fa9770dce573c6b19cd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-20 12:25:36 +00:00