Commit Graph

702 Commits

Author SHA1 Message Date
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 2123f6fafc GUI: Update projectfile tests. 2011-08-23 20:44:27 +03:00
Kimmo Varis a3d6b697ad GUI: Update project file documentation. 2011-08-23 20:44:27 +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 981c28845f GUI: Update translation files. 2011-08-22 22:21:42 +03:00
Kimmo Varis 63e8e9ea57 GUI: Allow reordering includes in project dialog.
Since include dir order is important (Cppcheck uses the first file
it finds) user must be able to edit the order of include paths.
This commit adds "Up" and "Down" buttons to the Project-dialog's
inlude paths-tab. User can use those two buttons to re-order the
include directories.

Ticket: #3037 (GUI: Allow reordering include paths in project dialog)
2011-08-22 22:16:59 +03:00
Kimmo Varis 042693a305 GUI: Rename Project-label in Projects-dialog.
The 'Project' label in Project-dialog is confusing and users think
it is project's name. When it acutually is the root directory of
the project. So rename the lable and move it below the 'Defines'-
field to make it less important looking.

Ticket: #2997 (GUI: 'Project'-field in project file-dialog is confusing)
2011-08-22 21:18:43 +03:00
Kimmo Varis 51102ee076 GUITESTS: Replace benchmark data file.
The benchmark data file had errors when checking with Cppcheck.
And people reported these errors. So replace the file with one
that has no (currently found) errors.
2011-08-12 14:40:14 +03:00
Kimmo Varis 2ef4e6fb59 GUITESTS: Remove the running script.
The script is available in another repository. I don't want to
distribute it with Cppcheck sources for now. Maybe if and when
there is more interest towards GUI tests...
2011-08-12 00:13:29 +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 447c3c28b4 GUI: Update translation files. 2011-08-03 10:58:03 +03:00
Kimmo Varis cff674ccac GUI: Don't translate non-translatable strings.
If strings contain only formatting placeholders for the dynamically
formatted text it does not make sense to mark the strings as
translatable. There is nothing translators can translate e.g. in
"%p".
2011-08-03 10:53:35 +03:00
Zachary Blair d2f4b8e3de Fixed 2915 (GUI: Show files checked in progress bar) 2011-07-27 23:30:45 -07:00
Kimmo Varis b7d110460e GUITESTS: Add simple readme.txt. 2011-07-24 21:45:53 +03:00
Kimmo Varis fe1ba6ae37 GUI: Simplify condition.
With current code we always have both filename and linenumber for
each error.
2011-07-21 20:15:24 +03:00
Kimmo Varis d1d8c24a03 GUI: Don't use relative paths for include files. 2011-07-21 15:13:41 +03:00
Kimmo Varis fea5c629eb GUI: Update translation files. 2011-07-20 13:38:23 +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 ee988a0689 GUI: Filter toolbar didn't have a title.
Ticket: #2922 (GUI: Filter toolbar does not have a title)
2011-07-20 13:24:37 +03:00
Kimmo Varis e3cd600e4e GUI: Fix always false condition.
Ticket: #2827 (false negative: gui/resultstree.cpp:271 condition always false)
2011-07-17 15:25:46 +03:00
Kimmo Varis 634db2ab09 GUI: Update translation files. 2011-07-17 15:15:40 +03:00
Kimmo Varis aff8fbc05f GUI: Show error if no default editor configured.
There always should be default editor if there is editor
application configured. But it is possible in some cases that
default application is "lost". So check that we have default
application configured before trying to use it. And inform user
to configure default application instead of silently failing to
open the application (and the file) for the user.
2011-07-17 15:11:24 +03:00
Kimmo Varis 79385f0ff8 GUI: Fix separators when opening file to editor.
Ticket: #2916 (Wrong slashes in file path passed to the Windows-text editors)
2011-07-17 14:22:06 +03:00
Kimmo Varis 387fd35ff3 GUITESTS: Improve the running script.
Don't use recursion in the script. The Python's os.walk() already
lists all files in subdirectories and using recursion only caused
tests to be found twice. Also handle the case the project file
defines binary path with DESTDIR define.
2011-06-23 23:02:49 +03:00
Robert Reif f05ff9b4dc run astyle 2011-06-22 20:30:41 -04:00
Kimmo Varis 88f31403d7 GUITESTS: Run only existing tests with the script.
Improve the runner script to run only tests whose binary file
exists. Tests with inexistant binary file are not counted into
test counts in the summary.

