Commit Graph

320 Commits

Author SHA1 Message Date
Daniel Marjamäki 3c376047ba pulled changes from kimmov (filelocation-refactor) 2010-07-19 18:06:49 +02:00
Kimmo Varis c3dfe1a356 GUI: Fix bug that every error item got own parent item.
The code could not find existing parent item since items have paths
with native separators and search was done with non-native path
separators.
2010-07-18 13:17:21 +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 d8077cf2f7 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 12:57:48 +03:00
Kimmo Varis 006c9f17d4 GUI: Avoid unnecessary path separator conversion. 2010-07-18 11:20:10 +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 3261f848c3 GUI: Fix includes for dialogs/views.
At first we created the GUI in the code and so needed all the layouts
etc include to the code. Now when we are using UI files we don't need
all those included. So clean them up. Also use forward declarations
instead of includes in header files when possible.
2010-07-17 22:57:32 +03:00
Kimmo Varis 93bfa24d3e GUI: Ensure native path separators in reports.
Ensure that native separators are used in saved reports. Reports may
be parsed by other programs/scripts so it is important that paths
are properly formatted.
2010-07-17 21:07:09 +03:00
Kimmo Varis c606dc8403 GUI: Show paths with native separators in result tree.
GUI used to show paths with / separator which is not native
separator in Windows. So lets convert shown paths to native
separators before adding them to the GUI.
2010-07-17 20:26:24 +03:00
Kimmo Varis d5a6b02e9e GUI: Fix building after path handling refactorings. 2010-07-17 18:36:21 +03:00
Kimmo Varis db7c9848d0 GUI: Update translation files. 2010-07-17 10:54:53 +03:00
Kimmo Varis de767a7cf1 GUI: Remember log view size. 2010-07-16 23:27:57 +03:00
Kimmo Varis 8bf8dd4bf7 GUI: Add Clear-button to log view. 2010-07-16 18:35:51 +03:00
Kimmo Varis 7f3825d922 GUI: Add close-button to log view. 2010-07-16 18:07:23 +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 f81774f5b9 GUI: Fix compile after Severity changes. 2010-07-14 21:12:54 +03:00
Kimmo Varis 6c6ab0a78d GUI: Sent ErrorItem with Error -signal.
This commit modifies and registers ErrorItem as proper metatype so it
can be used with Qt signals. Then sending Error-signals is refactored
so that ErrorItem instances are sent instead of several different
arguments that already contained couple of lists.
2010-07-14 14:24:46 +03:00
Kimmo Varis cff008634e GUI: Update translation files. 2010-07-13 13:02:12 +03:00
Kimmo Varis b92f7b854a GUI: Disable Project file menu items when checking. 2010-07-13 12:46:28 +03:00
Kimmo Varis cc64907edb GUI: Remove ; from the end of the include/define strings in dialog. 2010-07-13 12:40:20 +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
Martin Ettl 51beb6d01a gui/main added spaces between template brackets 2010-07-13 00:13:08 +03:00
Kimmo Varis 4a695c78d9 GUI: Add two new files I forgot to add earlier. 2010-07-13 00:10:48 +03:00
Daniel Marjamäki 7d0fd3f2aa Fixed #1849 (GUI: failed to build gui) 2010-07-12 20:39:20 +02:00
Martin Ettl cba711f293 gui/main added spaces between template brackets 2010-07-12 20:02:58 +02:00
Kimmo Varis 4ceea93945 GUI: Show project file's name in project file -dialog title. 2010-07-12 20:31:37 +03:00
Kimmo Varis e468779feb GUI: Don't mention auto-allocated classes even in comments. 2010-07-12 20:22:19 +03: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 801afae88b GUI: Refactor linenumber in ErrorLine to unsigned int. 2010-07-12 01:51:36 +03:00
Kimmo Varis 4a2446d235 GUI: Ignore errors with "debug" severity.
GUI doesn't know about "debug" severity. And it is not worth the
trouble to add new category everywhere (icons etc) just for
internal debug messages.
2010-07-12 01:18:16 +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 8a24435db2 GUI: Update translation files. 2010-07-11 16:33:49 +03:00
Kimmo Varis c9d63fa454 GUI: Remember user-selected base path.
Remember the base path user selects when opening files from loaded
XML report.
2010-07-11 16:20:19 +03:00
Kimmo Varis b8793b1529 GUI: Ask file location from user if not found.
When loading report from XML there is no full paths so the file's real
path is not known and cppcheck cannot open it. So if the file has no
absolute path then we ask where the file is located from the user.
2010-07-11 14:22:55 +03:00
Kimmo Varis f894b19209 GUI: Add errors read from XML report to GUI. 2010-07-11 02:02:08 +03:00
Kimmo Varis 9a5166075f GUI: Fix line numbers and filenames in errors.
When converting to use new ErrorItem and ErrorLine I made few mistakes
in how I handled the data. And for some reason there was not even
warnings about converting integers to QStrings.
2010-07-11 01:07:40 +03:00
Kimmo Varis 352941f5df GUI: Fix transporting errors.
Need to register integer list as new metatype so that Qt's type
system knows how to use it. Adding also additional constructors
for the ErrorItem.
2010-07-11 01:04:53 +03:00
Kimmo Varis faa483b8d0 GUI: Use integer list instead of variant list for line numbers. 2010-07-10 20:54:33 +03:00
Kimmo Varis 2f0202d105 GUI: More refactoring to use ErrorItem and ErrorLine. 2010-07-10 20:30:31 +03:00
Kimmo Varis 0e9d0e9bde GUI: Refactor error data passing to use own class. 2010-07-10 18:20:45 +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 81449a823a GUI: Refactoring xmlreport to use pointer to stream writing class. 2010-07-10 13:53:44 +03:00
Kimmo Varis c76d288ad9 GUI: Update translation files. 2010-07-08 20:15:03 +03:00
Kimmo Varis d98d840e98 GUI: Set buddies in Project file -dialog. 2010-07-08 20:13:19 +03:00
Kimmo Varis d2e6e3b49b GUI: Don't write empty elements to project file. 2010-07-08 20:06:03 +03:00
Kimmo Varis 941c1a8eb8 GUI: Improve error handling for reading/writing project file. 2010-07-08 19:49:04 +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