summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-384/+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>
* Add missing "final" to unexported/unshared classesAlessandro Portale2020-11-181-2/+2
| | | | | Change-Id: I84d5fc39d7ef5588a20545854d0cfd0b993db090 Reviewed-by: hjk <hjk@qt.io>
* Utils: Drop Utils::SkipEmptyParts againhjk2020-07-211-1/+1
| | | | | | | | We require Qt 5.14 nowadays. Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-4/+4
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* All: Use Utils::SkipEmptyPartshjk2020-06-171-1/+2
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Fix UI text according to the guidelinesLeena Miettinen2020-03-161-1/+1
| | | | | | | | https://doc.qt.io/qtcreator-extending/qtcreator-ui-text.html Task-number: QTCREATORBUG-23683 Change-Id: I35a1782f62514dfb6ea7e1e3cf334c8a5615fd74 Reviewed-by: David Schulz <david.schulz@qt.io>
* Use less nullptr for empty flagshjk2020-01-211-1/+1
| | | | | Change-Id: Ic4eafdc8f204a432a752a97593380609a408a7de Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ClangTools: Use Utils::InfoLabel in ClangDiagnosticConfigsWidgetAlessandro Portale2020-01-031-15/+8
| | | | | | Task-number: QTCREATORBUG-23346 Change-Id: I39016adae451c5212643e412d5700b89915cb2e4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* ClangTools: Query the tools for supported checksNikolai Kosjar2019-12-031-773/+16
| | | | | | | | | | | | | | | | ...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-95/+155
| | | | | | | | | | | | | * 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: Improve tab namesNikolai Kosjar2019-11-291-3/+3
| | | | | Change-Id: I24f963cfdf6c7a10fcaef96cf622c156b421d2b4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Clang/ClangTools: Separate custom diagnostic configsNikolai Kosjar2019-10-011-10/+12
| | | | | | | | | | | | | | | | | | 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>
* More Utils::toSet/toListhjk2019-07-041-2/+2
| | | | | | | ... and unrelated cosmetic changes. Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-1/+1
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-141-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/debugger/debuggerkitinformation.cpp src/plugins/languageclient/languageclientmanager.cpp src/plugins/plugins.pro src/plugins/projectexplorer/kit.cpp src/plugins/projectexplorer/kitmanager.cpp Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
| * Clang: Fix pluralsRobert Loehning2019-03-051-5/+5
| | | | | | | | | | | | Change-Id: I150b9ccdec73ade8826b90036b59332687b84448 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Replace static_casts by QOverload where possiblehjk2019-02-261-2/+2
|/ | | | | | | | | Mainly to get rid of the QProcess::finished deprecation warning. Also adjust coding style in the surrounding connects when needed. Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: ModernizeNikolai Kosjar2019-02-081-5/+7
| | | | | Change-Id: I78af9cd4ccddfa4ed744dce96b772ae5644c89d2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Clang: Add tooltip action to remove specific warnings/checksNikolai Kosjar2019-02-051-27/+0
| | | | | | | | | | | ...from the diagnostic configuration. If no custom diagnostic configuration is set in Projects Mode > Clang, one is created and set for the current project. Otherwise the current custom diagnostic set in the project settings is modified. Change-Id: I5c48280c90f0e807e7333122d504dda302a8b0a9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Allow to forward warnings flags from build systemNikolai Kosjar2019-02-051-12/+28
| | | | | | Change-Id: I47ebb1ce4f3b5544408eb1d0f891ed5090394282 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Remove some pointless "this" captureNikolai Kosjar2019-02-051-1/+1
| | | | | Change-Id: I8ac56d0ec34128aa33263f171483c36dae608d01 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Make some functions available for reuseNikolai Kosjar2019-02-011-17/+3
| | | | | Change-Id: I7b85ea104a852c1168578949247efb8387a95f30 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix return typeNikolai Kosjar2019-01-251-1/+1
| | | | | Change-Id: I6d97968c2aebe74c84cbd6cb56dfbbc743b0753d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: Make clazy UI more fine-grainedNikolai Kosjar2019-01-241-105/+499
| | | | | | | | | | | ...so that specific checks can be enabled/disabled. This replaces the level radio buttons in Tools > Options > C++ > Code Model > "Manage..." > Tab: Clazy. Task-number: QTCREATORBUG-21120 Change-Id: If468d79d3c309b287b4105d83ac31f0b1489c71c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Add default configurations with Clang-Tidy checksIvan Donchevskii2018-06-201-3/+26
| | | | | | | | | | | | | | | The first configuration contains most of checks which make sense for most of generic projects. The second configuration is extremely slow but plays the role of Clang static analyzer. For the sake of viewing these checks Clang-Tidy checks tree is modified to be expandable in read-only mode. Change-Id: I41c4ee26bcdf05384507427b842d61e255d59bf7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Clang: Add links to web pages in Clang-Tidy configurationIvan Donchevskii2018-05-311-9/+59
| | | | | | | | Each Clang-Tidy check get the separate link except clang-analyzer which has only a whole group page. Change-Id: I0b63cce8475109812280d9d44ac2d36aaa66e03b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Use the tree instead of the list for Clang-Tidy settingsIvan Donchevskii2018-05-251-48/+185
| | | | | | | | | | | | | | | | | List of checks does not give enough flexibility to select/unselect specific checks. The tree fixes that. Also remove Clang-Tidy checks line edit because it is now integrated into the tree mode as an alternative way of providing checks by pressing "Plain text edit" button. 'cpptools_clangtidychecks.h' is generated using python script 'generateClangTidyChecks.py' and clang-tidy from our LLVM/Clang 6.0 build. Change-Id: I2ed1738cb2cbbf8dac6aba563469f06f69b11593 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* ClangTools: Preselect current diagnostic configNikolai Kosjar2018-05-231-2/+3
| | | | | | | | | ...in ClangDiagnosticConfigsWidget when clicking on the "Manage..." button. This allows to inspect the current diagnostic configuration without further interaction steps. Change-Id: I732445b33f4f194c9b9b60e184d970420ab55ec8 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools: Merge diagnostic selection widgets togetherIvan Donchevskii2018-05-141-36/+4
| | | | | | | | | 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: Change QComboBox in diagnostic settings to QListWidgetIvan Donchevskii2018-05-141-10/+6
| | | | | | | | ComboBox gives an impression of selecting one of the entries which is not the case for this widget. Change-Id: I83f94def7553d4ceaec5ba957765f4494dc3d610 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Split diagnostic settings and selectionIvan Donchevskii2018-05-141-46/+69
| | | | | | | | | | 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>
* Clang: Fix initial tidy settings tabIvan Donchevskii2018-03-271-0/+1
| | | | | | | When no settings exist it has to be disabled. Change-Id: I1cb8368edf182fa616930f5718323c8e03a0e649 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Add combobox with tidy configuration optionsIvan Donchevskii2018-03-191-9/+60
| | | | | | | | | The old way was not flexible enough. With these options it's possible to just use your config file or set tidy command line yourself. Change-Id: I1bace40986668dee5e1b30c9d03090a3fd22e253 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* CppTools: Disable text edit for built-in clang configsNikolai Kosjar2018-02-141-1/+1
| | | | | | | | Otherwise it looks like the options can be customized without copying the configuration. Change-Id: I7df26f8f2e3f566f659d12258730d2f514e9d71b Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools: Provide hint to copy clang diagnostic configNikolai Kosjar2018-02-141-8/+13
| | | | | | | | | If a built-in/read-only configuration is selected, show a hint that it needs to be copied to make customizations. Change-Id: I62fc51b7548ec7cd6a156a0be84d9dcb41849ee7 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools: Use radio buttons for clazy optionsNikolai Kosjar2018-02-081-32/+49
| | | | | | Change-Id: I7c307cffce58c8dc4fd00d17b5c477c85ba509d8 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools: Improve clang diagnostic configuration UINikolai Kosjar2018-02-081-14/+25
| | | | | | | | | | | | | | | ...by clarifying the widget hierarchy. Ensure that the combo box at the top is perceived as the main widget: * Remove the "Configuration to use:" label so the combo box gets more horizontal space and thus dominance. Also, rename the group box header/label from "Clang Diagnostic Warnigns" to "Clang Diagnostic Configuration". * Move the command line text edit below the combo box into its own tab page to clarify the relation to the tidy/clazy tabs. Change-Id: I97a0785678e33b94746046d07a911422b1469890 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Make clazy/tidy options part of the diagnostic configNikolai Kosjar2018-01-291-6/+120
| | | | | | | | 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: Validate warnings options from userNikolai Kosjar2017-09-191-7/+80
| | | | | | | | | | | | | | | | | | | | | ...in "Menu: Tools > C++ > Tab: Code Model > Clang Code Model Warnings" to avoid (re)parse issues due an invalid command line for libclang. If an invalid option is detected, then indicate it by providing an error message. As long as there is an invalid option, the options are not accepted. We do not want to maintain a white list of valid options, so mostly check whether the option starts with "-W". An unknown or misspelled option like "-WnotYetKnown" will be ignored by libclang. To keep passing in some options for testing/debugging convenient, skip validation if QTC_CLANG_NO_DIAGNOSTIC_CHECK is set. Task-number: QTCREATORBUG-18864 Change-Id: I196d0474c7521969c54133f52dfc7be0394bfc3e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: turn off delayed template parsingIvan Donchevskii2017-06-081-18/+4
| | | | | | | | | Fix templates highlight and completion on Windows Add UI to turn on/off delayed parsing (off by default) Task-number: QTCREATORBUG-17222 Change-Id: I0cd5e0bcfff2789cd938e4096829f777ff15957a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Fix updating warning config widgets on removeNikolai Kosjar2016-04-151-2/+4
| | | | | | | | | | | | Problematic use case was: 1. Go to projects mode, select "Clang Code Model" 2. Click "Copy...", click "OK" and add e.g. " -Wbla" 3. Click "Remove" ==> The configuration is reset (combobox), but the warning options are not (" -Wbla" is still there). Change-Id: Ifc445a3fa0e3b3191915cf7bca220f4bef848069 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* Clang: Introduce warning configuration per projectNikolai Kosjar2016-03-011-20/+80
| | | | | | 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-0/+196
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>