summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcodemodelsettingspage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-352/+0
| | | | | | | | | | | | | | | | 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>
* CppTools: Some code cosmeticshjk2021-08-201-3/+2
| | | | | | | Namespaces, foreach. Change-Id: I0129ee1ed1f5d1625869e8b5cb6173e3f71166e1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clangd: add setting for document update timeoutDavid Schulz2021-08-161-1/+17
| | | | | Change-Id: I4fae2cdff022f6f29566c0316a8ade51d3482466 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Clangd: Handle settings changesChristian Kandeler2021-07-011-5/+4
| | | | | | | | Users no longer have to re-load a project for settings changes to take effect. Change-Id: I86dccccac14a30514c8dac292c7765ee4806f6ba Reviewed-by: David Schulz <david.schulz@qt.io>
* Clangd: Add per-project settingsChristian Kandeler2021-06-301-54/+122
| | | | | | | Users might want to use clangd for certain project, but not for others. Change-Id: Id29ce3349f0acd359cf7c824ece073b147ed2280 Reviewed-by: David Schulz <david.schulz@qt.io>
* Clangd: use special value text for automatic worker countDavid Schulz2021-06-291-13/+6
| | | | | Change-Id: Iddb75b6716724b5994d8093a8e389f5cb8e2d044 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Clangd: Let users limit the worker thread countChristian Kandeler2021-06-281-2/+19
| | | | | | | | This is particularly interesting for indexing, where users might prefer a slower-building index with less CPU load. Change-Id: Id44c58e9041df2857cd0772e71345673b14623f3 Reviewed-by: David Schulz <david.schulz@qt.io>
* Clangd: Allow to switch off background indexingChristian Kandeler2021-06-281-0/+11
| | | | | | | | It is conceivable that users don't want to spend the extra CPU time on this. Change-Id: Ic3611c8d17d201ae986fad08b344369a8728ce1b Reviewed-by: David Schulz <david.schulz@qt.io>
* CppTools: Add dedicated settings and settings page for clangdChristian Kandeler2021-06-281-22/+57
| | | | | | | | We plan to add more clangd settings, and it makes sense to have a dedicated place for them both in the code and the UI. Change-Id: Ideb92935b7a5a6a98e07980f4011736fb82042d1 Reviewed-by: David Schulz <david.schulz@qt.io>
* ClangCodeModel: Add experimental clangd supportChristian Kandeler2021-04-221-0/+23
| | | | | | | | | | | | | If the user has enabled clangd (default is off), we start up one instance per project when it is opened/changed (including build config switches), and trigger background indexing. So far, the index is used to provide results for locators and "Find Usages". Per-document functionality such as semantic highlighting and completion is still provided by libclang. Change-Id: I12532fca1b9c6278baab560e7238cba6189cde9f Reviewed-by: David Schulz <david.schulz@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-3/+3
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppTools: Use unshared object for CppCodeModelSettingshjk2020-02-041-4/+4
| | | | | | | | | There's nothing shared here, only ever one copy. Ideally, this should be const outside CppToolsPlugin, but some settings are modified directly. Change-Id: I775b9151a244b3cc44d28bc992a041c42d234a18 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Apply new SettingsPage patternshjk2020-01-171-33/+34
| | | | | Change-Id: Id7410041d5813dc3df9aeb650074f961e394cd2d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Core: Introduce a IOptionsPage::setCategoryIconPathhjk2020-01-161-3/+1
| | | | | | | Less noise on the user side. Change-Id: I34dea09e8a3c8639f5a7db89b22f8b825b946395 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ClangTools: Query the tools for supported checksNikolai Kosjar2019-12-031-3/+7
| | | | | | | | | | | | | | | | ...instead of hardcoding them for a particular version of clang-tidy/clazy. While at it, move also the tidy/clazy widgets to ClangTools as this simplifies feeding data to them. Reduce also the built-in configs to a single one using clang-tidy's and clazy's default checks as they look very reasonable and saves us some porting effort. Also, our previous built-in configs were just too numerous. Change-Id: Ib9297acb7810a940b86a23a8695530506a570394 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* ClangTools: Polish ClangDiagnosticConfigsWidgetNikolai Kosjar2019-12-031-19/+12
| | | | | | | | | | | | | * Improve distinction between built-in and custom configs by introducing corresponding parent nodes * Add button to rename a config * Make closing the dialog apply the selected config. * Adapt also the related ClangDiagnosticConfigsSelectionWidget showing a combo box of the diagnostic configs and a "Manage..." button: Remove the combo box and show the current config as the button text. Change-Id: Ic015df37f2532f84bd7da6cd20bfce07799a97b8 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Clang/ClangTools: Separate custom diagnostic configsNikolai Kosjar2019-10-011-41/+20
| | | | | | | | | | | | | | | | | | Add a separate pool of custom diagnostic configs for the ClangTools plugin. That is, the diagnostic configs in Menu: Tools > C++ > Code Model are not shared anymore with the configs at Menu: Tools > Analyzer > ClangTools On plugin initialization of ClangTools, move tidy/clazy related configs to ClangTools. Change-Id: Id06087a58b53e466a3d7bbac669550c5fbe9899d Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* QtSupport: Remove dependency on CppToolsEike Ziller2019-09-121-2/+3
| | | | | | | | | It was only left for the C++ category for the Qt class generation settings. Change-Id: I22d3f198f7b825c4a36d08d4ee28091b9e5b1f43 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Remove unused QObject parent arguments on options pageshjk2019-09-111-7/+4
| | | | | | | | In the new plugin setup scheme they are data members of the plugin pimpl and never use the parent. Change-Id: I28fe150393e8159064dcfbd113ce0320af50fd58 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Warn of potentially expensive checksNikolai Kosjar2019-01-141-0/+34
| | | | | | | | | | | | | ...for the code model. If a diagnostic configuration with potentially expensive checks is selected in Options/Preferences > C++ > Code Model, show a warning below the combo box. Change-Id: I52c5c2e229fd50c0fd82f70154fb5b727726ba31 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppTools: Merge diagnostic selection widgets togetherIvan Donchevskii2018-05-141-4/+2
| | | | | | | | | QComboBox, QLabel and QPushButton are always used together. Therefore it makes sense to put them in one custom widget. Change-Id: Ie21675530fbadd7071f2a362567dadb6f09bb68d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Split diagnostic settings and selectionIvan Donchevskii2018-05-141-21/+17
| | | | | | | | | | Now selection is only consists of combobox and a "Manage" button to diagnostic configurations. Diagnostic configurations are moved to the modal dialog which is shown by clicking the mentioned "Manage" button. Change-Id: I607fb923c97e8730448548708f3aaf32ce1983c8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Update Options dialog iconsAlessandro Portale2018-04-241-1/+2
| | | | | | | | | A new set of scalable and themable icons with unified look as provided by Diana. Task-number: QTCREATORBUG-20325 Change-Id: I68498b034e9e43fbb61511a38d9c7fc0003ab076 Reviewed-by: hjk <hjk@qt.io>
* Clean up options page category display name and icon set upEike Ziller2018-04-231-2/+2
| | | | | | | | | | | | | | In cases where plugins extend an existing settings category of a plugin that they depend on anyhow, they do not need to specify the translated display name and icon for that category. Some options pages were already not setting the icon, but still the translated name, which makes even less sense. Clean up this mess, only setting display name and icon if that is necessary. Change-Id: I8bc9d0c51b11d48f1d847337838704d663e70b45 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Clang: Make clazy/tidy options part of the diagnostic configNikolai Kosjar2018-01-291-85/+0
| | | | | | | | As a side effect, clazy/tidy options become available for project specific customization in the projects mode. Change-Id: Id72762dedd857915139c15f532d2f1c6d1f43edb Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Plugins: Put settings into the TabWidgetIvan Donchevskii2017-12-071-8/+2
| | | | | | | | Make tidy/clazy switch more intuitive. Change-Id: I13d17376bdace039ae371693e28f6fcb0b493244 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CppTools: Fix compile with Qt5.6 and gcc4.9Christian Stenger2017-11-221-1/+1
| | | | | | Change-Id: I47668b784106c78444869595143ec8aff6928e8f Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Improve code model plugins settings UIIvan Donchevskii2017-11-221-17/+37
| | | | | | | Describe clazy levels, improve layouts. Change-Id: I4895682ea7d10ea910c2d53725073c9c870bb306 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: add clang plugins checks to code model settingsIvan Donchevskii2017-11-161-0/+71
| | | | | | | | | | | Add UI controls to change settings and apply them together with warnings and command line options. Current settings are not very flexible but should be easy to test and use without reading tidy/clazy help. Change-Id: I1ca6b49a42a1169b34a703dd50de0bbc105df28f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Allow interpreting ambiguous headers as C headersNikolai Kosjar2017-01-161-28/+26
| | | | | | | | | | | | | | ...instead of C++ headers. For the Clang Code Model this results in using "-x c-header" instead of "-x c++-header". This introduces a new option in Options > C++ > "Code Model" to configure this. Change-Id: I8a0ce8fa6155f5ef58743ebc7f1d0b500fbf6599 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Core: Make IOptionsPage::categoryIcon a Utils::IconAlessandro Portale2016-09-201-1/+1
| | | | | | | This is necessary for themable + HighDPI icons in the options dialog. Change-Id: I8e3ff87a24591af40bb76b39cd970443d7678fae Reviewed-by: hjk <hjk@qt.io>
* CppTools: Add UI for file size limit of indexerNikolai Kosjar2016-08-311-0/+27
| | | | | | | Task-number: QTCREATORBUG-16712 Change-Id: I92db8cbcac9669cbd5e4ee5f7ef6f613797c753a Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Clang: Clarify when clang code model is enabledNikolai Kosjar2016-07-191-1/+2
| | | | | | Change-Id: I07cf53641ea4f9ddb7ca7a67977b1ad7d43c5bad Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Introduce warning configuration per projectNikolai Kosjar2016-03-011-1/+2
| | | | | | Change-Id: I5b9a330274e6f72b0786259eb25aa454877d4eef Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* Clang: Introduce switching/adding of warning configurationsNikolai Kosjar2016-03-011-13/+19
| | | | | | | | | | | | | | A warning configuration is a list of command line (warning) options for libclang. Three non-editable built-in configurations are provided by default. The user can copy a configuration to customize it. This is still a global setting and it changes take effect after re-opening a document. Both issues will be addressed in follow-up changes. Change-Id: I86667d7dc39ad31b88666454220e6da563797740 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Clang: Activate code model automatically if plugin is loadedNikolai Kosjar2015-12-161-14/+3
| | | | | | | This removes also the need to close editor documents. Change-Id: I96c68105bceb37841053f3dbd8a264e059a02cb8 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* CppTools: Clean up CppCodeModelSettingsWidgetNikolai Kosjar2015-11-161-11/+26
| | | | | Change-Id: Iee93d2d656a8a5c991b292d3e591cedd3e86f9e3 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* Clang: Remove per-mimetype settingsNikolai Kosjar2015-11-161-23/+19
| | | | | | | | | | Related to commit c47079f97f7d42db0c581525a2ce6fddbc0995f2 Clang: Activate the code model with a check box Change-Id: Ief11768ba0dd27788032e2dd3ad9b7ae39a8f52b Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* Clang: Allow to provide extra command line optionsNikolai Kosjar2015-11-111-4/+16
| | | | | | | | | | | This can be used to experiment with clang options that e.g. affect diagnostics. Changes take effect on editor re-open. Change-Id: Ie46d0ff085a3700a748dbcf4b94b93b0bf9c4642 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Clang: Activate the code model with a check boxNikolai Kosjar2015-11-111-35/+34
| | | | | | | | | | | If the plugin is not activated, show a hint. The underlying settings are still mime type based. This will be addressed in a follow-up change. Change-Id: I24b232365d505a0022a78e96eb496d219a8b7c5b Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Clang: Use completion through backend processNikolai Kosjar2015-06-101-5/+5
| | | | | | | | | | | | | | | | This makes us independent of libclang crashes for completion. Re-parsing for highlighting still happens in the Qt Creator process. Run in verbose mode: qtc.clangcodemodel.ipc=true Run tests: -test "ClangCodeModel" Task-number: QTCREATORBUG-14108 Task-number: QTCREATORBUG-12819 Change-Id: Id3e95bd2afdb6508bbd1d35fddc69534a909b905 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Reinvent deprecated qSort as Utils::sortNikita Baryshnikov2014-06-191-1/+2
| | | | | | | Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | C++: add header chooser to codemodel settings page.Erik Verbruggen2014-01-071-2/+5
| | | | | | | | | | Change-Id: I2da9c4b382afcad2faad1817af266381a2f02b2a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | Add experimental clang code-model plug-in.Erik Verbruggen2013-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously known as the wip/clang branch. Contributors (in alphabetical order): - Christian Kamm <christian.d.kamm@nokia.com> - Erik Verbruggen <erik.verbruggen@digia.com> - Leandro Melo <leandro.melo@nokia.com> - Peter Kuemmel <syntheticpp@gmx.net> - Sergey Shambir <sergey.shambir.auto@gmail.com> Change-Id: I4c3ff600a19b6732641c1d5ef28236bf2cc17737 Reviewed-by: hjk <hjk121@nokiamail.com>
* | Preferences: Add default implementation for filteringEike Ziller2013-12-101-24/+7
|/ | | | | | | | | | | | | The default "matches" method now takes the widget and looks for all child labels, checkboxes, push buttons and group boxes. Because of that, the former "createWidget" method can be called multiple times without creating a new widget (-->widget()), and the "finished" method must ensure that the created widget gets deleted, since not all widgets that were created are added to the UI anymore. Change-Id: Ia231c7c78dd8819146668e6447d36d22e7836904 Reviewed-by: Eike Ziller <eike.ziller@digia.com>