* clang_tidy.cmake: added clang-tidy-11 to list of executables to look for
* .clang-tidy: disabled warnings we are (currently) not interested in
* fixed clang-tidy warnings
* compileroptions.cmake: moved common warnings to proper scope and aligned them with other build systems / fixed some -Wrange-loop-construct clang warnings
* compileroptions.cmake: use check_cxx_compiler_flag() via add_compile_options_safe() helper to avoid compiler version checks
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.
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".
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
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>
*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