Setting organization and program name in main() allows us to
cleanup Settings class usage. As we don't need to keep using the
one instance of Settings but can create new Settings class
whenever we need to access settings. According to the Qt
documentation creating Settings class is fast.
Use project file's location as base path when adding new paths
(checked, included or ignored) to the project. In most cases user
wants to add paths in the same project so this reduces browsing
paths considerably when adding them.
When project files support was added to the GUI there was no GUI
for them and automatic/silent loading was added. So that if the
directory contained project file with the same name (and .cppcheck
extension) then the project file was automatically loaded and used
for the checking.
This can be very confusing for the user as there is no any
indication that the project file is used. But this solution was
necessary at that time to get project file support added.
Now that we have usable GUI for the project files this automatic/
silent loading can be removed. Nobody really should be using it
anymore. And even if the automatic loading is needed one can give
the project file for the GUI using command line parameter.
The project file to check just GUI code was missing the directory
to check. This is probably due it was used originally as
"automatically" loaded project file which assumed current
directory is checked and only added some additional parameters.
If the project file in MRU list does not exist ask user if one
wants to remove the file from the list. If user agrees then the
file is removed from the list. Otherwise the file is left to the
list but not tried to open. User may have accidentally moved or
renamed the file so we give a possibility to add it back and not
just blindly removing it from the list.
Add MRU items for project files to File-menu. When user creates
a new project file or opens existing project file it is added to
the list of recently used projects. Last 5 projects are remembered
and available for quick acess in the File-menu.