Commit Graph

20 Commits

Author SHA1 Message Date
Cristian Adam
86b8f68f78 clangd: make --limit-results configurable in Preferences
The default value is the clangd default value: 100.

Fixes: QTCREATORBUG-27152
Change-Id: Icb6c67645b33325da591cb360c17b3dd55fc60ad
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-26 17:28:23 +00:00
Jarek Kobus
44f1fd6498 Drop Qt5: Cpp/TextEditor: Get rid of QOverload
Change-Id: I010f211b40f876c0f033fd717aaa094f775ea214
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-26 16:58:45 +00:00
hjk
14257a24f9 Utils: Introduce Layouting::{br,st}
... as "standard" ways to define line breaks and simple stretch.

There have already been too many patterns to do it.

Break() and Stretch() still work for the patches in flight, but
they are planned to be removed.

Change-Id: I9b70dcdc11244a904a496b0c55938dfb0b265fc8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-25 09:52:15 +00:00
hjk
db7b523a94 CppEditor: Inline cppcodemodelsettingspage.ui
Change-Id: I97f27121714adaca00aaa1347d460968be395afa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-13 12:04:00 +00:00
hjk
7cc06b85d0 Replace more used of PathChooser::pathChanged by filePathChanged
Change-Id: I0f92be6fcfd0a5319ad9f5d3681266966e40705e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-07-01 10:07:24 +00:00
Artem Sokolovskii
7954c4cc69 ProjectExplorer: Add a common template for project settings
- Added base widget class for common options among project settings tabs
- Added usage new template class to all pages used in project settings

ToDo
- Make CodeStyle tab standardized

Change-Id: I8f70413b6ee764c5e43fbeae104b9389237c582f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-24 10:02:45 +00:00
Christian Kandeler
760cf632af Move clang diagnostics config settings to clangd settings page
It was confusing to have both "Clang Code Model" and "clangd" project
settings pages, so we merge them.
Along the way, a lot of code dropped off.

Change-Id: I780850b716195c3729403ae59f0794c11b5c556d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-23 12:15:40 +00:00
Christian Kandeler
affa2cda9e CppEditor: Tell users about clangd configuration files
It's not feasible to map every possible setting into our UI, so instead
teach people how to use the clangd configuration mechanism.

Change-Id: Id11e81e25b687a4f49af4e090203faca3a75722d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-17 08:56:32 +00:00
Eike Ziller
70b9f13792 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/libs/utils/qtcprocess.cpp
	src/plugins/cppeditor/cppcodemodelsettingspage.cpp

Change-Id: I602f4ff13f9370ec20704efaea34b42445a75fd4
2022-05-09 09:48:28 +02:00
Christian Kandeler
780f89b377 ClangCodeModel: Bump minimum clangd version
We need clangd >= 14 to get rid of the cumbersome compile_commands.json
creation.

Change-Id: I30c19a385e2d76e478985f3df64968d1cb3efe87
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-04 12:55:03 +00:00
Christian Kandeler
c97f0af531 ClangCodeModel: Don't ignore changes to clangd doc update threshold
Changing the document update threshold value had no effect in the per-
project settings.

Change-Id: Ibd6e47bba3e0a77ed18b97486eda17718c46c59d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-03 08:49:59 +00:00
Christian Kandeler
1f0ea9ef7f ClangCodeModel: Allow users to set a file size threshold for clangd
With huge source files it might not be so useful to continuously
recompile them while editing, which is basically what clangd does.
Let users opt out.

Change-Id: If3e95c1e286090606a84961d071179f8b40f9180
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-30 07:53:07 +00:00
Christian Kandeler
a77f5d41b4 CppEditor: No longer refer to clangd as experimental in the UI
Change-Id: Iadfbdf23a92ee551fff03f5eb5b8a1b2b15b0870
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-31 13:58:16 +00:00
Alessandro Portale
df1876f0d0 Remove nested margins in project panel wigets
While maintaining the margins in the respective option pages.

Change-Id: Ia7c0e9f68ab196be0d68632117041eca9f4b15f5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-12-02 08:08:14 +00:00
Christian Kandeler
0cc4617c78 CppEditor: Add settings for clangd session mode
Complete with (hidden) UI. Doesn't do anything yet, because some
assumptions about projects need to be adapted on the LanguageClient side
first.

Task-number: QTCREATORBUG-26526
Change-Id: I34c92555e34c3d3ed98462261d47b35dfc015ce0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-01 13:26:35 +00:00
Christian Kandeler
7e99926efd CppEditor: Make sure all clangd-related widgets are enabled/disabled
... when the general clangd checkbox is toggled.

Change-Id: Icb2503e5e2d66cba4fb81a3dc7a891e8ed694132
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-04 13:26:32 +00:00
Christian Kandeler
4dfdbf91f6 CppEditor: Do not use clangd < 13
We will shortly need to use a command-line option that is new in clangd
13. Rather than starting to add checks for versions that won't work as
expected anyway, we simply refuse to use clangd < 13 now.

Change-Id: I42ec679e0f58449a2593cf92b4be7ed3101fa787
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-01 14:19:27 +00:00
Christian Kandeler
2ecbbb126d ClangCodeModel: Do not let clangd insert header files on completion
... by default.
This feature often doesn't do what you'd want it to, so we make it opt-
in.

Change-Id: I631eae9c154ddcb0e8feeac44c5d5c0265706a67
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-27 10:17:39 +00:00
Christian Kandeler
0a2b504663 CppEditor: Add warning label to clangd settings page
So people with older installations know right away that they can't
expect full functionality.

Change-Id: I8cceb2c88ba1622fa37fb88fc0b96253b6c13a06
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-11 08:47:24 +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