Commit Graph

459 Commits

Author SHA1 Message Date
Daniel Marjamäki 4f76f8f558 Fixed #4606 (GUI: Allows selection of multiple directories then does nothing) 2013-08-21 22:51:33 +02:00
Daniel Marjamäki 0c5e39a813 Library: Added configuration file std.cfg that clients should load. 2013-07-20 17:12:56 +02:00
Daniel Marjamäki bafdb80110 Revert "GUI: Added --std setting for GTK"
This reverts commit 5f5fdab650.

The --std setting for GTK has been removed
2013-07-05 21:53:19 +02:00
Daniel Marjamki 5f5fdab650 GUI: Added --std setting for GTK 2013-06-29 19:40:22 +02:00
Daniel Marjamäki 02fbf15557 Fixed #4855 (GUI: The checking of the file will be interrupted because there are too many #ifdef configurations.) 2013-06-18 14:14:33 +02:00
PKEuS 30bdab5d8d Added support for new code standard options to GUI (#4132) 2013-03-02 04:01:21 -08:00
PKEuS b1b2b9b66b Use standard Qt buttons in LogView. Recreate LogView when changing language (#3647) 2013-03-01 12:07:34 -08:00
PKEuS c4b711c0a7 Improved GUI translation:
- Allow translating texts before before Window is created
-> Translate help text
- Use AboutDialog instead of message box on Windows when starting GUI with -v
2013-03-01 10:11:27 -08:00
PKEuS d9f982443d Ran astyle 2013-02-19 12:39:50 -08:00
Mateusz Pusz 2f47b82090 Storing last path implemented according to received feedback 2013-02-17 19:59:57 +01:00
Mateusz Pusz 7301a3e64d QFileDialog last used paths storage improved 2013-02-17 19:59:56 +01:00
Daniel Marjamäki b660cf89ef astyle formatting 2013-02-10 23:53:01 +01:00
Daniel Marjamäki ea574b0a38 GUI: Enable 'warning' severity implicitly 2013-02-10 23:19:07 +01:00
Daniel Marjamäki e4b8512bc7 GUI: Reverted 'GUI while opening FileDialog now remembers last path used' 2013-02-10 08:15:32 +01:00
unknown 6fdb24b7e7 GUI: Added extra command line parameters for opening a results file and for specifying which folder the results apply to 2013-02-10 07:50:47 +01:00
Daniel Marjamki 318ace7879 astyle formatting 2013-02-09 19:36:48 +01:00
Mateusz Pusz 013de4857c GUI while opening FileDialog now remembers last path used 2013-02-07 18:06:11 +01:00
Daniel Marjamäki 446f326225 GUI: fixed cppcheck-warning for comparing unsigned variable with '<= 0' 2013-02-04 20:38:29 +01:00
Daniel Marjamäki d5dfd5a006 GUI: removed my clumpsy selectfiles dialog. use the standard file selection dialog instead. 2013-01-04 10:23:16 +01:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Frank Zingsheim a24f224a38 Revert "Support for older Qt versions which do not support "setPlaceholderText""
This reverts commit 9784a426f4.

Support for older Qt versions is not desired.
See https://github.com/danmar/cppcheck/pull/31
2012-12-06 22:21:44 +01:00
Frank Zingsheim 9784a426f4 Support for older Qt versions which do not support "setPlaceholderText" 2012-12-04 22:47:47 +01:00
PKEuS 10d338d4a7 Removed unnecessary call to AboutToShowViewMenu() -> Increase constness of MainWindow::SaveSettings() 2012-10-27 12:26:51 +02:00
PKEuS 7ffffdfc16 Optionally display error Id in additional column and details view (#3526) 2012-10-27 11:16:52 +02:00
PKEuS b06cebe9b5 Simplification: Don't call LoadProjectFile with empty filename 2012-10-21 11:40:01 +02:00
PKEuS 70ad457992 New Feature "Scratchpad" added to GUI. (#4166) 2012-10-20 20:14:52 +02:00
PKEuS e7904bd7a8 Rely on on-demand creation of MainWindow::mLogView 2012-10-20 20:05:02 +02:00
PKEuS 4995ab7828 Fixed #4284 2012-10-14 17:40:51 +02:00
PKEuS b0f5b7dce0 Fixed freeze when canceling projectfile dialog when creating a new Project.
Updated gui.pro (forgot it in last commit)
2012-10-14 14:13:54 +02:00
PKEuS b1a768e5ec Cleanup of includes in GUI (Removed redundant includes, use forward declarations) - Build speedup by 3% in VS10 (LINKCORE=yes, Qt 4.8.3) 2012-10-07 12:25:34 +02:00
XhmikosR d69293a929 rename "QT" to "Qt" 2012-09-15 15:24:32 +02:00
Kimmo Varis 6d75cdf7c2 GUI: Don't warn about empty results after re-check.
If user tried to save results after re-checking files and not
getting new results by the re-check, the save was failed since
Cppcheck thought there were no results. This was caused by wrong
clearing of "has results" flag when removing single items from
the results.

Ticket: #4121 (Bogus error message when saving the report)
2012-09-05 22:01:50 +03:00
Daniel Marjamäki 475f12eec3 gui: fixed compiler errors 2012-08-26 08:19:43 +02:00
Kimmo Varis e490852476 GUI: Clear current results before opening XML.
Currently if there were results in the GUI the results from XML
file were imported to list of results. This is confusing and not
what users usually want to do.

This patch makes GUI to clear the results before opening new
results from XML file.

Ticket #3829 (Rename open xml to import xml)
2012-08-02 15:29:55 +03:00
Daniel Marjamäki 87a118cd16 GUI: Recheck changed files. Ticket: #816 2012-02-14 21:16:11 +01:00
Daniel Marjamäki 34105cb17e GUI: Use SelectFilesDialog result if OK button is pressed 2012-01-12 07:51:59 +01:00
Daniel Marjamaki 833f9af107 GUI: give the SelectFilesDialog a parent widget 2012-01-11 06:26:24 +01:00
Daniel Marjamäki fe3d6bf8ea Merge pull request #75 from kimmov/guifixes
GUI fixes + VS 2008 project files update
2012-01-10 13:41:07 -08:00
Daniel Marjamäki fb248ed270 GUI: New experimental dialog for selecting files to check 2012-01-10 22:39:22 +01:00
Kimmo Varis c74e246e9b GUI: Remeber last path where project file was opened from.
It is handy to remember the last location of the opened project file.
Currently the Open Project -dialog was always opened to location of
the executable file. Which is never the correct place. But last
opened project file location might at least be near the location user
wants to open next.

Ticket: #3493 (GUI: remember last path in Open Project File)
2012-01-10 21:40:11 +02:00
Kimmo Varis 362c5f604c GUI: Fix crash opening project file from command line.
The GUI crashed if the project file was tried to open from the
command line. The project file loading was run before the MRU menu
was created but tried to add a new item to it.
2012-01-10 21:16:47 +02:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
Kimmo Varis 314fd25f6e GUI: Disable project MRU items while checking.
Project file can't be opened when the check is running. So the menu
items must be disabled.

Fixes ticket: #3446 (GUI: MRU items must be disabled while checking)
2011-12-28 11:52:18 +02:00
Kimmo Varis 2356e593e0 GUI: Add menu items for selecting standards.
This commit adds menuitems for selecting standards:
 - C++11
 - C99
 - Posix

Fixes tickets:
 #3203 (GUI: Support std=c99)
 #3202 (GUI: Support std=posix)
2011-12-27 22:12:52 +02:00
Kimmo Varis f15729bee2 GUI: Disable platform selection during checking.
Fixes ticket: #3250 (GUI: platform type should not be changeable at runtime)
2011-12-27 12:46:21 +02:00
Kimmo Varis 56212aa9ca GUI: Remove empty/space-only items from MRU list. 2011-12-27 11:46:43 +02:00
Marek Zmysłowski 7c4c0b628b Fixed #3216 (GUI: Crash when cancel is clicked in the New Project dialog) 2011-11-25 07:42:16 +01:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Kimmo Varis 00ae7dbda3 GUI: Move ShowTypes enum to own class and file.
We are using ShowTypes around the GUI codebase so it makes sense
to have it in its own class. And the class also contains related
helper functions instead of scattering them around different
classes.

ShowTypes also contains the visibility settings for all the
GUI severities. Implementation in this commit makes ShowTypes
class to load the visibility settings when it is created. And save
the settings when it is destroyed.
2011-10-11 22:20:36 +03:00
Kimmo Varis 2ff7999baf GUI: Fix enabling/disabling visibilities of errors
When GUI was started not all the categories visibility statuses
were not preserved. I.e.

Ticket: #3087 (GUI does not show all reported files until a filter button state is changed)
2011-10-05 19:50:10 +03:00
Kimmo Varis dbef9b34b1 GUI: In Windows platforms default to Win32 ANSI.
When running in Windows platforms, set the GUI's checked platform
initially to Windows 32-bit ANSI. Other platforms are set
initially to default/unspecified which means the type sizes are
from the platform GUI was compiled on.

This was suggested by Rober in ticket #3119.
2011-10-02 23:45:11 +03:00
Kimmo Varis 56f6204cf7 GUI: Make platforms in GUI more dynamic.
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.
2011-10-02 22:10:05 +03:00
Kimmo Varis 2d483b698f GUI: Add menu-selection for the checked platform.
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)
2011-09-29 22:50:49 +03:00
Kimmo Varis bb5e531c7f GUI: Enable performance- and portability checks.
The CLI/LIB change earlier added own enable-flag for performance-
and portability-checks. This commit updates GUI to also enable
those new enable-flags.
2011-09-04 21:45:52 +03:00
unknown 19b7468bb6 GUI: Fix order of project/global include directories.
Per project include directories must be added to the list before
the global include directories. Include directories are searched
in listed order. So placing per project include directories first
we ensure per project include file is found instead of the global
include file if same file exist in both.
2011-08-26 10:34:01 +03:00
Kimmo Varis 047984ea89 GUI: Fix extra menu separator in File-menu.
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.
2011-08-24 23:14:28 +03:00
Kimmo Varis 1f4e1e0ffe GUI: Check the project after creation.
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.
2011-08-24 22:41:48 +03:00
Kimmo Varis 4998c913da GUI: Rename Ignore-feature to Exclude-feature.
Exclude is the correct term to use when removing paths from the
list of checked items. Ignore as a term was a poor choise to begin
with. XML file reading still recognizes and reads  the 'ignore'
element but writes 'exclude' element.

Ticket: #2995 (GUI: Rename ignore-feature to exclude-feature)
2011-08-23 20:44:04 +03:00
Robert Reif 88b11d889c run astyle 2011-08-22 20:32:35 -04:00
Kimmo Varis b732fc0a3e GUI: Make few strings const strings. 2011-08-22 22:37:38 +03:00
Kimmo Varis c9816c67c5 GUI: Show extraversion in About-dialog.
If the "extra version" is defined (not empty) then it is shown
after the actual version number in the About-dialog.

Ticket: #2164 ([GUI] Add revision info to "About" window)
2011-08-11 18:13:54 +03:00
Kimmo Varis 8676647b03 GUI: Filter toolbar menu items not in synch.
When Filter-toolbar was enabled/disabled from the View-menu its
state was not updated to the context menu. And vice versa.

Ticket: #2923 (GUI: Filter toolbar menu items not synchronized)
2011-07-20 13:35:56 +03:00
Kimmo Varis 3508a79cd6 GUI: Cleanup settings usage.
Use local QSettings instead of the one created by MainWindow.
2011-06-16 16:03:25 +03:00
Kimmo Varis 24061e536b GUI: Give full path when opening project file.
Fix I did yesterday gave only filename of the project file for
function loading project file. Causing the loading failing if
not in "current" directory.
2011-06-08 10:40:17 +03:00
Kimmo Varis f12b27f360 GUI: More strict filtering for finding project file. 2011-06-07 23:56:48 +03:00
Kimmo Varis 8bfbf82bdc GUI: Suggest using project file if one is found.
If we there is project file in the directory to check then ask
user if one wants to use the project file instead. If there are
multiple project files then just tell there are project files
and ask if user wants to continue without using them.

Ticket: #2816 (GUI regression: Interrupted checking because of too many #ifdef configurations.)
2011-06-07 16:12:21 +03:00
Kimmo Varis faa1354445 GUI: Handle missing checked paths in project file.
If the project file does not define paths to check then check the
project root directory (which likely is the directory where the
project file is located).

Ticket #2816 (GUI regression: Interrupted checking because of too many #ifdef configurations.)
2011-06-07 14:29:59 +03:00
Robert Reif 5a27552669 make usre we have a project file before outputting its name 2011-06-06 18:30:44 -04:00
Robert Reif 6a7e4c838f Output GUI project name when checking starts or restarts 2011-06-04 08:38:51 -04:00
Kimmo Varis 056476d28a GUI: Simplify settings usage in Log window. 2011-05-13 10:38:54 +03:00
Kimmo Varis 1002d2e785 GUI: Simplify settings handling in Preferences dialog. 2011-05-13 10:25:52 +03:00
Kimmo Varis 0b0d890bd2 GUI: Remove trailing spaces from translated strings 2011-05-12 21:15:10 +03:00
Kimmo Varis a7b06d9b7e GUI: Remove automatic/silent loading of projects.
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.
2011-05-12 13:53:59 +03:00
Kimmo Varis 97eff37f28 GUI: Handle non-existing projects in MRU list.
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.
2011-05-12 13:30:22 +03:00
Kimmo Varis 04652e75df GUI: Add most recently used projects to menu.
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.
2011-05-12 12:34:23 +03:00
Zachary Blair 79370258df Fixed #2758 ([GUI] Provide a means to filter results based on a search string) 2011-05-03 22:30:54 -07:00
Kimmo Varis 0112b9e150 GUI: Add option for enabling inconclusive checks.
Add new "Advanced" page to preferences-dialog and add there a
checkbox for enabling inconclusive checks. Now that checkbox is
the only control in that new page but there will be more controls
later on.
2011-04-16 18:46:08 +03:00
Kimmo Varis a5c12172f9 GUI: Allow giving project file to command line.
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)
2011-04-07 15:34:15 +03:00
Kimmo Varis f498e53cd2 GUI: Improve the error message for language loading error. 2011-04-04 23:10:02 +03:00
Kimmo Varis 1f7d9145b0 GUI: Have separate setting for editor app path and params.
Currently combined editor application path + params is a bit
problematic (at least in Windows). We really don't know where the app
path ends and parameters start. So proper quoting is not always
possible.

And application path and command line parameters are clearly
different settings anyway. So make them separate settings. It has
bunch of other positive sides too. Like one can now browse new path
for the application without loosing the parameters.

When starting Cppcheck version with these new settings user is warned
that loading settings had problems and asked to check and fix the
settings.
2011-04-02 12:30:16 +03:00
Kimmo Varis 9a5d45a968 GUI: Update online-help to open the HTML manual. 2011-03-26 20:37:28 +02:00
Kimmo Varis 3965a08b7b GUI: Open online-help instead of local help.
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.
2011-03-26 16:06:11 +02:00
Kimmo Varis 46f7a81b7b GUI: Take filtering into use in GUI.
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.
2011-02-28 00:13:28 +02:00
Kimmo Varis 9de4ce8c8e GUI: If project open failed project got invalid.
The project was deleted but not set as NULL when the project
open failed. Fix this by deleting the project only when the
opening succeeds.
2011-02-27 19:09:20 +02:00
Erik Lax eddbfbee1e Fixed: #2572 (GUI: Disable all UI actions on Recheck) 2011-02-11 21:08:37 +02:00
Kimmo Varis e15bc488c9 GUI: Better handling of unknown language loading.
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.
2011-02-08 18:22:44 +02:00
Kimmo Varis fd112fc16e GUI: Store selected language as language code.
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)
2011-02-07 12:30:13 +02:00
Kimmo Varis 7d9f8e1706 GUI: Remove unneeded translation code. 2011-02-06 20:56:04 +02:00
Kimmo Varis eaf0bca8fe GUI: Write XML version 2.
Ticket #2521 (GUI: Add XML format 2 support)
2011-02-04 22:42:43 +02:00
Kimmo Varis 001d382614 GUI: Enable warnings about missing include files. 2011-01-26 23:44:15 +02:00
Kimmo Varis 85a700b496 GUI: Remove Language-menu.
We now have language selection in Settings-dialog.
2011-01-10 00:52:02 +02:00
Kimmo Varis 29d6b443fa GUI: Add language selection panel to settings-dialog.
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).
2011-01-10 00:52:02 +02:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Kimmo Varis b7a3fc4908 GUI: Enable information messages.
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.
2011-01-05 23:33:53 +02:00
Kimmo Varis f150f1ba05 GUI: Add GUI for showing 'portability' warnings.
Add menuitem, icon and toolbar button for portability warnings.
Ticket #2359 (Gui: Show portability warnings).
2010-12-27 11:06:31 +02:00
Kimmo Varis 991318d0de GUI: zero is not valid value for bool type. 2010-12-26 18:37:11 +02:00
Kimmo Varis d367243039 GUI: Allow enabling inline suppressions from the GUI.
Ticket #2342 (inline suppressions not available from the GUI)
2010-12-26 18:29:43 +02:00
Kimmo Varis a73970483d GUI: Add "Information" errors items to menu and toolbar. 2010-12-26 15:23:55 +02:00
Kimmo Varis 31c974c954 GUI: Add Information-severity support. 2010-12-26 15:23:54 +02:00
vBm 46a11183a5 Fixed some spelling mistakes 2010-12-15 18:45:53 +01:00
Kimmo Varis 8e8e1d1d72 GUI: Collect statistics about amount of different severities.
Add new class for collecting statistics per each error severity. Add
a new tab to Statistics-dialog for these numbers.
2010-11-30 22:50:57 +02:00
Kimmo Varis 14ee95eab7 GUI: Cleanup duplicate code. 2010-11-26 22:51:38 +02:00
Kimmo Varis 2dfa1d540e GUI: Add Setting for global include paths.
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.
2010-11-26 22:35:45 +02:00
Kimmo Varis 458af3c931 Merge branch 'error-details'
Conflicts:
	gui/resultstree.h
	gui/resultsview.cpp
