Commit Graph

625 Commits

Author SHA1 Message Date
Greg Hewgill 6d858b63a1 Report percentage complete based on file size
This patch makes the (reasonable) assumption that the total size of all checked
files fits in a 'long' type.
2011-04-26 22:26:23 +12:00
Kimmo Varis f240574107 Modify the Cppcheck class to check one file at a time.
Unify usage and API of CppCheck class. Allow only one file checked
at a time, instead of list of files. Clients can then handle file
lists more naturally and as they see fit. Also clients have better
knowledge of how checking status should be handled.

The single-threaded CLI checking was only one using the file list.
Other clients were giving files (to list) one file at a time.
2011-04-24 19:17:52 +03:00
Kimmo Varis 173a3871c2 GUI: Move internal error option to Advanced-tab. 2011-04-16 18:55:53 +03:00
Kimmo Varis ee623e4fcd GUI: Update translation files. 2011-04-16 18:46:08 +03: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 f9c97c7b56 GUI: Add support for inconclusive errors.
This is the first (and quick) support for the inconclusive errors.
We simply add [Inconclusive] to begin of the summary. This is
temporary solution until better GUI is implemented. XML v1 won't
be supporting inconclusive errors. For XML v2 we need still to
decide what to do.
2011-04-16 14:07:33 +03:00
Markus Elfring 0d76d87770 Merge branch 'master' of git://github.com/danmar/cppcheck 2011-04-07 16:55:47 +02:00
Kimmo Varis 1752cb62dc GUI: Print command line help with -h and --help. 2011-04-07 16:07:55 +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
Markus Elfring 6cd0c2f1b3 Addition of Spanish translation in the GUI CMake script
A file name was added to the GUI CMake script for the Spanish translation.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-04-06 17:06:23 +02:00
Kimmo Varis a5540e8548 GUI: Sort language files in project file. 2011-04-06 09:56:26 +03:00
Kimmo Varis 6aabc79d49 GUI: Update translation files.
Adding new Spanish translation added one new translatable string
and changed linenumbers in one file.
2011-04-06 09:53:15 +03:00
Lauri Nurmi 8a4507cc55 GUI: Add Spanish translation.
Patch to add loading Spanish translation to GUI.

Ticket #2545 (cppcheck translated in spanish language)
2011-04-06 09:49:17 +03:00
Kimmo Varis c95ff88272 GUI: Add Spanish translation.
Add Spanish GUI translation contributed by
qcondor@users.sourceforge.net.

Ticket #2545 (cppcheck translated in spanish language)
2011-04-06 09:29:13 +03:00
Kimmo Varis e006087a38 GUI: update translation files. 2011-04-06 09:12:09 +03:00
Daniel Marjamaki aa96fdfeb3 gui: removed obsolete strings in the swedish translation 2011-04-05 21:29:48 +02:00
Daniel Marjamaki 0f13f4abe4 gui: updated swedish translations 2011-04-05 21:27:03 +02:00
Kimmo Varis f498e53cd2 GUI: Improve the error message for language loading error. 2011-04-04 23:10:02 +03:00
Kimmo Varis eac3a8c86c GUI: Project file cleanup. 2011-04-04 14:18:28 +03:00
Kimmo Varis dcfc7aa3f0 GUI: Don't show error when no application added.
I earlier added a check for missing (editor) application command
line parameters. If parameters are missing at GUI startup an
message is shown to user to check the settings. Unfortunately
my check was incomplete and it also triggered when there was no
applications defined. Which happens when user starts GUI for a
first time.

