Local help does not currently work (ticket #2316) and building it
is a bit painful in Windows. Hence it was decided on ticket #2677
and at IRC that we open on-line help from GUI until the local
help issue is solved.
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.
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)
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).
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.
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.
Debug errors were not shown anywhere in the GUI, they were just
ignored. This commit adds new signal for those debug errors and
directs them to checking log.
Solves ticket #1898 (GUI: Handle internal errors from lib)
* moved the help file to the application folder
* use absolute path instead of relative path for helpfile
* show warning messages if help file doesn't exist or fails to be loaded
Project closing action was not enabled when the project file was
opened from the checked directory. Also update the window caption to
contain project file name that was opened from the checked
directory.
The GUI was crashing if no project files were in checked directory.
I missed this case in my own testing because I had created test
project files for each directory. Whoops!
Anyway, this now also makes silently loaded project files (project
file residing in directory but not load by the user) as normal
projects in the GUI.
If rootpath is given in project file then use it as a current
directory. Also check if paths given in project file are
relative and use rootpath as base path for relative paths.
Now we load user-selected project file and start checking paths it
contains. Project file can be anywhere as long as it contains valid
path(s) to check.
I accidentally committed two new files with filenames starting
with capital letters from Windows machine. The Linux build
breakage was fixed by fixing the include lines. But the correct
fix is to fix filenames as we are using all lower letter filenames
in this project.
Create a list of files to check. Currently we only read this list
once. But later on we can refer to this list to for example
determine which files were checked and which not in aborted
checking.
Current directory was set from first file in the list. That file
could be in subdirectory when wrong path was set. Also getting
absolute path was buggy.
Earlier commit allowed cppcheck to exit immediately while checking.
This however leads crashes and error logs shown since the thread
termination leaves things in inconsistent state. I thought cppcheck
would close fast enough so these could be ignored. But apparently
not.
So this commits adds new bool mExiting for MainWindow and sets that
to true when exiting while checking. When the checking is ready this
attribute is checked and if it is true the application can now be
cleanly exited.
This commit separates logic more from the GUI. The dialog class is
only responsible from showing the dialog and handling data in it.
Other related classes do the project file reading/saving/etc.
This commits adds new "Open XML" item to File-menu. Selecting this
menuitem allows user to select report file to open. When the file is
read the error data is printed to debug output. Later patches will
implement adding error data back to the GUI.
Add new "New project file" item to File-menu and rename existing
"Project File" item to "Open Project File". Selecting new file
opens empty project file dialog. When the dialog is then closed
the user is asked to select a filename for the new project file.
Progress signal had also item count with it and then the handler determined
that check is ready when max count of progress was done. Also progressbar
was practically reset in every progress signal. This was simply fragile
code.
After this patch progress signal has only the current progress count. Total
count of items is given when initializing the checking. And there is
separate function for handling check finishing.
This also fixes the bug that progressbar was not hidden after checking
or when interrupting the checking.
Improve the system used to have separate versions of code of FileLister for
Win32 and Linux. New idea is to have Base FileLister class implementing
common code and then derived classes for Win32 and Linux specific code.
FileLister is not anymore a static class. Instead we use singleton of
derived class.