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.
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.
At first we created the GUI in the code and so needed all the layouts
etc include to the code. Now when we are using UI files we don't need
all those included. So clean them up. Also use forward declarations
instead of includes in header files when possible.
Ensure that native separators are used in saved reports. Reports may
be parsed by other programs/scripts so it is important that paths
are properly formatted.
GUI used to show paths with / separator which is not native
separator in Windows. So lets convert shown paths to native
separators before adding them to the GUI.
In this initial commit the Path class contains two methods for
converting path separators. I want to move cppcheck path handling
to direction that we internally have paths with / separator. And
convert from/to native separators when needed.
This commit adds setfile() method to FileLocation class. The setfile
method converts in Windows path separators to internally used Unix
separators. And getfile() converts path separators back to Windows
separators. This fixes bugs that error reports had mixed path
separators in paths.