Fix the check so that user is only informed in case the parameters
are missing and name + path are set.
2011-04-04 11:16:53 +03:00
Kimmo Varis 820e1697cc GUI: Improve the Application dialog layoyt.
In GNOME the whole big text area was not shown without making the
dialog bigger. So improve the layout for better scaling and adjust
dialog size when it gets initialized.
2011-04-04 11:00:09 +03:00
Kimmo Varis cfd570e1f3 GUI: Fix setting application path as name.
The application dialog initialized name field with path.
2011-04-04 10:23:43 +03:00
Kimmo Varis 9182b8be19 GUI: Fix gui.pro EOL style. 2011-04-02 20:16:18 +03:00
Kimmo Varis 33f743875b GUI: Add new files to CMake build file. 2011-04-02 16:58:53 +03:00
Kimmo Varis 68a28ab9b9 GUI: Modify ApplicationDialog to get/return Application class. 2011-04-02 16:30:50 +03:00
Kimmo Varis 91345234e0 GUI: Refactoring application definition.
Using Application class as method parameters instead of separate
application attributes.
2011-04-02 16:30:47 +03:00
Kimmo Varis f82021d643 GUI: Improving application handling code.
Only allow access to Application's attributes through accessor
methods.
2011-04-02 16:30:46 +03:00
Kimmo Varis 3cb3992043 GUI: Move application definition to own header file. 2011-04-02 16:30:46 +03:00
Kimmo Varis b0dbb545c9 GUI: Update translation files. 2011-04-02 12:36:37 +03:00
Kimmo Varis 292984db39 GUI: Simplify handling applications with spaces in paths.
Earlier user had to add quotation marks around application executable
path in application dialog. Because we could not determine which part
is path and which part is parameters. As we now have separate
variables we can automatically add the quotation marks when needed
before starting the application. This reduces the confusion users
have had about the correct formatting of paths.
2011-04-02 12:30:21 +03:00
Kimmo Varis 95e38c2cd5 GUI: Update/fix application dialog texts.
I forgot to update the dialog texts when adding the parameters field.
2011-04-02 12:30:17 +03:00
Kimmo Varis 62cd07b52e GUI: Add accel keys for application dialog and fix tab order. 2011-04-02 12:30:16 +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
Markus Elfring ccf1282c91 Deletion of "htmlhelp" from link setting in a CMake script (bug #2524, #1957)
The library "htmlhelp" is not needed by the graphical user interface at the moment.
2fea5f01d6 (gui)/gui.pro

There are difficulties to fulfil this dependency.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-03-28 09:03:04 +02:00
Markus Elfring db84b3d0e7 Renaming of the file for the Swedish translation in a CMake script (bug #2524)
A translation file was renamed to use the correct ISO-639 name.
03bd4fa463 (gui)/gui.pro

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-03-26 20:57:55 +01:00
Markus Elfring 87d85cd89e Renaming of the GUI executable to "cppcheck-gui" in a CMake script (bug #2524)
The executable file for the graphical user interface was renamed in a CMake
script to synchronise this setting with the qmake build specification.
b88ce77e4a (gui)/gui.pro

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-03-26 20:55:08 +01:00
Kimmo Varis 9a5d45a968 GUI: Update online-help to open the HTML manual. 2011-03-26 20:37:28 +02:00
Daniel Marjamaki c6b176014b cmake: removed the non-working pcre. ticket: #2679 2011-03-26 19:03:11 +01:00
Kimmo Varis aab1b996ab GUI: Remove help viewer files from CMake build. 2011-03-26 17:52:08 +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
Sebastien Debrard 29b7d4b9c3 sync cmake files with the master branch 2011-03-26 02:03:52 +01:00
Markus Elfring 9301ee28a8 Added CMake files 2011-03-25 07:14:53 +01:00
Kimmo Varis 056f8b3a52 GUI: Update translation files. 2011-03-20 16:24:14 +02:00
Kimmo Varis 03bd4fa463 GUI: Rename Swedish translation file.
Ln pointed out in IRC that 'se' is not ISO-639 name of the Swedish,
but 'sv' is. So rename the translation file to use the correct
ISO-639 name. This wrong name also probably caused the GUI not
recognizing Swedish locale of the OS.
2011-03-20 16:24:14 +02:00
Kimmo Varis c34a129102 GUI: Update About-dialog copyright year to 2011. 2011-03-08 08:59:52 +02:00
Kimmo Varis d8ced1dbb1 GUI: Initialize Severity in ErrorItem constructor. 2011-03-07 23:43:59 +02:00
Kimmo Varis d9efd53033 GUI: Add back translation of severity texts.
Translation of severity texts was temporarily disabled by earlier
commits. Now adding new method to ResultsTree for getting
translated severity string.
2011-03-07 23:35:58 +02:00
Kimmo Varis 0d27966eb8 GUI: Update more severity conversion methods. 2011-03-07 23:11:59 +02:00
Kimmo Varis 5bf98447c9 GUI: Make Severity to ShowType use enum values.
Continue converting Severity use in GUI from QString to enum
values.
2011-03-07 22:36:47 +02:00
Kimmo Varis d2c06501d9 GUI: Convert severity in ErrorLine to enum value.
This commit continues converting severity in GUI to enum.
2011-03-07 21:20:09 +02:00
Kimmo Varis 7c589384d2 GUI: Use severity enum in ErrorItem.
Convert from using string to enum values for severity in ErrorItem.
Storing and handling severity as string was the easy way earlier
but it is not convenient or efficient way to handle severities.
This commit is the first step in converting severity handling to
use the enum values instead of strings.
2011-03-07 21:10:30 +02:00
Daniel Marjamäki a2d2d93958 astyle formatting 2011-03-01 17:58:15 +01:00
Kimmo Varis 81318bb4a1 GUI: Fix compiling. 2011-02-28 17:41:52 +02:00
Kimmo Varis 1c4e9c662b GUI: Show native path separators.
Show native path separators in project file-dialog. Convert paths
to internal separators when reading from project file and when
reading from the dialog. Convert to native separators when adding
to the dialog (for the user).
2011-02-28 17:18:14 +02:00
Kimmo Varis b1db29278d GUI: Update project file description file. 2011-02-28 16:31:46 +02:00
Kimmo Varis 819dddf570 GUI: Add path separator for ignore dirs. 2011-02-28 16:24:18 +02:00
Kimmo Varis ae11b064c8 GUI: Small cleanup for projectfile code. 2011-02-28 16:21:03 +02:00
Kimmo Varis fb74da7fbf GUI: Fix bug mixing include and ignore dirs in GUI. 2011-02-28 16:18:16 +02:00
Kimmo Varis 6fc90d1f18 GUI: Write ignore paths to project file. 2011-02-28 16:08:14 +02:00
Kimmo Varis bd405c454a GUI: Add GUI for ignored paths in project files.
Add similar GUI than include paths has. Currently there is only
possibly select directories directly from the GUI. But filename
can be added to the path by editing it.
2011-02-28 15:58:44 +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
Kimmo Varis e81fa46699 GUI: Convert some projectfile method arguments const. 2011-02-27 18:53:57 +02:00
Kimmo Varis d6f6da10fa GUI: Add ignored paths support to project file.
This patch adds support for ignored paths in the project file.
There is new <ignore> element which can contain one or more
<path> elements with name attribute containing the path to
ignore.
2011-02-27 18:32:53 +02:00
Kimmo Varis a80a38e25c GUI: Update translation files. 2011-02-26 13:23:06 +02:00
Kimmo Varis cf4a73eb80 GUI: Use list to manage paths in project file.
Handling paths in line edit control is quite hard. List control is
much more pleasant to use for it. Convert Project file path
handling to similar list control usage than include paths earlier.
2011-02-26 13:18:11 +02:00
Kimmo Varis d1d0706154 GUI: Edit project's include directories as list.
Editing include directories in edit control is not nice. Instead
add new tab and list control for the include directories. They
are now added, edited and removed like global include directories
in settings dialog.
2011-02-25 20:34:55 +02:00
Kimmo Varis ece896a13d GUI: Fix for initializing default application. 2011-02-25 18:01:23 +02:00
Kimmo Varis 74c85b6b70 GUI: Select the default application in app list. 2011-02-25 13:15:53 +02:00
Kimmo Varis 166e5248db GUI: Rename methods.
We don't need the 'type' postfix. We are handling applications,
not application types.
2011-02-25 13:07:42 +02:00
Kimmo Varis e6e616e542 GUI: Fix opening error item with default app. 2011-02-25 12:16:20 +02:00
Kimmo Varis 085034ddf7 GUI: Fix for removing application.
The default application was not handled correctly when removing
application from the list. If the default application is removed
then we reset the default application to unknown. Otherwise we
make sure the default application is correct after the removal of
other application.
2011-02-25 12:04:10 +02:00
Kimmo Varis eabec80154 GUI: Show default application with [Default] text.
Instead of keeping the default application as a first item in
the application list point the default application by adding a
"[Default]" text after its name.
2011-02-25 11:45:04 +02:00
Kimmo Varis b7aa14f0e8 GUI: Improve edit application setttings dialog.
Make the editor application settings dialog to look similar than
include paths dialog. Move buttons right to the list, not below.
And remove unnecessary "application" word from button texts.
Rename Modify-button to Edit-button since we are not modifying
the application but editing its info. Similarly rename Delete-
button to Remove-button since we are not deleting the application
but removing from the list.
2011-02-25 09:43:07 +02:00
Kimmo Varis dd717427e1 GUI: Rename method.
SettingsDialog::PopulateListwidget() was a bit confusing name as
there are more than one list widgets already in settings-dialog.
2011-02-25 09:24:29 +02:00
Kimmo Varis 51eee5f3a7 GUI: Add list control for include paths.
Instead of hard-to-use single line edit control, use list control
for include paths. Have separate buttons for adding, editing and
removing paths. Paths are still stored as one string where paths
are separated with ";". Empty paths are ignored.
2011-02-24 22:12:15 +02:00
Greg Hewgill c3fe6f80da fix CppCheck constructor to allow gui to compile 2011-02-23 21:58:38 +13:00
Erik Lax eddbfbee1e Fixed: #2572 (GUI: Disable all UI actions on Recheck) 2011-02-11 21:08:37 +02:00
Erik Lax a1c1234596 Fixed: #2460 (GUI: Errors are sorted by line number alphabetically instead of numerically) 2011-02-11 21:03:39 +02:00
Kimmo Varis 1e3efd08f8 GUITEST: Add test reading XML format v2 file. 2011-02-09 22:08:29 +02:00
Kimmo Varis 4d886f8c3b GUITEST: Add test for reading old format XML report. 2011-02-09 22:08:25 +02:00
Kimmo Varis 11378108fa GUITEST: Add test for checking XML report version. 2011-02-09 22:08:25 +02:00
Kimmo Varis aa6341dbed Astyle: add option to convert to linux EOLs. 2011-02-09 14:13:37 +02:00
Kimmo Varis 9dd1515f6f GUITEST: Add couple of tests for XmlReport. 2011-02-09 01:59:12 +02:00
Kimmo Varis 2684b230f1 GUITEST: Add first GUI test testing TranslationHandler. 2011-02-08 23:42:50 +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 f66bdad03d GUI: Enable French translation.
French translation file was added to the source tree but not added
to the code loading translations.
2011-02-07 12:59:46 +02:00
Kimmo Varis 76b235b9cf GUI: Add comments for translationhandler.h. 2011-02-07 12:56:32 +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 64a70fa51c GUI: Refactoring translation handling.
Instead of separate language name and filename lists use one
list of structs. This makes language name and filename more
connected and makes handling of them easier.
2011-02-06 22:00:16 +02:00
Kimmo Varis 7d9f8e1706 GUI: Remove unneeded translation code. 2011-02-06 20:56:04 +02:00
Kimmo Varis 2a49ff9c4d GUI: Sort the languages list. 2011-02-06 20:47:12 +02:00
Kimmo Varis b62d034eae GUI: Update translation files. 2011-02-05 23:46:10 +02:00
Kimmo Varis 1e5743ff1e GUI: Add French translation to project file. 2011-02-05 23:46:05 +02:00
Kimmo Varis e8ebbf2701 GUI: Update translation files. 2011-02-05 18:38:17 +02:00
Kimmo Varis dd0182c99d GUI: Fix reading multiple error locations from XML. 2011-02-05 18:33:45 +02:00
Kimmo Varis c116caa7eb Merge branch 'xml2-refactoring' 2011-02-05 16:11:58 +02:00
Kimmo Varis f279fcd351 GUI: Unquote special characters when reading XML.
Unquote the quoted data from XML file when reading. We don't want
quoted chars to be visible in the GUI.
2011-02-05 16:07:59 +02:00
Kimmo Varis 9eacceb00a GUI: Read XML format version 2 files.
Implement the parsing of XML format v2 error data.
2011-02-05 15:56:56 +02:00
Kimmo Varis d31703e452 GUI: Read ErrorItems instead of ErrorLines from XML report.
XML report format 1 only had error "lines" that we promoted to "items"
when adding to GUI. XML report format 2 contains error "items" so
change the code to read items and do the promotion directly when
reading and parsing the data.
2011-02-05 12:41:29 +02:00