241 Commits

Author SHA1 Message Date
Kimmo Varis
8731b3efdd Fixed #1977 (GUI crashes when checking a 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.
2010-08-25 00:47:05 +03:00
Kimmo Varis
ce0f65e761 GUI: Fix for loading "oldstyle" project file. 2010-08-24 20:50:25 +03:00
Kimmo Varis
4ccdcf0fc2 Merge remote branch 'remotes/kimmo/loadable-project'
Conflicts:
	gui/gui.qrc
	gui/mainwindow.cpp
	gui/mainwindow.h
2010-08-24 20:37:51 +03:00
Kimmo Varis
f2e3090a83 GUI: Fix bug that same defines were added to list several times. 2010-08-21 22:59:55 +03:00
Kimmo Varis
2f063ad775 GUI: Use rootpath from Project file.
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.
2010-08-21 19:38:51 +03:00
Daniel Marjamäki
65c5b9906e GUI: Fixed help window leaks and made sure it is closed when the gui is closed 2010-08-21 11:02:52 +02:00
Daniel Marjamäki
06b9cdb679 GUI: Updated online-help. This is still under work. 2010-08-20 21:25:43 +02:00
Daniel Marjamäki
1d0debddef astyle formatting 2010-08-20 19:31:23 +02:00
Kimmo Varis
5a65f4d55d GUI: Prevent opening new files or directories when project file loaded. 2010-08-19 22:28:56 +03:00
Kimmo Varis
2da6a242d2 GUI: Set current directory when loading a project file. 2010-08-19 22:06:45 +03:00
Daniel Marjamäki
2fea5f01d6 GUI: quick fix for #1957 (Unable to compile gui.pro with Qt Creator in Windows) 2010-08-19 18:21:42 +02:00
Kimmo Varis
aef0aeb974 GUI: Set project filename to main window caption.
When project file is closed the caption is emptied.
2010-08-17 18:06:17 +03:00
Kimmo Varis
d4210f4fc0 GUI: Leave new project file open and selected.
When user creates new project file one probably wants to keep using
the same project file. So leave it open for use.
2010-08-15 22:51:15 +03:00
Kimmo Varis
0f4d067926 GUI: Add menuitem to edit open project file.
Earlier we opened project file only for editing. But now that we
really use project files we need separate feature for editing
them.
2010-08-15 16:12:32 +03:00
Kimmo Varis
ab1aaf9a45 GUI: Add menuitem to close open project file. 2010-08-15 12:12:28 +03:00
Kimmo Varis
c98d398398 GUI: Open project file and check contained 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.
2010-08-15 11:35:46 +03:00
Kimmo Varis
737ca1a968 Fix filenames starting with capital letters.
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.
2010-08-11 17:22:39 +03:00
Ettl Martin
653b5f37b8 gui: fixed regression du to case sensitifity of Linux 2010-08-10 23:04:59 +02:00
Kimmo Varis
2a294babc3 GUI: Use canonical path as checking path.
Cleanup the path name before starting checking and saving it.
2010-08-10 18:13:53 +03:00
Kimmo Varis
7dbe5b547a GUI: Implement FileList class to handle list of files 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.
2010-08-10 18:13:53 +03:00
Kimmo Varis
50b41a25de Fixed #1870 (Wrong path in report)
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.
2010-07-18 13:00:39 +03:00
Kimmo Varis
0b463dadb9 GUI: Close application cleanly when exiting while 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.
2010-07-17 23:52:50 +03:00
Kimmo Varis
de767a7cf1 GUI: Remember log view size. 2010-07-16 23:27:57 +03:00
Kimmo Varis
7e88d7b41d GUI: Add simple log view.
Adding a simple log view which shows log messages the core code
emits.
2010-07-16 17:48:13 +03:00
Kimmo Varis
f5024a7f67 Fixed #1853 (GUI: Allow closing gui.exe while checking)
The GUI now asks if user wants to stop the current checking and exit
the application.
2010-07-16 12:44:11 +03:00
Kimmo Varis
b92f7b854a GUI: Disable Project file menu items when checking. 2010-07-13 12:46:28 +03:00
Kimmo Varis
4a1708013e GUI: Rename project file related methods in mainwindow. 2010-07-13 12:33:24 +03:00
Daniel Marjamäki
414dbdb295 Merge branch 'master' into projfile-gui 2010-07-13 07:49:17 +02:00
Kimmo Varis
bf1b49b370 GUI: Add Project class to handle project files and projects.
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.
2010-07-12 20:21:45 +03:00
Kimmo Varis
75f6ca5b66 GUI: Disable opening XML report file when checking files. 2010-07-12 02:18:26 +03:00
Kimmo Varis
1504747030 Merge branch 'master' into projfile-gui
Conflicts:
	gui/cppcheck_de.ts
	gui/cppcheck_en.ts
	gui/cppcheck_fi.ts
	gui/cppcheck_nl.ts
	gui/cppcheck_pl.ts
	gui/cppcheck_ru.ts
	gui/cppcheck_se.ts
	gui/gui.pro
	gui/main.ui
