Commit Graph

216 Commits

Author SHA1 Message Date
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