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.
There always should be default editor if there is editor
application configured. But it is possible in some cases that
default application is "lost". So check that we have default
application configured before trying to use it. And inform user
to configure default application instead of silently failing to
open the application (and the file) for the user.
This is the first (and quick) support for the inconclusive errors.
We simply add [Inconclusive] to begin of the summary. This is
temporary solution until better GUI is implemented. XML v1 won't
be supporting inconclusive errors. For XML v2 we need still to
decide what to do.
Earlier user had to add quotation marks around application executable
path in application dialog. Because we could not determine which part
is path and which part is parameters. As we now have separate
variables we can automatically add the quotation marks when needed
before starting the application. This reduces the confusion users
have had about the correct formatting of paths.
Currently combined editor application path + params is a bit
problematic (at least in Windows). We really don't know where the app
path ends and parameters start. So proper quoting is not always
possible.
And application path and command line parameters are clearly
different settings anyway. So make them separate settings. It has
bunch of other positive sides too. Like one can now browse new path
for the application without loosing the parameters.
When starting Cppcheck version with these new settings user is warned
that loading settings had problems and asked to check and fix the
settings.
Translation of severity texts was temporarily disabled by earlier
commits. Now adding new method to ResultsTree for getting
translated severity string.
Convert from using string to enum values for severity in ErrorItem.
Storing and handling severity as string was the easy way earlier
but it is not convenient or efficient way to handle severities.
This commit is the first step in converting severity handling to
use the enum values instead of strings.
Ticket #2424 (Windows GUI: "Copy full path" doesn't copy the visible full path if it has been changed in preferences)
We keep paths internally with / separator and only convert to native
separators (for Windows) when showing them. Conversion was missing
from path copying function.
Add 'backend' support for the new 'portability' severity. The new
severity is handled, converted to new SHOW_PORTABILITY and added
with correct type to the result view.
There is no menuitem/toolbar button to show/hide portability
items. Likewise there is no line for portability issues in stats-
dialog.
Ticket #2106 (More severities and new xml format)
After previous patches the details view was only updated when the
item was clicked with mouse. This patch improves the updating and
now it works also when changing selected item using keyboard.