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.