- fix g++ warning:
> lib/checkother.cpp:3779: warning: comparison between signed and unsigned integer expressions
- fix suncc warning (see [everything2](http://everything2.com/title/C%252B%252B%253A+static+extern+%2522C%2522)):
> "lib/checkmemoryleak.cpp", line 578: Warning (Anachronism): Formal argument __compar of type extern "C" int(*)(const void*,const void*) in call to bsearch(const void*, const void*, unsigned long, unsigned long, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).
- prefer empty() / isEmpty() over "size() > 0" (cases not caught by stlSize)
- fix word misspellings (mostly comments, a few output lines)
- Parenthesis => Parentheses (both variations were used in the codebase)
- fix typo and wording ("never alwayw") in gui/test/data/benchmark/simple.cpp's CheckOther::unsignedPositive():
```
- "An unsigned variable will never alwayw be positive so it is either pointless or "
+ "An unsigned variable can't be negative so it is either pointless or "
```
Now DebugErrors get correctly routed to check log. The wrong slot
name also caused a warning printed to the console as reported by
thevbm in ticket #2006.
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)
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.
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.
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
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.
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).
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.