Add the MIT license header. I'm now maintaining this script in
external repository with MIT license. So I can use the script
in other projects too.
2011-06-22 23:58:25 +03:00
Kimmo Varis d5157519a0 BENCHMARKS: Add simple benchmark. 2011-06-22 22:24:49 +03:00
Kimmo Varis ea6f6bb1aa GUITESTS: Print summary from the test script. 2011-06-21 15:38:18 +03:00
Kimmo Varis 0cd8282b2e GUITESTS: Add Python script for running all tests. 2011-06-21 15:38:18 +03:00
Kimmo Varis 6bae7b0f0f GUITESTS: Add FileList filtering tests. 2011-06-18 12:54:48 +03:00
Kimmo Varis 8b70046a42 GUITESTS: Add tests for adding directory. 2011-06-17 14:54:04 +03:00
Kimmo Varis d5652ee3cc GUITESTS: Move testdata to data-subdirectory. 2011-06-17 13:56:32 +03:00
Kimmo Varis 82e8e1a737 GUITESTS: Add simple test for FileList.
These tests check that FileList only accepts existing files with
accepted filename extensions.
2011-06-17 13:46:40 +03:00
Kimmo Varis 5ec241ee0e GUITESTS: Few compares in tests were wrong way around. 2011-06-17 13:18:42 +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 b66b8a31cc GUITESTS: Add tests for loading project files. 2011-06-16 14:24:33 +03:00
Kimmo Varis 08ab764f63 GUITESTS: More flexible test data paths.
Use build-time define to set the path to the source files
directory. Which then can be used to format path to the test
data. This allows running tests from out-of-source-tree -builds
that e.g. QtCreator does.
2011-06-16 13:05:00 +03:00
Kimmo Varis 7ae2536784 GUI: Update translation files. 2011-06-15 11:32:08 +03:00
Kimmo Varis 3d3b818e66 GUI: Add Q_OBJECT to TxtReport class. 2011-06-15 11:28:47 +03:00
Kimmo Varis ebd5a123ce GUITESTS: Fix XML V1 test.
Test was using and assuming that severity string starts with
capital letter (e.g. "Style"). But the strings are all lowercase
letters.

Ticket #2832 (GUI: XML version 1 test fails)
2011-06-10 15:16:44 +03:00
Kimmo Varis 8cff768d99 GUITESTS: Use common build artifact directory.
Using common build artifacts (object files, moc files) avoids
recompiling whole lib and other shared files separately for each
test.
2011-06-10 14:35:02 +03:00
Kimmo Varis 8e18c69ba8 GUITESTS: Run Astyle. 2011-06-10 14:22:52 +03:00
Kimmo Varis 63cf743ba1 GUITESTS: Remove unneeded main file. 2011-06-10 14:15:24 +03:00
Kimmo Varis c51b66d0b1 GUITESTS: Move XML V2 tests to own project. 2011-06-10 14:13:41 +03:00
Kimmo Varis 1337abd9fe GUITESTS: Move XML format V1 tests to own project. 2011-06-10 14:01:08 +03:00
Kimmo Varis 85aed65e80 GUITESTS: Fix XML files paths. 2011-06-10 13:20:17 +03:00
Kimmo Varis edbb66cb20 GUITESTS: Refactoring XmlReport test. 2011-06-10 13:20:17 +03:00
Kimmo Varis eb648eb3f7 GUITESTS: Fix translation count in test. 2011-06-10 13:20:17 +03:00
Kimmo Varis 6820fc6933 GUITESTS: Refactoring test building.
Start building each test as separate project as QtestLib tests
usually are built. This commit adds the infrastructure and moves
TranslationHandler test as own project.
2011-06-10 13:19:46 +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
Daniel Marjamäki c971fa0d4b cmake: cleanup unmaintained cmake files 2011-05-19 17:16:04 +02: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 214a94e1b7 GUI: Make Project-dialog to remember its size. 2011-05-13 10:12:19 +03:00
Kimmo Varis 010403699a GUI: Initialize Settings in main.
Setting organization and program name in main() allows us to
cleanup Settings class usage. As we don't need to keep using the
one instance of Settings but can create new Settings class
whenever we need to access settings. According to the Qt
documentation creating Settings class is fast.
2011-05-13 10:09:17 +03:00
Kimmo Varis 31e85f4097 GUI: Show main tab in project file dialog by default. 2011-05-13 09:28:00 +03:00
Kimmo Varis 3dc87be0af GUI: Set initial path for adding paths to project.
Use project file's location as base path when adding new paths
(checked, included or ignored) to the project. In most cases user
wants to add paths in the same project so this reduces browsing
paths considerably when adding them.
2011-05-13 09:23:43 +03:00
Kimmo Varis 0b0d890bd2 GUI: Remove trailing spaces from translated strings 2011-05-12 21:15:10 +03:00
Kimmo Varis fe4086f118 GUI: Update project file documentation.
Remove mentioning of automatic loading which was disabled in
previous commit.
2011-05-12 14:09:51 +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 13b307878a GUI: Fix the gui.cppcheck to work with GUI.
The project file to check just GUI code was missing the directory
to check. This is probably due it was used originally as
"automatically" loaded project file which assumed current
directory is checked and only added some additional parameters.
2011-05-12 13:40:56 +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 15820b87a4 GUI: Remove unneeded forward declaration. 2011-05-12 12:37:10 +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 8aafe2c038 GUI: Remove dependency to QtXml. 2011-04-28 09:16:12 +03:00
Kimmo Varis c7d99fe9a7 Remove ErrorLogger::reportStatus() method.
The ErrorLogger::reportStatus() is not lib code interface. The CLI
code does the looping through file list and gives one file at a
time for the core code. Hence lib has no any idea about the
progress and it can't provide such information.

Also the recent commit (6d858b6) caused a GUI build failure by
adding CLI code dependency to GUI. Which is big no-no.

This is admittedly a hack. But it allow us to build all modules
again.
2011-04-27 23:27:02 +03:00
Markus Elfring a1e6382247 Deletion of references to modules "QtHelp" and "QtXml" in the GUI CMake script
Two Qt modules are not needed any more in the CMake script for the graphical
user interface after the commit "GUI: Open online-help instead of local help".
3965a08b7b (commit)

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-04-27 20:48:58 +02:00
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