Commit Graph

10 Commits

Author SHA1 Message Date
Christian Kandeler
ad8db12de9 CppEditor: Make CompilerOptionsBuilder take the actual clang include dir
This is more clear than passing in version and fallback path and
calculating the real path from them somewhere down the line.
No functional changes for now.

Change-Id: Iae2fc8015c778d787ed6e0ce898f41a7a05b2607
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-10 10:41:50 +00:00
Christian Kandeler
7ef5001076 ClangCodeModel: Speed up compilation db generation
We needlessly re-evaluated the same compiler options again and again for
all files in a project part.
Now we only do the actual file-related work per file. Along the way, we
dissolved some unneeded classes and made CompilerOptionsBuilder non-
polymorphic.

Change-Id: I9710d641a57032936cc0812515974dbc91676c8c
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-06 09:05:59 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Christian Kandeler
6cec0e2033 ProjectExplorer: Allow users to override the gcc target triple
... for the clang code model. Otherwise, it won't work with GCC
compilers for architectures clang does not know about.

Fixes: QTCREATORBUG-26913
Change-Id: I90115f2f562eae9922b90c500630ccf988542ca3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 12:10:56 +00:00
Cristian Adam
5a6c625c5e CppEditor: Fix codemodel highlighting for QNX
The code model will get the necessary bits so that it can successfully
parse the QNX code.

Fixes: QTCREATORBUG-23483
Change-Id: Id9488f644ace23952edf7a7cb5da7ca138182134
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-03 14:15:05 +00:00
Christian Kandeler
7e614b599e CppEditor: Transform deprecated -gcc-toolchain option
See https://reviews.llvm.org/D108494.

Change-Id: I85b2a0ea077d2a622fac16bda009a7ee71da0e90
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-03 10:18:45 +00:00
Christian Kandeler
9c86e6746f CppEditor: Prefer target flags from the build system
The build system has in-depth knowledge of how to build the project and
is therefore a much more reliable source of information about the
concrete target triple than what we extracted generically from the
toolchain.

Fixes: QTCREATORBUG-25615
Change-Id: I820f8dd99da3832326308510a50aa7cbb4aa8fdb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-15 07:52:38 +00:00
Christian Kandeler
72d52f3ac2 CppEditor: Un-export some classes
Change-Id: I285fe7bd3ac835c4a43f0a200dd7905f577ff211
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-06 14:48:17 +00:00
Christian Kandeler
3be9f52980 Fix some warnings
Unused functions & variables, initialization order, signedness, non-
virtual destructor.

Change-Id: I405d768fe0e02a36a16c2cead9e1bc2f6a23fb75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-02 13:47:07 +00:00
Christian Kandeler
284817fae6 Merge CppTools into CppEditor
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.

Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-01 14:53:58 +00:00