2010-07-11 19:43:31 +03:00
Kimmo Varis
5e14abf735 GUI: Read errors from report XML file.
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.
2010-07-10 16:37:36 +03:00
Kimmo Varis
25a9c75287 GUI: Allow creating new project file.
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.
2010-07-08 18:59:06 +03:00
Kimmo Varis
34d0ff73d8 GUI: Add dialog for editing project file.
This commit adds the dialog and code that reads the project file data
to the dialog. The changed data is not yet saved back to the file.
2010-07-07 21:18:42 +03:00
Kimmo Varis
f60a469932 Fixed #1831 (GUI: no progress bar when rechecking files)
Need to initialize the checking also when rechecking.
2010-07-07 12:25:47 +03:00
Kimmo Varis
643d400716 GUI: Refactoring progress/finished handling.
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.
2010-07-04 18:54:41 +03:00
Kimmo Varis
5aadf242d7 GUI: Remove code for automatic deallocated classes.
Project file code still read the list of automatically deallocated
classes from project file. That feature hasn't been supported in
few last releases.
2010-07-04 00:15:19 +03:00
Kimmo Varis
77a34643e2 GUI: Refactoring toolbar member names to be more consistent. 2010-07-03 20:03:53 +03:00
Kimmo Varis
3f04aebf7c GUI: Add View-menu item for showing/hiding Categories-toolbar. 2010-07-03 19:37:09 +03:00
Kimmo Varis
c5a3b306e4 GUI: Rename main toolbar in code. 2010-07-03 13:11:38 +03:00
Kimmo Varis
5d55bc0581 GUI: Remove remains of "possible error". 2010-07-03 12:58:56 +03:00
Kimmo Varis
35e655590c GUI: Remove remains of "all style".
Earlier "all style" was just removed as menu item but all the code related
was left in place. This commit actually removes the now unneeded code.
2010-07-03 11:48:25 +03:00
Robert Reif
1207531c21 Fixed #1698 (Add define support to GUI) 2010-05-20 07:22:19 +02:00
Daniel Marjamäki
c52d7fbb22 Fixed #1689 (failed to build gui) 2010-05-17 20:05:41 +02:00
Daniel Marjamäki
c718a7c595 astyle: Update to astyle 1.24 2010-04-15 20:08:51 +02:00
Reijo Tomperi
35d2a27b9c Update copyright year in all source files 2010-04-13 22:23:17 +03:00
Daniel Marjamäki
d7db82293e gui: removed options for possible error/style 2010-04-10 15:32:22 +02:00
Daniel Marjamäki
0cad22314e Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup. 2010-04-02 07:30:58 +02:00
Martin Ettl
193aa7d1d3 astyle fix 2010-04-02 02:21:53 +02:00
Kimmo Varis
d1bbcf1734 Implement Win32 FileLister as separate class.
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.
2010-03-11 21:58:59 +02:00