Commit Graph

1433 Commits

Author SHA1 Message Date
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