aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck/cppchecktextmark.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Avoid including multiple Tr classesEike Ziller2025-09-261-3/+2
| | | | | | | | | | | | | | | | | | | | lupdate has issues finding the right translation context if there are both Tr::tr calls that should be resolved via a `namespace <name> {` scope, and another `using namespace <other>` with a namespace that has another Tr class. Many of the cases of this that we have were editor display names that were defined in the Core plugin for reasons unknown, and which would better be defined in the corresponding plugin anyway. For the other cases do not use Tr::tr from a different plugin, but instead introduce "msg<Something>" functions that do the Tr call plugin- internally. That is the "correct" way to do it anyway, since shared strings should be changeable centrally. Task-number: QTBUG-140548 Change-Id: Idacf62b400f50789b5e5957b690e16aa1ebe5a56 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppCheck: Fix truncating tooltip at '<' characterAndre Hartmann2025-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The following program: ``` static int array[3] = {1, 2, 3}; int test(int index) { return (index <= 3) ? array[index] : 0; } ``` gave the following CppCheck line annotation: ``` main.c:5: Either the condition 'index<=3' is redundant or the array 'array[3]' is accessed at index 3, which is out of bounds. ``` but in the tooltip it was truncated to: ``` main.c:5: Either the condition 'index ``` Change-Id: If9baf949e97e3e26efecf33246d15ecd3ebbd4b2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Cache theme icon accesshjk2023-09-011-1/+1
| | | | | | | | These trigger over 120k file exist check on my machine on startup, just for a handful icons. Change-Id: Ic73f0783142ed329c2f8c8b852f622e69fc306da Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: Tr::trhjk2023-01-181-1/+3
| | | | | | Change-Id: I28aa68e25c53c3a4d1c370074d7b3318944dc45a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Editor: Allow to hide annotations for a group of text marksDavid Schulz2023-01-121-5/+8
| | | | | | | | | The hiding is not persistent, so on the next Qt Creator start all annotations are visible again. This is meant to quickly get rid of annotations if there are to many irrelevant of a specific kind. Change-Id: I4862e56e0f5624f30aadda26efc9dea672ab1f57 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppCheck: Tr::tr and code cosmeticshjk2023-01-101-15/+14
| | | | | 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>
* 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>
* Merge remote-tracking branch 'origin/8.0'hjk2022-08-051-12/+13
|\ | | | | | | Change-Id: Icbb87ac8bcee5fb86042d3863a973573510651b4
| * TextMark: Delay context menu tooltip action creationhjk2022-08-041-12/+13
| | | | | | | | | | Change-Id: I25bad9a774a6d95162251c8f0512eb3f8439d9ae Reviewed-by: David Schulz <david.schulz@qt.io>
* | Use setClipboardAndSelection more broadlyhjk2022-07-151-3/+2
|/ | | | | | | | Basically everywhere besides the EmacsKeys plugin. Change-Id: Iaf2a0a5d791b5b3dd6df2c05c1b862516630d3f8 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Fix lupdate issuesEike Ziller2022-06-271-1/+1
| | | | | | | Change-Id: I7256c8aff5eb77b264b76ba24e79c26ab2924e84 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CppCheck: Add copy to clipboard action to tooltipAndre Hartmann2022-02-221-0/+16
| | | | | | | Fixes: QTCREATORBUG-27092 Change-Id: Ie5b504b0b23c54fd72d56df8ff72971864475ee8 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* TextEditor: Let TextMark subclasses provide a settings pageChristian Kandeler2021-01-201-0/+1
| | | | | | Task-number: QTCREATORBUG-25150 Change-Id: Id5bbdcf2db7afacb823140d77ebd5bc141ac7f81 Reviewed-by: David Schulz <david.schulz@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>
* Cppcheck: Reduce uses of autoOrgad Shaneh2018-09-261-1/+1
| | | | | | | Conform to coding rules. Change-Id: I57600bd450665d5db87710bb2444e39e7ecbf3e3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Cppcheck: Add cppcheck static analysis toolSergey Morozov2018-09-181-0/+96
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>