aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck/cppcheckplugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix lupdate issuesEike Ziller2025-09-291-1/+1
| | | | | | | | | | Almost all of them result from a namespace bug in lupdate, fixed by avoiding function return types with namespace and avoiding tr() after member variable declarations with namespaced types in class definitions. Task-number: QTBUG-140636 Change-Id: I406fba710d005cd455588185b971567bbe1b8f57 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Add convenience accessors to some classesChristian Kandeler2025-01-231-3/+3
| | | | | | | | | | | | Namely, Kit, BuildConfiguration, BuildSystem and RunConfiguration get functions to retrieve the active instance for a given project as well as the one for the current and active projects, respectively. This saves a ton of annoying null pointer checks. Some of these functions replace existing ones with the same purpose that were scattered around the code base. Change-Id: I18247061229bbeb8b8ad1e15a2bd7a6626438bc0 Reviewed-by: hjk <hjk@qt.io>
* Debugger: Merge analyzerconstants.h into debuggerconstants.hhjk2024-12-201-1/+1
| | | | | Change-Id: Id092c8d0bedad987e963b36b0e9b46e7182209a2 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ProjectExplorer: Dissolve kitaspects.{h,cpp}Christian Kandeler2024-11-201-1/+1
| | | | | | | Move the remaining classes into their own files. Change-Id: I301e72004c21446fa9b8f15942bb042218b0ecef Reviewed-by: hjk <hjk@qt.io>
* Cppcheck: Treat manual run settings as project settingsChristian Stenger2024-07-021-2/+55
| | | | | | | | | Instead of always deriving from global settings store the settings for the manual run into the project settings. Fixes: QTCREATORBUG-31092 Change-Id: I7854cff4e71b58225c7e9c1198c4e60128ed07e4 Reviewed-by: hjk <hjk@qt.io>
* Cppcheck: Fix handling of settingsChristian Stenger2024-06-141-5/+3
| | | | | | | | | | We need to distinguish between the global settings and the settings used for a manual analyzer run. Fixes: QTCREATORBUG-28951 Fixes: QTCREATORBUG-30615 Change-Id: Ic2dabd14e4d06d77bebcedd9e653f54a4d179c82 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* CppCheck: Use ActionBuilderhjk2024-02-011-14/+9
| | | | | | Change-Id: I385427232891826641760f463da26de3777387b6 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppCheck: Hide plugin class definition in .cpphjk2024-01-121-28/+34
| | | | | Change-Id: I960ec6e0e4d63cf0edf7af55d191ba666f44739b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ProjectExplorer: Some more ToolChain->Toolchain renamingshjk2023-12-121-1/+1
| | | | | Change-Id: I5cb2adf544a846f45f7fe7ce60f67b10ad100d91 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Rename Tool{C,c}hainKitAspecthjk2023-11-271-1/+1
| | | | | | Change-Id: I74460b6402ab00f972c208023f03fac617982a11 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}hjk2023-08-151-1/+1
| | | | | Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Various Plugins: Add context object into connectionsJarek Kobus2023-08-021-1/+1
| | | | | | Change-Id: I360677bebfef16a3233b3b8177cff6da57ec7c31 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CppCheck: Move widget creation for manual run closer to its usehjk2023-07-191-3/+1
| | | | | Change-Id: I08d50f5e4534b8a58d374ae37bfd03dbd234a483 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppCheck: Rename options to settingshjk2023-07-181-1/+1
| | | | | | | That's the by far more common name nowadays. Change-Id: Iae987221f9fa2e955fdee21496f895d25d44be4e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppCheck: Use new settings patternhjk2023-07-181-5/+5
| | | | | Change-Id: Ia2de8e684690ab7bfbdcf7ba417df1f2174433de Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppCheck: Move to simpler setLayouter callshjk2023-05-311-2/+2
| | | | | Change-Id: Id0e9f1adfe730f6067ade9472db597e3a12fc2e3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppCheck: Rework settings handlinghjk2023-05-161-6/+17
| | | | | Change-Id: Id9c9b316c5e0d39bc5fcba14951664e72d947a71 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ProjectExplorer: Move some not-fully-session related bitshjk2023-03-011-5/+6
| | | | | | | | | | | | | | | ... out of SessionManager. The idea is to later move SessionManager into the Core plugin, which both is sensible conceptually and also prerequisite to merge the Bookmark plugin into TextEditor plugin. Currently, only the interface is split, as the load/save implemetations are non-mechanical to disentangle. Change-Id: I31631db3094ea192825a2ccaa6add6188662940b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Use simpler Plugin::initialize() when feasiblehjk2023-01-201-6/+1
| | | | | Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppCheck: Tr::tr and code cosmeticshjk2023-01-101-19/+16
| | | | | Change-Id: I5e6583984f7dc94e998df3c20840f2ba2e801ab8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* 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>
* Fix lupdate issuesEike Ziller2022-10-141-1/+2
| | | | | | | | | | - missing Q_DECLARE_TR_FUNCTIONS - some full qualifications needed for confused lupdate - avoid breaking some translations from former TaskListPlugin, VcsCommand and highlighter settings refactoring Change-Id: Ia3b34095512a7bad6903f0aff6095313ee39e3e4 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>
* Code cosmeticshjk2022-06-241-3/+4
| | | | | | | | | | Mostly unused #include's, also sort them or reduce scope. A few namespaces, ... Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-1/+1
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-191-5/+4
|\ | | | | | | | | | | | | Conflicts: src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp Change-Id: I2a0ccb84560174c5170d5baaff526c0e095f0ba0
| * Fix lupdate issuesEike Ziller2020-03-181-5/+4
| | | | | | | | | | Change-Id: I26f08ae82354c178f6d26f9138796328b50bfba8 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-02-271-1/+1
|\| | | | | | | Change-Id: I4523ea36332772a310fd462df55683c93c61bb18
| * ProjectExplorer: Disentangle ProjectExplorer::updateRunActionshjk2020-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enforces a linear pass through [static] ProjectExplorerPlugin::updateRunActions ProjectExplorerPluginPrivate::doUpdateRunAction [emit] ProjectExplorerPluginPrivate::runActionsUpdated instead of the previous direct emission of the signal from user code and connecting also the internal update to it. This is meant to simplify reasoning about execution order and maybe to help elimimating double executation. Change-Id: Id8cc41a46d9dec06afb5514855f2ae80560f3695 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChainhjk2020-02-191-1/+1
|/ | | | | | | | | Special accessors to the repeatedly used C and C++ cases to denoise and slim down user code. Plus some code cosmetics nearby. Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Cppcheck: Add ability to manually run cppcheckSergey Morozov2019-12-041-4/+124
| | | | | | | | | Run cppcheck on selected files from current project via "Analyze"->"Cppcheck...." Show results in a separate view in the same manner as ClangTools plugin. Fixes: QTCREATORBUG-21673 Change-Id: Ibcaf4057a387a990f1da59025f15ba58f996953f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Avoid warning on empty expressionshjk2019-07-231-2/+2
| | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Cppcheck: Add cppcheck static analysis toolSergey Morozov2018-09-181-0/+67
Automatically checks currently opened documents and displays results via text marks/annotations. CppcheckTrigger detects when to check files or clear results. CppcheckTextMarkManager stores/clears text marks with checks' results. CppcheckTool generates run arguments and parses output. CppcheckRunner runs cppcheck binary. CppcheckOptions configures CppcheckTool. Task-number: QTCREATORBUG-20418 Change-Id: I8eafeac7af6137d2c9061ae75d4a56c85b3b5a2d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>