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.
Show native path separators in project file-dialog. Convert paths
to internal separators when reading from project file and when
reading from the dialog. Convert to native separators when adding
to the dialog (for the user).
Add similar GUI than include paths has. Currently there is only
possibly select directories directly from the GUI. But filename
can be added to the path by editing it.
Add applying of filtering into list of files to check if we have
an active project file. Filtering is quite much similar to the
filtering in CLI.
If we have directory filter ("gui/") then we check all paths if
they contain "gui" part. In practice we search for string "/gui"
from the paths. If we have filename filtering
("gui/projectfile.cpp") then we check if any of the paths end
with that.
This patch adds support for ignored paths in the project file.
There is new <ignore> element which can contain one or more
<path> elements with name attribute containing the path to
ignore.
Handling paths in line edit control is quite hard. List control is
much more pleasant to use for it. Convert Project file path
handling to similar list control usage than include paths earlier.
Editing include directories in edit control is not nice. Instead
add new tab and list control for the include directories. They
are now added, edited and removed like global include directories
in settings dialog.
The default application was not handled correctly when removing
application from the list. If the default application is removed
then we reset the default application to unknown. Otherwise we
make sure the default application is correct after the removal of
other application.
Instead of keeping the default application as a first item in
the application list point the default application by adding a
"[Default]" text after its name.
Make the editor application settings dialog to look similar than
include paths dialog. Move buttons right to the list, not below.
And remove unnecessary "application" word from button texts.
Rename Modify-button to Edit-button since we are not modifying
the application but editing its info. Similarly rename Delete-
button to Remove-button since we are not deleting the application
but removing from the list.
Instead of hard-to-use single line edit control, use list control
for include paths. Have separate buttons for adding, editing and
removing paths. Paths are still stored as one string where paths
are separated with ";". Empty paths are ignored.
If there were unknown language in settings the fallback to English
language didn't work as expected. And there were no proper current
language set after that. Initialize current language to English
so we always have English as proper fallback.
GUI was storing selected language as index to the languages list.
This is fragile since the order and count of items can change.
This commit changes to using ISO language code (e.g. "en" for
"English").
Fixes ticket #2446 (GUI: Don't use index number for language selection)
Instead of separate language name and filename lists use one
list of structs. This makes language name and filename more
connected and makes handling of them easier.
XML report format 1 only had error "lines" that we promoted to "items"
when adding to GUI. XML report format 2 contains error "items" so
change the code to read items and do the promotion directly when
reading and parsing the data.
The current wording was confusing (espcially related to CLI) since
it said the option will make Cppcheck to check all #ifdef configs.
But this really is case only when there is excessive amount of
those configs and without the option some would be ignored. So
format the option text in line of CLI switch and say it is forcing
not enabling checking of all configurations.
When reading XML file there is no summary data stored so we must
dublicate the message data to summary. Since message can be long
try to find full stop from the message and cut summary to it.
Ticket: #2402 ([GUI] Summary is not shown for loaded .xml file)
Ticket #2513 (GUI: Garbage printed to log after missing include warning)
The linenumber was not properly converted to the QString so there
were garbage printed to the log.
Settings-dialog is more natural place for language selection than
the main menu. We also have more space and freedom there to have
longer text etc to make the selection easier (menus are quite limited
controls).
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.
Dan added new enable-flag for information messages in commit 033e759.
Enable that flag for GUI so that the information messages are visible
in the GUI.
I accidentally added the 'placeholderText' attribute to settings.ui
when editing it with Qt Creator. That attribute was added in Qt
4.7.0 and we are not using it for anything. So removing it to fix
building with older Qt versions.
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)
Show both short summary and verbose message in lower details panel
in the GUI: Add titles for short summary and message. Hopefully this
makes it easier to read the messages and copy/paste them too.
Revert change ca9f8a7036 that converted
text in Add Application -dialog to rich text. The text is plain
text and doesn't use any formatting so plain text is good for it.
This commit adds new setting and GUI for global include dirs. When
project file with include dirs is loaded, global includes dirs are
added first and after them the include dirs from project file.
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.
This commit adds new rich text panel for the detailed error messages.
When user clicks error item the detailed error text is updated to
the panel. This way we have much more freedom in formatting the
message and user can easily copy/paste (parts of) the message.
Get rid of the form layout stretching the Browse-button so wide. Use
form-like but more flexible layout. Change the term 'Application to
execute' to 'Command to execute'. This reduces duplication and makes
clear difference between application name and the command to execute
to start the application. Fix also tab ordering so that the
application name field gets the focus initially.