We have now one list for checked platforms, menu items are created
dynamically based on that list. This makes it much easier to alter
the platforms list later on.
This is quick and dirty patch to add the platform selection for
the GUI. It is simple menu selection in Check-menu. It always
defaults to "Default" at startup. And it forget the selection
when the application is closed.
Ticket: #3119 (GUI: add ability to specify platform type)
The extra menu separator was added before the MRU menu items. When
updating the (menu) MRU items existing items were first removed
and new items added back. But the added separator was not removed.
Earlier the GUI (project) went into some weird state after creating
a new project. The project could not be checked in any discoverable
way.
This commit fixes the above bug by automatically checking the new
project after the project dialog is closed. I think this is what
most users expect to happen.
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.
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.
GUI now recognizes -p <project file> command line parameter. When
given (with path to valid project file) GUI automatically loads
the project file and starts checking paths in it.
Ticket: #2613 (GUI: Should accept project file from command line)
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.
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)
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)
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.
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.
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.
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 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.
Fixes ticket #436 (GUI: All style -severity). The possible style errors can be now selected visible / hidden so all severities have their own menu item.
Also added QSetting value names to common.h
Work is halfway on both translations and .ui files.
I added a very quick and rough finnish translation.
The program now requires the translation files to be created before running
that can be done with lrelease gui.pro.
To compile the whole GUI one must do the following
cd gui
qmake
lrelease gui.pro
make
GUI reads per-project settings (automatically deallocated classes) from XML project file. The project file format is described in projectfile.txt. Example project file is added for gui.
See also forum discussion at:
https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=46
Add "Authors" and "License" items to the Help-menu. When selected, these items open simple text file viewer dialog. The AUTHORS and COPYING files are embedded to the executable and shown in the dialog.
The number of threads is now atleast 1.
Added a very simple about dialog with version number and license.
Replaced all CppCheck's with Cppcheck.
Renamed "show more errors" to "show possible false positives" in the menu.
User created application now has to have a name and a path.
Items are now hidden from the tree and the tree is not recreated everytime it is refreshed.
Also added test.cpp as a sample data for GUI testing.
Added Check all and uncheck all buttons to menu to show/hide all errors more easily.