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).
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".
* 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.
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.