2010-11-24 17:24:36 +02:00
Zachary Blair 6b9d9188c9 Fixed #1861 (GUI: Allow hiding error) Disabled menu item when not applicable 2010-11-24 00:48:07 -08:00
Kimmo Varis f1b511a366 GUI: Remember main window splitter state.
Save and restore the vertical splitter state (sizes of tree view and
details panel).
2010-11-23 21:57:16 +02:00
Zachary Blair a16c0dbd5e Fixed #1861 (GUI: Allow hiding error) 2010-11-21 10:55:34 -08:00
Kimmo Varis bee8d15848 GUI: Add support for warning and performance -error types. 2010-10-18 20:50:34 +03:00
Kimmo Varis c0d1bfeedf GUI: use new style API to enable style checks. 2010-09-06 23:28:41 +03:00
Zachary Blair 15b4cab4bb Fixed #1934 (GUI: Add checking info display) 2010-08-31 23:33:19 -07:00
Kimmo Varis b0fa7bfd8c GUI: Add option to show debug warnings in checking log. 2010-08-29 09:38:03 +03:00
Kimmo Varis 20a4f1e195 GUI: Output debug errors to log view.
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)
2010-08-28 20:37:21 +03:00
Kimmo Varis 35afc4c63f GUI: Disable debug warnings for now. 2010-08-28 09:21:25 +03:00
Kimmo Varis 11e073cf99 GUI: Fix compiling. 2010-08-28 09:16:01 +03:00
Daniel Marjamäki 4d6b7bea2e GUI: some fixes of help
* 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
2010-08-25 20:08:07 +02:00
Kimmo Varis c0c4d18120 GUI: Disable project opening while checking files. 2010-08-25 20:59:30 +03:00
Kimmo Varis b6bef44f61 GUI: Fix enabling project closing action.
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.
2010-08-25 18:54:45 +03:00
Kimmo Varis 28996bd9c1 Fixed #1978 (Fix compiler warnings in GUI (MainWindow::mExiting’ will be initialized after...)) 2010-08-25 00:56:45 +03:00
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
Kimmo Varis 0a372a4727 Fix GUI compile error on Linux. 2010-02-23 19:09:05 +02:00
Kimmo Varis 279e66a1d6 Open HTML help from Help-menu in Windows. 2010-02-23 17:50:59 +02:00
Kimmo Varis e38694ccfc Remove some excessive empty lines. 2010-02-23 14:34:51 +02:00
Kimmo Varis 0186d59cbe Fixed #1229 (GUI: project file not read when checking a file) 2010-01-06 11:34:02 +02:00
Kimmo Varis e1b30721cd Fixed #1226 (GUI: project include file relative path search problem)
Thanks for Robert Reif for finding and reporting problem in previous commit.
2010-01-06 03:15:56 +02:00
Kimmo Varis 5bb3c5898b Fixed #1226 (GUI: project include file relative path search problem) 2010-01-06 01:40:26 +02:00
Daniel Marjamäki e1ed22aa2b Fixed #1187 (GUI: fix project file loading) 2010-01-03 08:39:00 +01:00
Reijo Tomperi 74cefb7f3a Fix #981 (GUI saves report with wrong extension)
Apply patch from robertreif
http://sourceforge.net/apps/trac/cppcheck/ticket/981
2009-11-20 00:19:44 +02:00
Daniel Marjamäki 5616a9569e gui: fixed compiler error 2009-11-15 17:47:23 +01:00
Reijo Tomperi 1ee28ba444 Refactoring: Make Cppcheck::version() static
Update codeblocks projectfile
2009-10-25 22:06:58 +02:00
Daniel Marjamäki d4f706e040 fixed qmake building with new folder structure 2009-10-25 19:29:10 +01:00
Daniel Marjamäki fa14dcbf68 fixed compiler error when building gui 2009-10-17 11:34:17 +02:00
Reijo Tomperi 8e0f868a5e Fix #455 (Recheck is enabled when no previous results available)
http://sourceforge.net/apps/trac/cppcheck/ticket/455
2009-10-13 11:19:00 +03:00
Reijo Tomperi fdde2182b9 Fix GPL comments in all files. ">." was missing from the end. 2009-09-27 18:08:31 +03:00
Kimmo Varis f6d2445e16 Add 'possible style error' severity for the GUI.
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.
2009-08-02 15:00:22 +03:00
Kimmo Varis 4da5679737 GUI: Use native path separators in main window caption. 2009-08-02 14:08:04 +03:00
Vesa Pikki 962757c257 Added support for checking files via commandline arguments. 2009-07-16 08:20:29 +03:00
Kimmo Varis 635acfa2ab GUI: Remove security-category.
The security-category was removed from core in commits 03f3ee62a0 and 11bc5195b8.
2009-07-13 16:47:38 +03:00
Daniel Marjamäki 11bc5195b8 cleanup: continued with the removing of the security. Some more work is needed but now everything compiles and runs at least. 2009-07-12 22:21:49 +02:00
Kimmo Varis 58c21dde1c GUI: Add new CSV report type.
CSV files are handy (and commonly used) to export/import data to other programs. CSV reports allow easy import of cppcheck error data to other programs for further processing.
2009-07-06 12:30:49 +03:00
Reijo Tomperi 8b0e481d46 Refactoring: Rename member functions to follow naming guidelines. 2009-07-05 23:16:43 +03:00
Reijo Tomperi 6e378615cf astyle fix 2009-07-04 15:54:28 +03:00
Vesa Pikki d5762b8003 Merge branch 'master' of git@github.com:danmar/cppcheck 2009-07-04 11:07:23 +03:00
Vesa Pikki e656c951e5 Settings are now saved before window has closed.
This enables us to check if toolbar is visible or not. Earlier
we saved settings after the window was closed and checking for
toolbar visibility was not feasible anymore.
2009-07-04 11:06:29 +03:00
Kimmo Varis 462117485d GUI: Read include directories from project file. 2009-07-04 01:38:47 +03:00
Kimmo Varis f1847e736d GUI: Further improve error message for lang file not found.
Not being able to switch language is critical error, not just warning. Also show full file name (with extension) of the file not found.
2009-07-03 17:20:54 +03:00
Kimmo Varis 71eaf8f58f Remove unused variable. 2009-07-03 10:56:08 +03:00
Vesa Pikki 7a4115236a TranslationHandler now suggests a language based on sysytem locale.
Also made sure toolbar visibility is updated before saving settings.
2009-07-02 23:41:37 +03:00
Vesa Pikki 27d630f58d Disabling progressbar if stop button is pressed.
This actually had no visible effect on KDE.
2009-07-02 20:23:44 +03:00
Vesa Pikki 8f516a5638 Checks if toolbar is closed when opening view menu.
Basically just reverted back Kimmo's code that was lost in merge.
2009-07-02 20:13:22 +03:00
Vesa Pikki 7e043b182d Fileview dialogs now use Qt Designer ui files.
Translation also updated.
2009-07-02 19:46:26 +03:00
Vesa Pikki 7d2c26bd25 Merge branch 'master' of git@github.com:danmar/cppcheck
Conflicts:
	gui/mainwindow.cpp
