Project file can't be opened when the check is running. So the menu
items must be disabled.
Fixes ticket: #3446 (GUI: MRU items must be disabled while checking)
There was (obviously) a copy-paste bug in code converting severities
to GUI's show types. This caused some severities not being
filtered correctly when severity selection in GUI was changed.
Fixes ticket: #3242 (GUI: Unmatched suppression: message in wrong category)
We are using ShowTypes around the GUI codebase so it makes sense
to have it in its own class. And the class also contains related
helper functions instead of scattering them around different
classes.
ShowTypes also contains the visibility settings for all the
GUI severities. Implementation in this commit makes ShowTypes
class to load the visibility settings when it is created. And save
the settings when it is destroyed.
"default" as platform name/definition doesn't tell much and would
only confuse users. "Build-in" is not perfect either but it is
best I've can come with before the release.
Ticket: #3156 (GUI: "default" platform needs proper name)
When GUI was started not all the categories visibility statuses
were not preserved. I.e.
Ticket: #3087 (GUI does not show all reported files until a filter button state is changed)
The iterator was not advanced in the loop. So the code worked when
I ran it in Linux as the first item was matching.
Thanks for Robert for spotting and reporting it.
When running in Windows platforms, set the GUI's checked platform
initially to Windows 32-bit ANSI. Other platforms are set
initially to default/unspecified which means the type sizes are
from the platform GUI was compiled on.
This was suggested by Rober in ticket #3119.
We have now one list for checked platforms, menu items are created
dynamically based on that list. This makes it much easier to alter
the platforms list later on.
This is quick and dirty patch to add the platform selection for
the GUI. It is simple menu selection in Check-menu. It always
defaults to "Default" at startup. And it forget the selection
when the application is closed.
Ticket: #3119 (GUI: add ability to specify platform type)
Refactor the code formatting statistics dialog content so that
the strings are easier to translate. Old formatting with embedded
HTML was practically impossible for translators to translate. New
code isn't very beautiful either but at least translating is now
possible.
Ticket: #2726 (GUI: HTML-formatted statistics report text hard to translate)
The CLI/LIB change earlier added own enable-flag for performance-
and portability-checks. This commit updates GUI to also enable
those new enable-flags.
Per project include directories must be added to the list before
the global include directories. Include directories are searched
in listed order. So placing per project include directories first
we ensure per project include file is found instead of the global
include file if same file exist in both.
The extra menu separator was added before the MRU menu items. When
updating the (menu) MRU items existing items were first removed
and new items added back. But the added separator was not removed.
Earlier the GUI (project) went into some weird state after creating
a new project. The project could not be checked in any discoverable
way.
This commit fixes the above bug by automatically checking the new
project after the project dialog is closed. I think this is what
most users expect to happen.
Exclude is the correct term to use when removing paths from the
list of checked items. Ignore as a term was a poor choise to begin
with. XML file reading still recognizes and reads the 'ignore'
element but writes 'exclude' element.
Ticket: #2995 (GUI: Rename ignore-feature to exclude-feature)
Since include dir order is important (Cppcheck uses the first file
it finds) user must be able to edit the order of include paths.
This commit adds "Up" and "Down" buttons to the Project-dialog's
inlude paths-tab. User can use those two buttons to re-order the
include directories.
Ticket: #3037 (GUI: Allow reordering include paths in project dialog)
The 'Project' label in Project-dialog is confusing and users think
it is project's name. When it acutually is the root directory of
the project. So rename the lable and move it below the 'Defines'-
field to make it less important looking.
Ticket: #2997 (GUI: 'Project'-field in project file-dialog is confusing)
The benchmark data file had errors when checking with Cppcheck.
And people reported these errors. So replace the file with one
that has no (currently found) errors.
The script is available in another repository. I don't want to
distribute it with Cppcheck sources for now. Maybe if and when
there is more interest towards GUI tests...
If the "extra version" is defined (not empty) then it is shown
after the actual version number in the About-dialog.
Ticket: #2164 ([GUI] Add revision info to "About" window)
If strings contain only formatting placeholders for the dynamically
formatted text it does not make sense to mark the strings as
translatable. There is nothing translators can translate e.g. in
"%p".