Commit Graph

1636 Commits

Author SHA1 Message Date
Sebastian c990d10ffa
Check for JSON error when parsing addon .json files + fixes (#2374)
* cppcheck.cpp: Check for JSON error when parsing addon .json files

This fixes that errors in JSON files given via `--addon=*.json` are
silently ignored and maybe only a part of the JSON file is used.
Now the error message which picojson can return is checked and a
corresponding error message is returned again by getAddonInfo().

* naming.json: Fix missing comma

* CLI: Fix naming violations detected by addon naming.py via naming.json

* Addon naming: Add argument for validating names of constants

* LIB: Rename functions/variables so they are valid, loosen naming rules

* GUI: Fix naming violations
2019-11-20 15:37:09 +01:00
versat feeb27f3c9 gui/checkthread.cpp: Fix warning "empty expression has no effect"
The trailing semicolons are redundant. "switch(){}" does not need one
and "Q_UNUSED()" already includes one.
2019-11-20 08:37:46 +01:00
Sebastian f9d5aec758
GUI: projectfiledialog.ui: Add note about addons requiring Python (#2364)
This fixes https://trac.cppcheck.net/ticket/9456 (Tell the user that the
addons require Python) regarding the GUI. Whether it is useful/necessary
to add something similar for the CLI must still be checked.
2019-11-15 21:36:25 +01:00
Daniel Marjamäki 81fff2edf1 Fixed #9464 (Import compile database; only check given configuration) 2019-11-09 17:51:42 +01:00
Georgy Komarov a2b101afd5 gui: update Russian translation (#2304)
* gui: update Russian translations

* gui: fix translation

* correct defines/undefunes
2019-10-29 20:03:47 +01:00
gityash01 5426138786 Update application.cpp (#2279) 2019-10-17 17:53:30 +02:00
Paul Fultz II ad8abdb0c3 Add impossible values to ValueFlow (#2186)
* Add impossible category

* Replace values

* Try to adjust known values

* Add ! for impossible values

* Add impossible with possible values

* Remove contradictions

* Add values when the branch is not dead

* Only copy possible values

* Dont bail on while loops

* Load std lib in valueflow

* Check for function calls

* Fix stl errors

* Fix incorrect impossible check

* Fix heap-after-use error

* Remove impossible values when they are lowered

* Show the bound and remove overlaps

* Infer conditions

* Dont push pointer values through dynamic_cast

* Add test for dynamic_cast issue

* Add shifttoomanybits test

* Add test for div by zero

* Add a test for issue 9315

* Dont make impossible value inconclusive

* Fix FP with shift operator

* Improve handleKnownValuesInLoop for impossible values

* Fix cppcheck warning

* Fix impossible values for ctu

* Bailout for streams

* Check equality conditions

* Fix overflows

* Add regression test for 9332

* Remove duplicate conditions

* Skip impossible values for invalid value

* Check for null

* Rename bound to range

* Formatting
2019-09-20 15:06:37 +02:00
warmsocks a56bc006b7 Fixed a typo in lib/checkother.cpp. Corrected spelling errors found by codespell. (#2170) 2019-09-11 19:21:38 +02:00
fu7mu4 bcc9f81a6e cppcheck_ja.ts is updated (#2140) 2019-09-02 18:57:50 +02:00
PKEuS ee856ca3bb Updated german translation 2019-09-01 13:37:08 +02:00
Daniel Marjamäki c32261c737 Updated copyright year 2019-09-01 11:49:43 +02:00
Daniel Marjamäki a3845b6180 GUI: Updated translations 2019-09-01 11:47:52 +02:00
Daniel Marjamäki 22d7ca648d GUI: Remove the 'Safe Checks' tab in project settings. We need to tweak these checks and settings further. 2019-08-25 18:53:01 +02:00
Daniel Marjamäki cb119f5910 Fixed #8977 (GUI : Inspecting Cppcheck results) 2019-08-23 21:27:32 +02:00
Daniel Marjamäki c7b452c4f6 GUI: keep hidden results 2019-08-22 21:32:18 +02:00
Daniel Marjamäki d661ab09ce GUI: Fixed suppressions when reanalyzing files 2019-08-19 12:59:44 +02:00
Daniel Marjamäki 5d021cb41d GUI: Revert my theme changes. The theme selection will only be for the code editor again. 2019-08-18 21:11:46 +02:00
Daniel Marjamäki 2d9a131817 Refactoring: Rename variables. Do not use leading _. Renamed 'col' to 'column' 2019-08-18 12:19:05 +02:00
Daniel Marjamäki a17f2a6f05 Compiling/Installing : The CFGDIR parameter was removed. Use FILESDIR instead. 2019-08-17 10:53:07 +02:00
Daniel Marjamäki 831f2009f5 GUI: Set current dir when starting the GUI so results are shown properly 2019-08-14 10:23:36 +02:00
Daniel Marjamäki db57769c64 Try to make Travis happy 2019-08-11 17:57:59 +02:00
Daniel Marjamäki 6c55d27f19 Fixed #9240 (GUI: Issue with file names in suppressions (undesired expansion to full path)) 2019-08-11 15:53:23 +02:00
Daniel Marjamäki 0fbbe2ff23 Refactor load/write of cppcheck project. Reuse same string constants in cli and gui. 2019-08-09 21:15:02 +02:00
Daniel Marjamäki 16dc8a0540 GUI: Suppressing addon warnings 2019-08-09 19:00:09 +02:00
Daniel Marjamäki 6b662c7353 Fixed #8777 (GUI: Wrong platform used and shown in "Analysis Log") 2019-07-29 11:22:57 +02:00
Scott Furry 88e2e82039 Correct Signal/Slot signatures (#2035)
Previous commit had updated declarations in Code Editor Style Dialog to use
const QColor& and const QFont::Weight& variables. This change was not totally
complete as const usage was not propagated to Signal/Slot connect statements.

This commit corrects that oversight.
2019-07-25 08:29:42 +02:00
Daniel Marjamäki 37a345c7d0 Fixed constParameter warnings 2019-07-24 08:30:36 +02:00
Daniel Marjamäki 3ec45acc43 astyle formatting
[ci skip]
2019-07-24 08:22:12 +02:00
Daniel Marjamäki 46686c6c20 GUI: Fix test-projectfile testing 2019-07-23 18:09:00 +02:00
Daniel Marjamäki 681bd0a911 GUI: Better settings for extended safe checks 2019-07-23 11:54:38 +02:00
Daniel Marjamäki 8f9912d245 gui.pro: added -Wno-deprecated-declarations 2019-07-23 10:35:20 +02:00
Daniel Marjamäki dab0845ef1 Travis: Revert width=>horizontalAdvance change to fix CI 2019-07-23 10:28:45 +02:00
Daniel Marjamäki 896d953aa3 GUI: Fix a few Wdeprecated warnings 2019-07-22 22:40:11 +02:00
Daniel Marjamäki 70e0c66c35 GUI: Use theme in whole program 2019-07-22 15:55:51 +02:00
Daniel Marjamäki 82c6a72b48 Rename variable pDlg to dlg 2019-07-22 12:50:42 +02:00
Daniel Marjamäki 40600cbc38 GUI: Fixed build directory, use project file path by default 2019-07-17 16:01:54 +02:00
Daniel Marjamäki 97838f104c Fixed #8517 (GUI: Can't copy filename with right click) 2019-07-15 12:58:25 +02:00
fu7mu4 8e4f0c2d89 Update japanese translation (#1997)
* add MATCHCOMPILER=yes flag into readme in Japanese

* remove Donations from readmeja.md

* add cmake instructions in Japanese

* minor improvement in Japanese

* add Japanese translation on gui/cppcheck_ja.ts
2019-07-15 08:47:11 +02:00
Daniel Marjamäki 4854f0034d Fix Cppcheck warning 2019-07-14 22:55:35 +02:00
Wolfgang Stöggl 1c32455ae1 Fix some typos (#1983) 2019-07-12 17:55:44 +02:00
Daniel Marjamäki 68a48daf1f Fix Cppcheck warning 2019-07-12 08:27:10 +02:00
Daniel Marjamäki 4a70208e0e GUI: Activate 'human knowledge' options 2019-07-11 21:05:52 +02:00
Daniel Marjamäki 8eaa50c050 GUI: Tweak the 'Human knowledge' tab 2019-07-11 14:00:46 +02:00
Daniel Marjamäki e0f258db0c GUI: Start adding some 'human knowledge' configuration options 2019-07-11 10:27:18 +02:00
Scott Furry da213d1534 More Zero/Null as pointer constant corrections (#1947)
Further to pull request #1938. Changes were missed in previous commit.

Resolve warnings `warning: zero as null pointer constant` in code by
using C++ 11 recommended `nullptr`.
2019-07-02 20:37:44 +02:00
Scott Furry e459762bcd Suppress Code semantic and syntax warnings (#1936)
Sources were built with Clang but with increased verbosity of error detection.

A number of syntax and semantic warnings were encountered. Commit adds
changes to correct these warnings.

Some changes involve removing extra, and unncessary, semi-colons at EOL
(e.g. at end of switch clause).

Project astyle settings are not currently setup to detect if a file is to
have an extra carriage return after the last line of data. Two files were
altered to ensure an extra carriage return.

An advisory to enhance code was encountered in triage code. Clang advisory
on a for-loop interation value suggested that:
`use reference type 'const QString &' to prevent copying`
2019-06-30 21:43:25 +02:00
Scott Furry a195477470 Correct Zero/Null as pointer constant (#1938)
Building with enhanced clang warnings indicated a large number of
instances with the warning:

`warning: zero as null pointer constant`

Recommended practice in C++11 is to use `nullptr` as value for
a NULL or empty pointer value. All instances where this warning
was encountered were corrected in this commit.

Where warning was encountered in dependency code (i.e. external library)
no chnages were made. Patching will be offered upstream.
2019-06-30 21:39:22 +02:00
PKEuS 21f4574e74 lupdate and lrelease
Updated german translation
2019-06-29 09:50:53 +02:00
Daniel Marjamäki 84cc09d17c Update Copyright 2019-06-29 07:49:14 +02:00
Daniel Marjamäki d8daca30bf lupdate gui.pro 2019-06-29 07:47:36 +02:00
Daniel Marjamäki 0ab3d07f75 Revert "GUI: Show information label if Cppcheck is outdated"
I plan to add something like this again after the release.
2019-06-28 22:36:19 +02:00
Daniel Marjamäki 5f759e89b3 GUI: Show information label if Cppcheck is outdated 2019-06-28 20:13:59 +02:00
Scott Furry 6d3d44835a Add keyboard shortcuts for CodeEditor Widget (#1931)
Functionality for `copy` and `select all` text already exists as part
of widget construction. Commit adds connection of those existing
functions to execution with keyboard shortcuts user would normally expect.
(e.g. CTRL+C for copy text)

Qt does translation of keyboard shortcuts for platform
(i.e. Mac OS uses command key rather than control).
2019-06-28 17:17:24 +02:00
Scott Furry 158194d923 Propagate Monospaced Font to Line Number Area in Code Editor (#1923)
Styling change missed in #1913.
2019-06-25 20:22:02 +02:00
versat b1e2b9d61b astyle formatting
[ci skip]
2019-06-25 15:29:15 +02:00
Daniel Marjamäki b0e56f873f GUI: Use --cli option when running addons to get results in json format 2019-06-25 01:22:50 +02:00
Scott Furry 0d76d078e2 Implement User Selectable Code Editor Style in cppcheck-gui (#1913)
Building on #1874, commit adds user controls to choose
or edit style in cppcheck-gui ONLY. Commit does not
address CodeEditor style usage in triage app at this time.

Code Editor style can be altered from the added "Code Editor"
tab in the user preferences. The user has the option to select
default light, default dark, or to customize.

If user leaves the style set to light or dark defaults, this
will be reflected in the choices shown in the preferences
dialog.

User choice for Code Editor Style is saved in the cppcheck-gui
preferences under the heading "EditorStyle".
2019-06-23 19:04:53 +02:00
Daniel Marjamäki 0947a36c4f astyle formatting
[ci skip]
2019-06-08 07:24:38 +02:00
Scott Furry 32f45490e2 CodeEditor Widget Styling (#1874)
* CodeEditor Widget Styling

With profileration of Qt5 styling methods, problems with presentation
can occur when using cppcheck-gui and user choosen themes. With a dark
theme, a highlighted line in the CodeEditor appears with white text on
a light background or dark colors on a dark background.

Commit makes changes to enforce a default style on the Code Editor widget.
Mechanism is provided, if desired, where a user defined styling can
be provided to CodeEditor widget.

* CodeEditor Widget Styling

With profileration of Qt5 styling methods, problems with presentation
can occur when using cppcheck-gui and user choosen themes. With a dark
theme, a highlighted line in the CodeEditor appears with white text on
a light background or dark colors on a dark background.

Commit makes changes to enforce a default style on the Code Editor widget.
Mechanism is provided, if desired, where a user defined styling can
be provided to CodeEditor widget.

2nd commit - remove declarations in gui/codeeditorstyle.h to possibly
resolve appveyor window builds.
2019-06-08 07:23:48 +02:00
Scott Furry a5c1884810 Minor changes to gui code to silence repeated build warnings (#1872)
Compile of gui would result in repeated warnings from two conditions:

1) gui/erroritem.h:104:30: warning: extra ‘;’ [-Wpedantic]
Message points to Qt Macro Q_DECLARE_METATYPE usage.
Semi Colon at EOL removed.

2) gui/resultstree.h:201:10: warning [-Woverloaded-virtual]
Message is indicating that function ResultsTree::selectionChanged
is being iterpreted as overloading function of the same name
in base clase (QTreeView::selectionChanged).
Refactored - function renamed to ResultsTree::treeSelectionChanged
2019-06-05 10:13:37 +02:00
Scott Furry dc5a38e61c Modify Qt5 CMake and include Qt Charts Option (#1837)
Update CMake search for Qt5 componets to be consistent
with recommended practice from Kitware.
(see https://blog.kitware.com/cmake-finding-qt5-the-right-way/)

Incorporate ability to build cppcheck-gui with Qt Charts
via CMake switch. Option "WITH_QCHARTS" will enable
search for Qt Charts to Qt5 component search and add
build flag "HAVE_QCHART".
2019-05-17 10:17:51 +02:00
Daniel Marjamäki 5b07901253 GUI: Add C++20 option 2019-05-05 10:44:09 +02:00
Daniel Marjamäki 0053476bef Fix Cppcheck warnings 2019-04-30 01:46:02 +02:00
Daniel Marjamäki ff8cf4fe25 gui/test: Add projectfile test 2019-04-20 19:07:14 +02:00
Daniel Marjamäki 3327102aa4 GUI: Test ProjectFile::getCheckSuppressions() 2019-04-19 15:09:55 +02:00
Daniel Marjamäki ae3e53f391 Travis: Try to fix gui/test 2019-04-19 13:45:14 +02:00
Daniel Marjamäki 91c000c09d Travis: Try to reactivate the gui/test tests 2019-04-19 11:57:52 +02:00
Daniel Marjamäki 93b27b2022 cleanup gui/test 2019-04-19 09:41:58 +02:00
Daniel Marjamäki d89923386d Removed gui/test/xmlreport 2019-04-19 08:41:48 +02:00
Daniel Marjamäki fee01099a9 GUI: Fix tests 2019-04-19 07:39:43 +02:00
Daniel Marjamäki b2e3af5869 Fixed #8637 (GUI: Supression filename should accept relative paths) 2019-04-18 09:52:29 +02:00
Daniel Marjamäki ccc830870c GUI: Updated selection of files/folders. Prefer relative paths. 2019-04-16 10:32:34 +02:00
Daniel Marjamäki a0dd853642 analyzing one vs config (first debug config that matches platform) 2019-04-13 20:01:40 +02:00
Daniel Marjamäki d7e08ce75f GUI: Refactoring handling of setting for c++/c std 2019-04-12 12:12:12 +02:00
Daniel Marjamäki f7be03fcbc GUI: removed -std=posix and added -std=c++17 2019-04-12 11:52:28 +02:00
Daniel Marjamäki dfe417c369 msvc compatibility: /constexpr/const/ 2019-04-11 21:06:37 +02:00
Daniel Marjamäki 3c1f6ae5c2 appveyor: /constexpr/const/ 2019-04-10 21:27:07 +02:00
Daniel Marjamäki 37c540b380 Use constexpr 2019-04-10 16:54:16 +02:00
Daniel Marjamäki f6b410b469 GUI: add setting for 'checkHeaders', 'checkUnusedTemplates' and 'maxCtuDepth' to project 2019-04-10 16:49:24 +02:00
Daniel Marjamäki 7237acdb47 GUI: In the project dialog select libraries in a listbox 2019-04-06 16:44:43 +02:00
Sebastian 08d41ab8af
Load std.cfg before all other libraries (#1740)
- CLI: Save the libraries that should be loaded to a list and load them
after the std.cfg has been loaded.
- GUI: Load std.cfg (and windows.cfg / posix.cfg when applicable) before
setting other options and loading the other libraries.
In the project-file-dialog the std.cfg is searched first. If some
other library fails to load is is retried with first loading std.cfg.
- boost.cfg: Enable containers that depend on std containers.
2019-03-15 06:59:37 +01:00
Daniel Marjamäki 6717f49f20 Try to give some credit to the 3rd party libraries we use. 2019-02-10 17:16:53 +01:00
Daniel Marjamäki bd7790fd8c Update copyright year 2019-02-09 07:24:06 +01:00
Daniel Marjamäki 7ac43eda79 lupdate gui.pro 2019-02-09 07:20:17 +01:00
Lauri Nurmi a7a0a54557 Show a clear button in the Quick Filter text field in GUI. (#1603) 2019-01-15 10:35:23 +01:00
Daniel Marjamäki f629fa3d66 Fix Cppcheck warning
[ci skip]
2019-01-12 18:29:34 +01:00
amai2012 e259e7bc6c #8626 twin include. Remove redundant include 2018-12-31 19:47:23 +01:00
Oliver Schode 1dd4c7a71e Fixed typo in warning about modified variable inside assertion (#1542) 2018-12-28 15:24:50 +01:00
Sebastian b51f19d530
Fix some doxygen warnings/issues in the comments (#1537) 2018-12-21 21:23:03 +01:00
fu7mu4 2abb3aa263 fix japanese translation typo and manual version (#1515) 2018-12-09 09:06:56 +01:00
Daniel Marjamäki d9db20db96 Update copyright year 2018-12-08 07:53:28 +01:00
Daniel Marjamäki 7ad93fa1a2 lupdate 2018-12-08 07:51:03 +01:00
Daniel Marjamäki 2c5a31594c fix argument name 2018-12-08 07:37:27 +01:00
Daniel Marjamäki f5c2abaefa Fix shadow warning 2018-11-19 10:21:02 +01:00
Markus Elfring 02c2018f25 Addition of a null pointer check in ProjectFileDialog::removeSuppression() (#1457)
The function “QListWidget::takeItem” is documented in the way
that a null pointer can be returned. This result was not checked
by the function “ProjectFileDialog::removeSuppression” so far.
Thus add a corresponding check so that an inappropriate pointer access
should not happen any more here.

Link: https://sourceforge.net/p/cppcheck/discussion/development/thread/d1d0b65245/#a1bf
Link: https://trac.cppcheck.net/ticket/8814
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2018-10-29 14:21:56 +01:00
Daniel Marjamäki 4533eb0bd6 GUI: cleanup the code 2018-10-22 21:00:04 +02:00
tompollok ae657d49e8 enable AA_UseHighDpiPixmaps (#1446)
enables AA_UseHighDpiPixmaps for less pixeled icons on 4K displays
2018-10-22 19:07:02 +02:00
Daniel Marjamäki 1a75084d75 GUI: Refactor comparisons 2018-10-20 16:30:40 +02:00
fu7mu4 b31b4706c5 cppcheck_ja.ts is updated (#1435) 2018-10-17 16:03:41 +02:00
Alexander ee2cea026a Fixed bug with incorrect platform used for check if check is run from UI and platform settings is taken from xml file. (#1434) 2018-10-17 12:44:41 +02:00
Markus Elfring 937da6bd46 Put XmlReportV2 object on the stack in ResultsView::readErrorsXml() (#1430)
Dynamic memory allocation was used for a XmlReportV2 object
in the function “ResultsView::readErrorsXml”.
This object was put on the stack instead so that this software
became a bit safer and more efficient.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2018-10-17 06:38:14 +02:00
Daniel Marjamäki 7833ade128 Updated copyright year 2018-10-13 18:20:31 +02:00
Daniel Marjamäki f9157f2aeb lupdate gui.pro 2018-10-13 18:17:43 +02:00
PKEuS 8f32811b80 Updated german translation 2018-10-13 09:31:02 +02:00
alex babafd75e3 Added support for -U option to the GUI. 2018-10-09 15:05:05 +02:00
Daniel Marjamäki 59731d70e8 triage: set error line properly 2018-09-01 06:39:22 +02:00
Daniel Marjamäki c4000b27f8 Fix Cppcheck warning 2018-08-11 15:31:26 +02:00
Matthias Krüger 017f910c57 gui: fix 2 findings by cppcheck
[gui/projectfiledialog.h:283]: (performance) Function parameter 'shortText' should be passed by const reference.
[gui/projectfiledialog.cpp:675]: (performance) Function parameter 'shortText' should be passed by const reference.

also run dmake
2018-08-09 09:43:11 +02:00
Daniel Marjamäki 9e3b392ec6 GUI: Edit existing suppression in the project file dialog 2018-08-09 06:50:35 +02:00
Daniel Marjamäki ddf7b186bb GUI: Cleanup non-existing projects from the MRU 2018-08-08 11:03:51 +02:00
Daniel Marjamäki f68f793256 GUI: load other results when open recent project 2018-08-08 09:07:05 +02:00
Daniel Marjamäki 90a3759479 Refactoring: early return 2018-08-08 09:00:04 +02:00
Daniel Marjamäki b66af545ca GUI: cleanup the details window 2018-08-07 10:45:00 +02:00
Daniel Marjamäki a24c3b1d36 Fix GUI build 2018-08-05 14:25:43 +02:00
fu7mu4 41d4a6bde6 update cppcheck_ja.ts for 1.84 (#1306) 2018-07-13 22:49:30 +02:00
Daniel Marjamäki 8c228c6ced GUI: better handling of suppressions 2018-07-01 14:24:37 +02:00
Daniel Marjamäki 5e34847592 GUI: Use relative paths in analysis 2018-07-01 08:00:05 +02:00
Daniel Marjamäki db6f4f4a3b Fix a few 'const reference' warnings by Cppcheck 2018-06-23 23:04:54 +02:00
Daniel Marjamäki 73a5aafba4 astyle formatting
[ci skip]
2018-06-19 14:02:58 +02:00
Daniel Marjamäki d6b976fd21 GUI: Renamed private variable LangCodeRole 2018-06-18 14:19:14 +02:00
Daniel Marjamäki bae36bddd2 GUI: Renamed private variable minsizes 2018-06-18 14:15:13 +02:00
Daniel Marjamäki dbc19d6503 GUI: Renamed private variables 2018-06-18 14:11:34 +02:00
Daniel Marjamäki 7d00b30488 GUI: Rename private variable ui to mUi 2018-06-18 10:13:33 +02:00
Daniel Marjamäki 86c5f44d19 GUI: Rename private variables 2018-06-18 10:10:11 +02:00
amai2012 134d0be8b9 #8620 include used twice. Clean up includes. 2018-06-12 08:34:44 +02:00
Daniel Marjamäki 45379a3aa6 Updated copyright year for modified files
[ci skip]
2018-06-10 22:07:21 +02:00
Daniel Marjamäki ff7e08bf0d Run 'lupdate gui.pro'
[ci skip]
2018-06-10 22:05:27 +02:00
PKEuS 3e856c2e03 Updated german translation 2018-06-10 21:00:38 +02:00
Daniel Marjamäki 4da406baab GUI: Better handling of addon output 2018-06-06 15:01:06 +02:00
Susi Lehtola 3f4aae75e2 LinguistTools is not a library. (#1274) 2018-06-03 07:13:39 +02:00
Susi Lehtola f2fc38a5b4 Use modern CMake syntax. (#1273)
* Use modern CMake syntax.

* Update way of finding Qt5 components
2018-06-02 18:31:33 +02:00
orbitcowboy ca449a7f27 Running astlye 2018-05-25 08:36:02 +02:00
bwoester 1af983dd95 Gui select bcb6 projects (#1258)
* Allow selecting bcb6 projects in "Analyze" -> "Files..."
This change also splits the filters for files which can be analyzed into multiple entries and includes a helper class to construct filter strings.

* move FilterStringBuilder to its own class and document it

* add new files to .pro

* add missing include for Q_DECLARE_TR_FUNCTIONS macro

* re-run astyle

* allow to import bcb6 project when creating a new cppcheck project
exchange class FilterStringBuilder with a toFilterString() helper method

* add missing include
2018-05-25 07:09:49 +02:00
IOBYTE ce50df8047 Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
Daniel Marjamäki e5c4e31da6 Fix a number of noOperatorEq and noCopyConstructor warnings 2018-05-01 09:36:21 +02:00
Sebastian b1bd6bb9ff
GUI: Applicationlist: Add Microsoft Visual Studio Code (on Windows) (#1193) 2018-04-26 16:26:10 +02:00
Sebastian 389fc0c1ee
GUI: Fix wrong receivers in connect calls (#1178)
Since the slots (functions) are not existent in the class MainWindow and
Qt complains that it can not connect the slots i guess it has been
forgotten to change the receiver.
The ResultsView class (from which mUI.mResults is an instance) contains
these slots, so i guess they should be connected there.
2018-04-18 21:37:09 +02:00
Sebastian 7aefdeb089 GUI: Remove connect call with nonexistent slot function (#1177)
When starting the application Qt prints this message:
QObject::connect: No such slot CodeEditor::highlightCurrentLine() in
..\gui\codeeditor.cpp:141
And this function really does not exist, i guess it is some relict. If
it is planned to implement it this PR can just be closed.
2018-04-18 15:42:03 +02:00
Daniel Marjamäki ebb3912396 GUI: Refactoring 2018-04-16 19:57:23 +02:00
versat 024f84ea60 GUI: Add "Check library" and "Check configuration" menu entries
They both are only enabled when a project is loaded and when started
they reanalyze the project one time with the according settings.
2018-04-14 08:10:35 +02:00
Daniel Marjamäki fb803789fd astyle formatting
[ci skip]
2018-04-13 19:57:48 +02:00
Daniel Marjamäki c4c678383e GUI: copy selected warnings 2018-04-13 17:31:51 +02:00
Daniel Marjamäki ff2c376fe8 GUI: Cleanup NewSuppressionDialog interface 2018-04-13 17:24:58 +02:00
versat 80a26312dc GUI: Applicationlist: Find UltraEdit 32/64 on Windows 2018-04-12 22:07:08 +02:00
Daniel Marjamäki 308e044769 GUI: minor gui updates
* when loading xml results, show filename in window title
 * when xml results are loaded, enable the save/print/etc buttons
2018-04-12 08:15:04 +02:00
Daniel Marjamäki a0906140a6 Suppressions: New extensible Suppressions xml format that allow more attributes. To start with it also allows symbolName. 2018-04-09 06:43:48 +02:00
Daniel Marjamäki e240f8cee8 Fixed #8473 (GUI: Missing addon, not looking in executable path subfolder) 2018-04-07 10:32:10 +02:00
Daniel Marjamäki a828d2a199 GUI: Fix so correct tab is shown first in ProjectFileDialog 2018-04-07 10:20:47 +02:00
Sebastian 48d33da1d5 German translation: Fixed typo and punctuation marks. (#1144) 2018-04-04 14:19:57 +02:00
amai 3cc3bd7066 #8471 GUI German spelling: correct typo 2018-04-03 22:05:32 +02:00
amai fe20a96013 #8467 Remove redundant include 2018-04-02 21:10:35 +02:00
Daniel Marjamäki b4583d6e37 Made Report::close() non-virtual, it is not overriden and it is called from the Report destructor 2018-04-02 18:30:12 +02:00
PKEuS e4273be2bc Updated german translation 2018-04-02 08:52:09 +02:00
Daniel Marjamäki 7e4dba6a7e Updated copyright year 2018-03-31 20:59:09 +02:00
Daniel Marjamäki 9edc2ac360 lupdate gui.pro 2018-03-31 20:55:29 +02:00
Daniel Marjamäki 588ec80122 misra: the user must provide the rule texts in text file. 2018-03-24 13:28:40 +01:00
Sebastian e4becc5616
GUI: Fix loading of platform files in project file dialog (#1122)
Platform::loadPlatformFile needs the path to the binary not only the
path to the directory where the binary is in. Otherwise the last
directory could get stripped away and the platform files maybe will not
be found.
2018-03-16 05:35:30 +01:00
Sebastian ad5f7cbf71 GUI: Minor fix: Rename one of the two layout items with the same name (#1121)
Qt warns about two QVBoxLayout objects with the same name and
automatically renames one.
This fixes the warning.
2018-03-15 14:59:34 +01:00
Daniel Marjamäki 9800e82d13 GUI: Allow that platform is selected in project dialog 2018-03-13 13:07:10 +01:00
Sebastian 004da46664 GUI: Make edit define tooltip more clear via example (#1113) 2018-03-12 15:20:09 +01:00
Sebastian df34164b9f
GUI: Scratchpad: Add help texts; run astyle (#1104)
This adds labels with short explanations on how the scratchpad can be
used.
2018-03-07 12:38:50 +01:00
Martin Ettl 5fc8f13fd6 GUI: Expand found results when using the scratchpad. 2018-03-07 00:18:47 +01:00
Daniel Marjamäki b66a214ce5 astyle formatting
[ci skip]
2018-03-06 22:51:06 +01:00
Sebastian 6b45be6c94 GUI: Avoid path concatenation when path is absolute (#1103)
When using an absolute path for import project, prepending the current
directory results in an invalid path and the analysis (silently, no
error shown in the GUI) fails.
2018-03-06 22:50:16 +01:00
Sebastian 857da29967 GUI: Remove redundant code (#1102)
The checked state of the addon checkboxes is already set in the
updateAddonCheckBox function directly above the removed code. I do not
see any reason to set it again and only for three of the four
checkboxes.
2018-03-06 22:49:33 +01:00
Sebastian 3c5ab13a6d GUI: Add context menu entry for copying line nr (#1100)
* GUI: Add context menu entry for copying line nr

As requested in ticket 7947 (https://trac.cppcheck.net/ticket/7947) also
copying the line nr is implemented.

* Use early return for the new function and similar ones
2018-03-06 15:34:14 +01:00
fu7mu4 428d067f19 Cppcheck_ja.ts is updated (#1099)
* update to 1.82

* update cppcheck_ja.ts
2018-02-25 13:50:03 +01:00
Daniel Marjamäki 1b53e3ec1d GUI: Updated codeeditor formatting 2018-02-23 22:17:40 +01:00
Luxon JEAN-PIERRE 211b5ba9fb GUI: added new french translations (#1094) 2018-02-22 22:02:56 +01:00
Daniel Marjamäki bd21d7fff6 GUI: Improved scrolling in code display 2018-02-21 22:49:50 +01:00
Daniel Marjamäki 9da0e785ef GUI: Improve user interface when mCheckPath is not set 2018-02-20 22:23:02 +01:00
Daniel Marjamäki be67b75035 GUI: early return 2018-02-20 14:32:07 +01:00
Daniel Marjamäki 5236bfd845 GUI: load xml => set check path to file path if that seems to match 2018-02-20 13:40:10 +01:00
Daniel Marjamäki b1ae56736d GUI: early return 2018-02-20 13:10:36 +01:00
Daniel Marjamäki feef8f3ebe GUI: Updated code viewer 2018-02-18 12:06:54 +01:00
Daniel Marjamäki 66c275e337 GUI: Added code editor for quick inspection of bugs 2018-02-17 22:24:41 +01:00
Daniel Marjamäki 79be1257ca GUI: Minor tweaks. Rename variables. Make sure statistics menu option is enabled at startup if there are last results 2018-02-16 22:22:13 +01:00
Daniel Marjamäki 5acbae8cfa GUI: If no analysis has been done, there are no statistics to show 2018-02-16 22:15:15 +01:00
Daniel Marjamäki 0883623159 GUI: Better handling of 'Hide all with ID' 2018-02-15 22:37:10 +01:00
Daniel Marjamäki f8c74032a7 GUI: Early return 2018-02-15 21:29:18 +01:00
Daniel Marjamäki 3c00a22c42 GUI: Clarify user interface '...' => 'Browse...' 2018-02-10 17:31:49 +01:00
Lauri Nurmi e0e664f996 Fix permissions of certain non-executable files (#1083)
mode 0755 => 0644
2018-02-09 19:46:38 +01:00
Boris Barbulovski 79bb91179b double quotes instead single (#1067) 2018-01-30 08:43:49 +01:00
Daniel Marjamäki 84fda14684 GUI: cleanup settings dialog interface 2018-01-21 16:42:46 +01:00
Daniel Marjamäki 6f2d4361df Misra: Integration of MISRA in the GUI. The misra addon can now extract the rule texts from the PDF. 2018-01-20 14:13:09 +01:00
PKEuS adf45c5afe Updated translations 2018-01-14 16:31:34 +01:00
Daniel Marjamäki 8e1a23317c lupdate gui.pro 2018-01-14 16:06:07 +01:00
Daniel Marjamäki af26f00e04 gui: update copyright message in about dialog 2018-01-14 15:46:20 +01:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
PKEuS b684e1f202 Updated AStyle to version 3.0.1 2018-01-08 20:20:33 +01:00
Sebastian ba0ea2e8b1 Fix 7439: GUI: Remove value "constant" from minsize attribute items list (#1020)
The list of items for the minsize attributes in the LibraryEditor
contains the illegal value "constant" which is removed by this patch.
2018-01-05 11:10:21 +01:00
PKEuS 1fca9112d9 Updated german translation 2017-12-30 18:20:49 +01:00
orbitcowboy 80d0c8451f Running astyle. 2017-12-08 09:16:34 +01:00
Sebastian 8d08357a73 GUI: Enhance context menu for analysis log (#1014)
*Add context menu entry for copying selected log entry
*Add context menu entry for copying the complete log
*Do not show context menu if analysis log is empty
*Renamed function log_clear to logClear so it matches the coding style
in the GUI
2017-12-06 21:39:53 +01:00
tompollok a3bf023506 enable high dpi scaling when qt version >= 5.6.0 (#1008) 2017-12-05 21:51:58 +01:00
Sebastian 2f861070de GUI: Fix: Create all directories in build dir (#1009)
mkdir() only creates the "last" directory, if more directories in the
path are missing it fails and does not create any directory.
With mkpath() all missing directories are created now.
2017-12-05 20:44:09 +01:00
Sebastian 36ebf165c8 GUI: Add clear log context menu entry (#1012)
* GUI: Add clear log context menu entry

Add custom context menu to analysis log with an entry to clear the log.

* Fix: Made string translatable
2017-12-05 20:42:16 +01:00
Daniel Marjamäki 247192452f GUI: Better error handling when library file has unhandled elements 2017-11-12 21:03:22 +01:00
Daniel Marjamäki d75d0965ff GUI: Clear data properly in CppcheckLibraryData 2017-11-12 15:22:00 +01:00
Daniel Marjamäki 2be16ed663 GUI: in <function> group the return value elements together 2017-11-12 15:15:54 +01:00
Daniel Marjamäki a794ae6c9d GUI: Don't loose information when open/read std.cfg 2017-11-12 15:07:11 +01:00
Daniel Marjamäki 63feebc34f GUI: Use early return 2017-11-11 21:52:36 +01:00
Daniel Marjamäki 120a7dd42e GUI: Refactoring pythonCmd lookup 2017-10-12 22:24:45 +02:00
Daniel Marjamäki abf97c2c26 GUI: refactoring 2017-10-12 17:02:25 +02:00
Daniel Marjamäki 74fc6485d2 GUI: Disable addons that are not found 2017-10-11 23:02:00 +02:00
orbitcowboy 5bc61e35a0 std.cfg: Added support for std::swap. 2017-10-11 13:12:00 +02:00
Daniel Marjamäki fb94b47f84 GUI: Indicate in project file dialog if clang-tidy is not found 2017-10-10 21:32:37 +02:00
Daniel Marjamäki 09cdead6cb GUI: Fixed problem with absolute build dir 2017-10-08 15:01:03 +02:00
Daniel Marjamäki 7b1f156ed0 GUI: Restore filemode for checkthread 2017-10-07 23:19:09 +02:00
PKEuS a79b9125a4 Removed svg file from gui.qrc 2017-10-07 23:11:39 +02:00
Daniel Marjamäki 92314b65e9 GUI: Set PYTHONPATH 2017-10-07 16:21:35 +02:00
Daniel Marjamäki ec55313c28 GUI: DataDir - use application path if datadir is not set 2017-10-07 16:09:14 +02:00
Daniel Marjamäki 3d353a021d GUI: Use llvm-dragon.png instead of llvm-dragon.svg 2017-10-07 14:41:00 +02:00
Daniel Marjamäki 5b73a388bc GUI: Run lupdate 2017-10-07 12:33:40 +02:00
Daniel Marjamäki d06f718152 GUI: Updated swedish translations 2017-10-07 12:24:57 +02:00
PKEuS 55d0849180 Updated german translation 2017-10-07 11:49:15 +02:00
Daniel Marjamäki 52c121c223 Disable Clang Analyzer for now. It needs a little more work. 2017-10-05 08:47:07 +02:00
Daniel Marjamäki ecc90c040e GUI: When creating a new project, set a default value for build dir 2017-09-25 09:19:22 +02:00
Daniel Marjamäki 1b93e2fad9 GUI: Make last results work better 2017-09-23 15:11:42 +02:00
Daniel Marjamäki bdac09c3af GUI: Fix compile error 2017-09-22 23:24:03 +02:00
Daniel Marjamäki 233a6d2fc6 GUI: Fix warning ids and severities for clang/clang-tidy warnings 2017-09-22 22:32:02 +02:00
Daniel Marjamäki 9f306cf3aa Added C++14 option 2017-09-22 22:00:00 +02:00
Daniel Marjamäki 791f6ecbec GUI: Add 'Clang Analyzer' option 2017-09-22 18:57:53 +02:00
Daniel Marjamäki 6ddcfc3d1c GUI: Updated handling of clang and clang-tidy 2017-09-22 15:41:27 +02:00
Rudolf Grauberger 6c2ed41e12 Remove theoretical qt4 support for gui projects (#963)
Update readme instruction to install and build with qt5 only. Remove version check for qt4.
2017-09-20 10:02:46 +02:00
Daniel Marjamäki 33664a88d1 Fixed CID 1378777, uncaught exception 2017-09-02 11:11:35 +02:00
Daniel Marjamäki 4311d4192a Fixed CID 1360385, we know conversion can be made so use static_cast instead of dynamic_cast 2017-09-02 10:34:20 +02:00
Alexander Mai 0cae823c5d Fix doxygen comments 2017-08-21 21:13:01 +02:00
Daniel Marjamäki 27fb430c1e GUI: Code cleanup 2017-08-20 15:08:53 +02:00
Daniel Marjamäki 520ab204e5 GUI: Fix time axis formatting 2017-08-20 14:54:41 +02:00
Daniel Marjamäki 34a96a56be GUI: Added buttons to show/hide clang/cppcheck results 2017-08-20 12:21:46 +02:00
Daniel Marjamäki f6184bba0d Fixed #8169 (GUI: Show checking log in mainwindow) 2017-08-19 22:55:13 +02:00
Daniel Marjamäki 330ceccdc9 GUI: Rework handling of tags. The allowed tags are now userdefined in the project file 2017-08-18 17:25:08 +02:00
Daniel Marjamäki 03b75b54ca GUI: Updated parsing of addon output 2017-08-15 22:09:55 +02:00
Daniel Marjamäki e5e0853dd3 GUI: Remove environment tweaks because it should not be needed 2017-08-15 11:27:26 +02:00
Matthias Krüger 2ea8754088 gui: MainWindow::reAnalyzeSelected(): remove unused parameter 'all'.
Was:
mainwindow.cpp:998:60: warning: unused parameter ‘all’ [-Wunused-parameter]
 void MainWindow::reAnalyzeSelected(QStringList files, bool all)
                                                            ^~~
.
2017-08-14 12:56:16 +02:00
Daniel Marjamäki 71f52b77a4 GUI: Configuration of python path for the addons 2017-08-14 00:23:21 +02:00
Daniel Marjamäki 663beb6fd2 GUI: Fix compile error 2017-08-13 17:38:47 +02:00
Daniel Marjamäki 928e053efc GUI: VS headers for clang-tidy 2017-08-13 17:13:24 +02:00
Daniel Marjamäki 83ae7ce270 GUI: Remove include paths from the preferences dialog 2017-08-13 16:56:37 +02:00
Rudolf Grauberger a007ba7d3c GUI: Refactor Qt Signal/Slots to the new syntax 2017-08-13 13:41:52 +02:00
Rudolf Grauberger 4bde6f77ed GUI: Remove support for Qt4 in gui.pro 2017-08-13 13:38:47 +02:00
Rudolf Grauberger 89cf19fdc1 GUI: Refactor Qt Signal/Slots to the new syntax 2017-08-13 13:35:19 +02:00
Daniel Marjamäki d95efc44c7 GUI: Remove xmlreport_v1.xml test file 2017-08-13 11:05:30 +02:00
Daniel Marjamäki 184e621364 GUI: fix tests 2017-08-13 11:04:37 +02:00
Daniel Marjamäki 649f7b4d73 GUI: Tweak ProjectFileDialog, use groupbox 2017-08-12 23:20:56 +02:00
Daniel Marjamäki 117892e5b2 GUI: Reorder ProjectFileDialog tabs 2017-08-12 20:33:49 +02:00
Daniel Marjamäki 32b63e3079 GUI: chmod 2017-08-12 15:45:14 +02:00
Daniel Marjamäki b62c145c36 GUI: Show separate statistics graphs for cppcheck and clang-tidy 2017-08-12 15:44:43 +02:00
Daniel Marjamäki 416cf641f3 GUI: Tweak ProjectFileDialog, use GroupBox 2017-08-12 13:02:15 +02:00