2009-07-02 19:16:50 +03:00
Vesa Pikki e973f9653b Settings dialog and application dialog now use Qt Designer ui files. 2009-07-02 19:14:12 +03:00
Kimmo Varis df7ca21a31 Astyle fixes. 2009-07-02 18:57:09 +03:00
Vesa Pikki 1daba9e913 Error types are now translated aswell. 2009-07-02 13:48:32 +03:00
Vesa Pikki 4206a9d218 Toolbar can now be hidden.
Treeview's headers will now be translated when language changes.
2009-07-02 11:46:26 +03:00
Vesa Pikki ebfa55b1c3 Began adding translations and using Qt Designer .ui files.
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
2009-07-02 11:33:28 +03:00
Kimmo Varis b245b7a832 GUI: Do not make settings names translatable.
Having translated settings names is a bad idea. If user changes GUI language one loses settings. Also settings might be exported/imported and translated names might not work between systems/users.
2009-07-02 02:02:34 +03:00
Kimmo Varis c79d50a710 GUI: Remember standard toolbar visibility (add it to settings). 2009-07-02 00:05:09 +03:00
Kimmo Varis 4644f8b841 GUI: Add View-menu item to show/hide standard toolbar. 2009-07-01 23:46:42 +03:00
Kimmo Varis 64f304684f GUI: Remove GUI for showing unused functions.
Implements ticket #443 (Remove checking of unused functions from GUI) https://sourceforge.net/apps/trac/cppcheck/ticket/443
See also ticket #434
https://sourceforge.net/apps/trac/cppcheck/ticket/434
2009-06-27 10:41:30 +03:00
Kimmo Varis 64f88f147c GUI: Disable checking unused functions.
Implements ticket #443 (Remove checking of unused functions from GUI)
https://sourceforge.net/apps/trac/cppcheck/ticket/443
See also ticket #434
https://sourceforge.net/apps/trac/cppcheck/ticket/434
2009-06-27 10:30:32 +03:00
Kimmo Varis e3271115f2 GUI: Add checked directory path to main window caption. 2009-06-22 18:45:48 +03:00
Kimmo Varis 1aafeebe7b GUI: Add support for project files.
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
2009-06-22 11:57:17 +03:00
Kimmo Varis dc75761856 GUI: Don't allow to open Settings-dialog while checking. 2009-06-21 00:03:59 +03:00
Kimmo Varis 7c50e74b95 GUI: Rename Check all/Uncheck all View-menu items to Show all/Hide all.
It is not obvious for user what those items do and after all it is about showing/hiding all items.
2009-06-20 23:52:54 +03:00
Kimmo Varis 2adfd3607d GUI: Enable clearing/saving results also if there are only hidden results.
This commit fixes a bug in my earlier commit that only checked visible results.
2009-06-20 23:42:12 +03:00
Kimmo Varis 71aa189efb GUI: Notify user the compare is ready if main window is inactive. 2009-06-20 23:23:54 +03:00
Kimmo Varis 5643d816cf GUI: Clear results from view before starting new compare.
Strictly speaking this is not necessary but it is the easiest way to set the GUI state to "no results"-state.
2009-06-20 23:13:08 +03:00
Kimmo Varis 0792d89a6b GUI: Disable result cleaning and saving during the checking. 2009-06-20 23:05:17 +03:00
Kimmo Varis 2eff269e60 GUI: Make ThreadHandler class part of object tree. 2009-06-20 19:55:23 +03:00
Kimmo Varis a19c9861da GUI: Use native file selection dialog when selecting report file. 2009-06-18 00:34:22 +03:00
Kimmo Varis 071c79c5cb GUI: Use native dialogs in Windows for check file/directory selection. 2009-06-17 22:35:24 +03:00
Kimmo Varis 195880807e GUI: Refactor menu and toolbar creation to own methods. 2009-06-15 00:48:16 +03:00
Reijo Tomperi 0966a2fbd4 astyle fix 2009-06-14 23:22:19 +03:00
Vesa Pikki 3b73fc6494 Made License and Authors dialogs a bit bigger. 2009-06-14 19:24:00 +03:00
Kimmo Varis 801a241e0b GUI: Show authors list and license in simple text file view dialog.
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.
2009-06-14 12:57:43 +03:00
Reijo Tomperi 9ea80b4d74 Fix ticket #397 (xml output doesn't encode " and & -characters as it should)
http://sourceforge.net/apps/trac/cppcheck/ticket/397
2009-06-12 22:02:01 +03:00
Vesa Pikki 799252e8f2 Force extension to the file and check save type by filter and not by filename. 2009-06-12 21:22:45 +03:00
Vesa Pikki 398c81f4a8 Force progressbar to be visible when checking starts. 2009-06-09 11:21:17 +03:00
Vesa Pikki b67424785f Added messagebox to inform user about not found/non visible errors. 2009-06-09 10:51:27 +03:00
Vesa Pikki de0bea3479 Merge branch 'master' of git@github.com:danmar/cppcheck 2009-06-09 09:31:54 +03:00
Vesa Pikki 814cd37c90 Added some warning messageboxes.
One for when user tries to double click and there are now applications specified.
Another for when user tries to check something and the file list is empty.
2009-06-09 09:30:28 +03:00
Kimmo Varis 13eb74173c GUI: Make mainwindow parent of Settings-dialog. 2009-06-06 12:51:14 +03:00
Kimmo Varis c9ceccfd3d GUI: Prevent exiting the application while checking. 2009-06-04 17:02:35 +03:00
Kimmo Varis d5a5df7fe6 GUI: Add About-dialog.
Replace messagebox containing about-text with dialog. About-dialog must contain copyright information.
2009-06-04 15:35:41 +03:00
Kimmo Varis 62741bfd4a Remove some empty lines. 2009-06-04 13:07:21 +03:00
Vesa Pikki a330e9c35f Added the initial version of saving results to a file. 2009-06-03 21:18:22 +03:00
Kimmo Varis 027c31f39c GUI: Implement stopping the compare.
Threads must be exited from check cleanly even though it takes small amount of time. Just terminating thread can have unpredictable side-effects (even weird crashes).
2009-06-02 02:01:53 +03:00
Kimmo Varis 0178fed611 GUI: Add Collapse/Expand all -items to View-menu. 2009-06-02 01:26:44 +03:00
Reijo Tomperi 58eda6e978 Fix ticket #325 (Replace developer names in source files with AUTHORS file)
http://apps.sourceforge.net/trac/cppcheck/ticket/325
2009-05-30 08:48:12 +03:00
Kimmo Varis 44e5985fe5 GUI: Add separator in View-menu before check/uncheck all. 2009-05-28 18:10:09 +03:00
Kimmo Varis 04226295a0 GUI: Use PNG icon instead of SVG icon for Check directory -action. 2009-05-28 16:30:44 +03:00
Kimmo Varis d73ab89c93 Add icon files to resource file.
Having resource files compiled in the executable makes installing the application easier (especially on Windows).
2009-05-28 11:32:32 +03:00
Vesa Pikki 4f41adf45e Astyle formatting. 2009-05-26 18:23:06 +03:00
Vesa Pikki 76c7290e12 Added 22x22 icons from http://tango.freedesktop.org.
Also added icon source to AUTHORS file.
Also added toolbar with the default actions.
Added icons to result files and errors.
2009-05-26 18:21:39 +03:00
Vesa Pikki 9bb0cff511 Astyle formatting. 2009-05-24 11:55:54 +03:00
Vesa Pikki de0dd0a2bb Fixed issues pointed out by Reijo.
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.
2009-05-24 11:53:29 +03:00
Vesa Pikki 2b7bf671d7 Now starts the default application by double clicking the error. 2009-05-23 18:45:05 +03:00
Vesa Pikki 70c32c10e4 Added the initial version of opening a error with user specified application. 2009-05-23 14:26:04 +03:00
Vesa Pikki 78d4318c5e Added the ability to add/remove/modify applications to open errors with.
Only the list of applications added, errors cant be opened yet.
2009-05-23 13:37:30 +03:00
Vesa Pikki f0a26b3ffe Results tree now uses only QStandardItemModel for data storage.
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.
2009-05-23 11:17:27 +03:00