summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppcodemodelsettingspage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ClangCodeModel: Let user decide how to do the header/source switchChristian Kandeler2023-05-171-0/+27
| | | | | | | | | | | | While clangd's AST matching can find source files at any location, it also has a number of annoying bugs that break the functionality for some users. This patch brings back the previous "try built-in first" logic, but also lets users choose their preferred backend. Task-number: QTCREATORBUG-29175 Change-Id: I6b854ed05652e6468509e5748a83a8f9bf76fc20 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: Make Layouting a top level namespacehjk2023-04-251-2/+2
| | | | | | | | | | The whole machinery is now almost only layoutbuilder.{h,cpp}, mostly independent of the rest of Utils. Idea is to finish the separation to make it stand-alone usable also outside creator. Change-Id: I958aa667d17ae26b21209f22412309c5307a579c Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CppEditor/ClangTools: Version tooltip for clang tools path choosersAlessandro Portale2023-04-051-0/+1
| | | | | Change-Id: Idaacb8449ef298dfe9e54a06cefd373816011360 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* C++ settings: Don't manually break tooltipEike Ziller2023-02-211-12/+8
| | | | | | | | Use automatic word-wrap instead, by making it an html tooltip. This is also less weird when translating (though one needs the <p> tags). Change-Id: I96f2719b46c5a0242ef6e94db38bb67a6f79ab80 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Docker: validate clangd versionDavid Schulz2023-01-201-11/+3
| | | | | | | | | | Do not automatically setup a clangd that is too old and mark them as invalid if they are manually selected. Change-Id: Ie9662a8821df8fc678eabc4b8a08375723b4d1c3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* CppEditor: Convert to Tr::trAlessandro Portale2023-01-121-43/+40
| | | | | | Change-Id: Ic4025e06e17c45eb6dc2162fb7f21f5b8aebe84d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-11-231-0/+1
|\ | | | | | | Change-Id: I69ebd63cbd780ed4edb3873acfc8aac208933032
| * CPPEditor: Allow clangd from deviceMarcus Tillmanns2022-11-221-0/+1
| | | | | | | | | | Change-Id: Ia9b59b374aaebf0bfb820b5a289c6e3c0599cb10 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | cppeditor: make it possible to ignore patternsPhilip Van Hoof2022-10-251-0/+27
|/ | | | | | | | | Allows the user to ignore certain patterns so that these files wont be indexed Fixes: QTCREATORBUG-28313 Change-Id: I2a860a473ca1a267e9fab31436fc98b8f4004484 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* Clangd: add setting for index priorityDavid Schulz2022-09-281-8/+27
| | | | | | Change-Id: I5f9ea8c31747d1cd1e1e6b77ab7c705a7f275cff Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ClangdSettingsWidget: Use CheckBox with text instead of CheckBox+LabelAlexander Akulich2022-09-161-6/+5
| | | | | | | | This fixes vertical alignment. Change-Id: I01b70daffba0550ec6955bd0523930edc5acc8e9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppEditor: Add support for showing pre-processed source filesChristian Kandeler2022-09-141-0/+14
| | | | | | | Fixes: QTCREATORBUG-4 Change-Id: I819709e69e604849264e745da98065829f7cb228 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* ClangdSettingsWidget: Enable word wrap for a long help labelAlexander Akulich2022-09-121-0/+1
| | | | | Change-Id: Ia96b73fb2dded58fb824b401c0cf94e8ef5a5664 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Improve Clangd settings pageEike Ziller2022-09-061-21/+43
| | | | | | | | | | | | | | | | - add tooltips to the labels - move the completion settings together - move the "threshold" settings together - move the indexing option together with the worker threads option - mention that we fallback to a built-in indexer if clangd background indexing is turned off - add tool tip to worker threads option that mentions that this is also used for background indexing - adapt documentation Fixes: QTCREATORBUG-28071 Change-Id: I89b00a586fa79fd5ba25c4d187e36d5cfc2d4903 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Replace PathChooser::{fileP,p}athChanged signalshjk2022-09-061-2/+2
| | | | | | | | | | | | | | | | | ... by a new PathChooser::textChanged signal. They were both emitted in reaction to the underlying line edit's textChanged() signal. Use 'textChanged()' as name to mimic/match the Qt side. This also makes it more clear on the user code side, when this happens. Some textChanged() consumers should probably use editingFinished() instead, but that's left for later changes. Change-Id: Ib07347f616cbf1c5d09bc2f8671ca860d185d1f9 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ClangCodeModel: Implement per-session mode for clangdChristian Kandeler2022-09-051-3/+4
| | | | | | | Fixes: QTCREATORBUG-26526 Change-Id: If9e018475b4e2f0557d9bf64ad9a7921c9dd6046 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Add "Layouting::HorizontalRule" LayoutItemAlessandro Portale2022-08-291-3/+1
| | | | | | | | | | | | We have many horizontal separator lines in the UI, which are each time repetitively created from a QFrame with some flags set. With the .ui inlining, we will have more of these separators coming. This change intoduces a Layouting::HorizontalRule LayoutItem and replaces various existing QFarme separators with it. Change-Id: I60bad89e2a2b777fbd2f9d0cf872af81e41dcfd7 Reviewed-by: hjk <hjk@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ClangCodeModel: connect completion result count settingsDavid Schulz2022-08-051-0/+3
| | | | | | | | And return the current settings from the clangd settings widget. Change-Id: I93455b077bbe0ec1aeb9dfa567b8559bfbb5dfe6 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Re-word misleading help text about clangd config filesChristian Kandeler2022-08-011-2/+2
| | | | | | | Task-number: QTCREATORBUG-27965 Change-Id: Ic41cea9b7383ab4b7c8fa76a6d67f6221cd49fdd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Settle on lowerSnakeCase for LayoutBuilder::Setterhjk2022-07-271-1/+1
| | | | | | | Change-Id: Icfe487d8c7712cc8ad28f0f61e8ae4778a356fc3 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* clangd: make --limit-results configurable in PreferencesCristian Adam2022-07-261-0/+14
| | | | | | | | | 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>
* Drop Qt5: Cpp/TextEditor: Get rid of QOverloadJarek Kobus2022-07-261-3/+3
| | | | | | Change-Id: I010f211b40f876c0f033fd717aaa094f775ea214 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Utils: Introduce Layouting::{br,st}hjk2022-07-251-2/+2
| | | | | | | | | | | | | ... 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>
* CppEditor: Inline cppcodemodelsettingspage.uihjk2022-07-131-31/+46
| | | | | | Change-Id: I97f27121714adaca00aaa1347d460968be395afa Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Replace more used of PathChooser::pathChanged by filePathChangedhjk2022-07-011-2/+2
| | | | | | Change-Id: I0f92be6fcfd0a5319ad9f5d3681266966e40705e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Add a common template for project settingsArtem Sokolovskii2022-05-241-24/+16
| | | | | | | | | | | - 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>
* Move clang diagnostics config settings to clangd settings pageChristian Kandeler2022-05-231-53/+15
| | | | | | | | | | | 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>
* CppEditor: Tell users about clangd configuration filesChristian Kandeler2022-05-171-0/+21
| | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-05-091-0/+2
|\ | | | | | | | | | | | | | | Conflicts: src/libs/utils/qtcprocess.cpp src/plugins/cppeditor/cppcodemodelsettingspage.cpp Change-Id: I602f4ff13f9370ec20704efaea34b42445a75fd4
| * ClangCodeModel: Don't ignore changes to clangd doc update thresholdChristian Kandeler2022-05-031-0/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | ClangCodeModel: Bump minimum clangd versionChristian Kandeler2022-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | ClangCodeModel: Allow users to set a file size threshold for clangdChristian Kandeler2022-03-301-0/+23
|/ | | | | | | | | | | 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>
* CppEditor: No longer refer to clangd as experimental in the UIChristian Kandeler2022-01-311-1/+1
| | | | | | Change-Id: Iadfbdf23a92ee551fff03f5eb5b8a1b2b15b0870 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Remove nested margins in project panel wigetsAlessandro Portale2021-12-021-0/+2
| | | | | | | | 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>
* CppEditor: Add settings for clangd session modeChristian Kandeler2021-12-011-10/+102
| | | | | | | | | | 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>
* CppEditor: Make sure all clangd-related widgets are enabled/disabledChristian Kandeler2021-11-041-9/+10
| | | | | | | ... when the general clangd checkbox is toggled. Change-Id: Icb2503e5e2d66cba4fb81a3dc7a891e8ed694132 Reviewed-by: David Schulz <david.schulz@qt.io>
* CppEditor: Do not use clangd < 13Christian Kandeler2021-11-011-19/+2
| | | | | | | | | | | 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>
* ClangCodeModel: Do not let clangd insert header files on completionChristian Kandeler2021-10-271-0/+11
| | | | | | | | | ... 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>
* CppEditor: Add warning label to clangd settings pageChristian Kandeler2021-10-111-0/+52
| | | | | | | | 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>
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-0/+350
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>