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
This commit is contained in:
Kimmo Varis 2010-07-11 19:43:31 +03:00
commit 1504747030
55 changed files with 3046 additions and 875 deletions

1317
Changelog

File diff suppressed because it is too large Load Diff

View File

@ -52,6 +52,7 @@ TESTOBJ = test/testautovariables.o \
test/testpreprocessor.o \ test/testpreprocessor.o \
test/testredundantif.o \ test/testredundantif.o \
test/testrunner.o \ test/testrunner.o \
test/testsettings.o \
test/testsimplifytokens.o \ test/testsimplifytokens.o \
test/teststl.o \ test/teststl.o \
test/testsuite.o \ test/testsuite.o \
@ -213,6 +214,9 @@ test/testredundantif.o: test/testredundantif.cpp lib/tokenize.h lib/classinfo.h
test/testrunner.o: test/testrunner.cpp test/testsuite.h lib/errorlogger.h lib/settings.h test/testrunner.o: test/testrunner.cpp test/testsuite.h lib/errorlogger.h lib/settings.h
$(CXX) $(CXXFLAGS) -Ilib -Icli -c -o test/testrunner.o test/testrunner.cpp $(CXX) $(CXXFLAGS) -Ilib -Icli -c -o test/testrunner.o test/testrunner.cpp
test/testsettings.o: test/testsettings.cpp lib/settings.h test/testsuite.h lib/errorlogger.h
$(CXX) $(CXXFLAGS) -Ilib -Icli -c -o test/testsettings.o test/testsettings.cpp
test/testsimplifytokens.o: test/testsimplifytokens.cpp test/testsuite.h lib/errorlogger.h lib/settings.h lib/tokenize.h lib/classinfo.h lib/token.h test/testsimplifytokens.o: test/testsimplifytokens.cpp test/testsuite.h lib/errorlogger.h lib/settings.h lib/tokenize.h lib/classinfo.h lib/token.h
$(CXX) $(CXXFLAGS) -Ilib -Icli -c -o test/testsimplifytokens.o test/testsimplifytokens.cpp $(CXX) $(CXXFLAGS) -Ilib -Icli -c -o test/testsimplifytokens.o test/testsimplifytokens.cpp

View File

@ -56,8 +56,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,43,0,0 FILEVERSION 1,44,0,0
PRODUCTVERSION 1,43,0,0 PRODUCTVERSION 1,44,0,0
FILEFLAGSMASK 0x17L FILEFLAGSMASK 0x17L
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -73,12 +73,12 @@ BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "FileDescription", "cppcheck Application" VALUE "FileDescription", "cppcheck Application"
VALUE "FileVersion", "1.43" VALUE "FileVersion", "1.44"
VALUE "InternalName", "cppcheck" VALUE "InternalName", "cppcheck"
VALUE "LegalCopyright", "Copyright (C) 2007-2010 Daniel Marjamäki and Cppcheck team." VALUE "LegalCopyright", "Copyright (C) 2007-2010 Daniel Marjamäki and Cppcheck team."
VALUE "OriginalFilename", "cppcheck.exe" VALUE "OriginalFilename", "cppcheck.exe"
VALUE "ProductName", "cppcheck Application" VALUE "ProductName", "cppcheck Application"
VALUE "ProductVersion", "1.43" VALUE "ProductVersion", "1.44"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -20,7 +20,7 @@
/** /**
* *
* @mainpage Cppcheck * @mainpage Cppcheck
* @version 1.43 * @version 1.44
* *
* @section overview_sec Overview * @section overview_sec Overview
* Cppcheck is a simple tool for static analysis of C/C++ code. * Cppcheck is a simple tool for static analysis of C/C++ code.

View File

@ -27,6 +27,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <cstdio> #include <cstdio>
#include <errno.h>
#endif #endif
ThreadExecutor::ThreadExecutor(const std::vector<std::string> &filenames, const Settings &settings, ErrorLogger &errorLogger) ThreadExecutor::ThreadExecutor(const std::vector<std::string> &filenames, const Settings &settings, ErrorLogger &errorLogger)
@ -51,12 +52,15 @@ void ThreadExecutor::addFileContent(const std::string &path, const std::string &
#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) #if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__)
bool ThreadExecutor::handleRead(unsigned int &result) int ThreadExecutor::handleRead(unsigned int &result)
{ {
char type = 0; char type = 0;
if (read(_pipe[0], &type, 1) <= 0) if (read(_pipe[0], &type, 1) <= 0)
{ {
return false; if( errno == EAGAIN )
return 0;
return -1;
} }
if (type != '1' && type != '2' && type != '3') if (type != '1' && type != '2' && type != '3')
@ -104,10 +108,12 @@ bool ThreadExecutor::handleRead(unsigned int &result)
iss >> fileResult; iss >> fileResult;
result += fileResult; result += fileResult;
_errorLogger.reportStatus(_fileCount, _filenames.size()); _errorLogger.reportStatus(_fileCount, _filenames.size());
delete [] buf;
return -1;
} }
delete [] buf; delete [] buf;
return true; return 1;
} }
unsigned int ThreadExecutor::check() unsigned int ThreadExecutor::check()
@ -134,21 +140,12 @@ unsigned int ThreadExecutor::check()
} }
unsigned int childCount = 0; unsigned int childCount = 0;
for (unsigned int i = 0; i < _filenames.size(); i++) unsigned int i = 0;
while( true )
{ {
// Keep only wanted amount of child processes running at a time. // Start a new child
if (childCount >= _settings._jobs) if( i < _filenames.size() && childCount < _settings._jobs )
{ {
while (handleRead(result))
{
}
int stat = 0;
waitpid(0, &stat, 0);
--childCount;
}
pid_t pid = fork(); pid_t pid = fork();
if (pid < 0) if (pid < 0)
{ {
@ -180,19 +177,31 @@ unsigned int ThreadExecutor::check()
} }
++childCount; ++childCount;
++i;
}
else if (childCount > 0)
{
// Wait for child to quit before stating new processes
while(true)
{
int readRes = handleRead(result);
if( readRes == -1 )
break;
else if( readRes == 0 )
usleep(5000); // 5 ms
} }
while (childCount > 0)
{
int stat = 0; int stat = 0;
waitpid(0, &stat, 0); waitpid(0, &stat, 0);
--childCount; --childCount;
} }
else if(childCount == 0)
while (handleRead(result))
{ {
// All done
break;
} }
}
return result; return result;
} }

View File

@ -58,7 +58,13 @@ private:
#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) #if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__)
private: private:
bool handleRead(unsigned int &result); /**
* Read from the pipe, parse and handle what ever is in there.
*@return -1 in case of error
* 0 if there is nothing in the pipe to be read
* 1 if we did read something
*/
int handleRead(unsigned int &result);
void writeToPipe(char type, const std::string &data); void writeToPipe(char type, const std::string &data);
int _pipe[2]; int _pipe[2];
std::list<std::string> _errorList; std::list<std::string> _errorList;

View File

@ -128,15 +128,15 @@ kate -l(line) (file)</oldsource>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="main.ui" line="26"/> <location filename="main.ui" line="26"/>
<location filename="mainwindow.cpp" line="220"/> <location filename="mainwindow.cpp" line="221"/>
<location filename="mainwindow.cpp" line="483"/> <location filename="mainwindow.cpp" line="500"/>
<location filename="mainwindow.cpp" line="585"/> <location filename="mainwindow.cpp" line="602"/>
<location filename="mainwindow.cpp" line="603"/> <location filename="mainwindow.cpp" line="620"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="143"/> <location filename="main.ui" line="144"/>
<source>Standard</source> <source>Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -146,264 +146,275 @@ kate -l(line) (file)</oldsource>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="83"/> <location filename="main.ui" line="84"/>
<source>&amp;View</source> <source>&amp;View</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="87"/> <location filename="main.ui" line="88"/>
<source>&amp;Toolbars</source> <source>&amp;Toolbars</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="120"/> <location filename="main.ui" line="121"/>
<source>&amp;Check</source> <source>&amp;Check</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="129"/> <location filename="main.ui" line="130"/>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="174"/> <location filename="main.ui" line="175"/>
<source>&amp;License...</source> <source>&amp;License...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="179"/> <location filename="main.ui" line="180"/>
<source>A&amp;uthors...</source> <source>A&amp;uthors...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="188"/> <location filename="main.ui" line="189"/>
<source>&amp;About...</source> <source>&amp;About...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="193"/> <location filename="main.ui" line="194"/>
<source>&amp;Files...</source> <source>&amp;Files...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="196"/> <location filename="main.ui" line="197"/>
<source>Ctrl+F</source> <source>Ctrl+F</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="205"/> <location filename="main.ui" line="206"/>
<source>&amp;Directory...</source> <source>&amp;Directory...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="208"/> <location filename="main.ui" line="209"/>
<source>Ctrl+D</source> <source>Ctrl+D</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="217"/> <location filename="main.ui" line="218"/>
<source>&amp;Recheck files</source> <source>&amp;Recheck files</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="220"/> <location filename="main.ui" line="221"/>
<source>Ctrl+R</source> <source>Ctrl+R</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="229"/> <location filename="main.ui" line="230"/>
<source>&amp;Stop</source> <source>&amp;Stop</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="232"/> <location filename="main.ui" line="233"/>
<source>Esc</source> <source>Esc</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="241"/> <location filename="main.ui" line="242"/>
<source>&amp;Save results to file...</source> <source>&amp;Save results to file...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="244"/> <location filename="main.ui" line="245"/>
<source>Ctrl+S</source> <source>Ctrl+S</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="249"/> <location filename="main.ui" line="250"/>
<source>&amp;Quit</source> <source>&amp;Quit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="258"/> <location filename="main.ui" line="259"/>
<source>&amp;Clear results</source> <source>&amp;Clear results</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="267"/> <location filename="main.ui" line="268"/>
<source>&amp;Preferences</source> <source>&amp;Preferences</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="279"/> <location filename="main.ui" line="280"/>
<source>Show style errors</source> <source>Show style errors</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="291"/> <location filename="main.ui" line="292"/>
<source>Show common errors</source> <source>Show common errors</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="296"/> <location filename="main.ui" line="297"/>
<source>&amp;Check all</source> <source>&amp;Check all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="301"/> <location filename="main.ui" line="302"/>
<source>&amp;Uncheck all</source> <source>&amp;Uncheck all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="306"/> <location filename="main.ui" line="307"/>
<source>Collapse &amp;all</source> <source>Collapse &amp;all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="311"/> <location filename="main.ui" line="312"/>
<source>&amp;Expand all</source> <source>&amp;Expand all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="319"/> <location filename="main.ui" line="320"/>
<source>&amp;Standard</source> <source>&amp;Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="322"/> <location filename="main.ui" line="323"/>
<source>Standard items</source> <source>Standard items</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="338"/> <location filename="main.ui" line="339"/>
<source>Toolbar</source> <source>Toolbar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="346"/> <location filename="main.ui" line="347"/>
<source>&amp;Categories</source> <source>&amp;Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="349"/> <location filename="main.ui" line="350"/>
<source>Error categories</source> <source>Error categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="354"/> <location filename="main.ui" line="355"/>
<source>&amp;Open XML...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.ui" line="360"/>
<source>Open P&amp;roject File...</source> <source>Open P&amp;roject File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="359"/> <location filename="main.ui" line="365"/>
<source>&amp;New Project File...</source> <source>&amp;New Project File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="327"/> <location filename="main.ui" line="328"/>
<source>&amp;Contents</source> <source>&amp;Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="161"/> <location filename="main.ui" line="162"/>
<source>Categories</source> <source>Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="330"/> <location filename="main.ui" line="331"/>
<source>Open the help contents</source> <source>Open the help contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="333"/> <location filename="main.ui" line="334"/>
<source>F1</source> <source>F1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="105"/> <location filename="main.ui" line="106"/>
<source>&amp;Language</source> <source>&amp;Language</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="110"/> <location filename="main.ui" line="111"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="253"/> <location filename="mainwindow.cpp" line="254"/>
<source>Select files to check</source> <source>Select files to check</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="267"/> <location filename="mainwindow.cpp" line="268"/>
<source>Select directory to check</source> <source>Select directory to check</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="221"/> <location filename="mainwindow.cpp" line="222"/>
<source>No suitable files found to check!</source> <source>No suitable files found to check!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="479"/> <location filename="mainwindow.cpp" line="496"/>
<source>Cannot exit while checking. <source>Cannot exit while checking.
Stop the checking before exiting.</source> Stop the checking before exiting.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="510"/> <location filename="mainwindow.cpp" line="527"/>
<source>License</source> <source>License</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="517"/> <location filename="mainwindow.cpp" line="534"/>
<source>Authors</source> <source>Authors</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="525"/> <location filename="mainwindow.cpp" line="542"/>
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source> <source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="527"/> <location filename="mainwindow.cpp" line="544"/>
<source>Save the report file</source> <source>Save the report file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="535"/> <location filename="mainwindow.cpp" line="442"/>
<location filename="mainwindow.cpp" line="552"/>
<source>XML files (*.xml)</source> <source>XML files (*.xml)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="541"/> <location filename="mainwindow.cpp" line="444"/>
<source>Open the report file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="558"/>
<source>Text files (*.txt)</source> <source>Text files (*.txt)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="547"/> <location filename="mainwindow.cpp" line="564"/>
<source>CSV files (*.csv)</source> <source>CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="587"/> <location filename="mainwindow.cpp" line="604"/>
<source>Cppcheck - %1</source> <source>Cppcheck - %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="604"/> <location filename="mainwindow.cpp" line="621"/>
<source>Failed to change the language: <source>Failed to change the language:
%1 %1
@ -415,12 +426,12 @@ Stop the checking before exiting.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="671"/> <location filename="mainwindow.cpp" line="688"/>
<source>Project files (*.cppcheck);;All files(*.*)</source> <source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="673"/> <location filename="mainwindow.cpp" line="690"/>
<source>Select Project File</source> <source>Select Project File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -530,74 +541,91 @@ Stop the checking before exiting.</source>
<context> <context>
<name>ResultsTree</name> <name>ResultsTree</name>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>File</source> <source>File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Severity</source> <source>Severity</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Message</source> <source>Message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="88"/> <location filename="resultstree.cpp" line="82"/>
<source>Undefined file</source> <source>Undefined file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="419"/> <location filename="resultstree.cpp" line="411"/>
<source>Copy filename</source> <source>Copy filename</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="420"/> <location filename="resultstree.cpp" line="412"/>
<source>Copy full path</source> <source>Copy full path</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="421"/> <location filename="resultstree.cpp" line="413"/>
<source>Copy message</source> <source>Copy message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="459"/> <location filename="resultstree.cpp" line="451"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="460"/> <location filename="resultstree.cpp" line="452"/>
<source>Configure the text file viewer program in Cppcheck preferences/Applications.</source> <source>Configure the text file viewer program in Cppcheck preferences/Applications.</source>
<oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource> <oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="497"/> <location filename="resultstree.cpp" line="479"/>
<source>Could not find the file!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="517"/>
<source>Could not start %1 <source>Could not start %1
Please check the application path and parameters are correct.</source> Please check the application path and parameters are correct.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="661"/> <location filename="resultstree.cpp" line="531"/>
<source>Could not find file:
%1
Please select the directory where file is located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="538"/>
<source>Select Directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="693"/>
<source>style</source> <source>style</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="665"/> <location filename="resultstree.cpp" line="697"/>
<source>error</source> <source>error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -605,30 +633,36 @@ Please check the application path and parameters are correct.</source>
<context> <context>
<name>ResultsView</name> <name>ResultsView</name>
<message> <message>
<location filename="resultsview.cpp" line="174"/> <location filename="resultsview.cpp" line="182"/>
<location filename="resultsview.cpp" line="186"/> <location filename="resultsview.cpp" line="194"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="175"/> <location filename="resultsview.cpp" line="183"/>
<source>No errors found.</source> <source>No errors found.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="183"/> <location filename="resultsview.cpp" line="191"/>
<source>Errors were found, but they are configured to be hidden. <source>Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.</source> To toggle what kind of errors are shown, open view menu.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="101"/> <location filename="resultsview.cpp" line="240"/>
<location filename="resultsview.cpp" line="250"/>
<source>Failed to read the report.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultsview.cpp" line="109"/>
<source>No errors found, nothing to save.</source> <source>No errors found, nothing to save.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="128"/> <location filename="resultsview.cpp" line="136"/>
<location filename="resultsview.cpp" line="138"/> <location filename="resultsview.cpp" line="146"/>
<source>Failed to save the report.</source> <source>Failed to save the report.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -141,15 +141,15 @@ kate -l(line) (file)</translation>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="main.ui" line="26"/> <location filename="main.ui" line="26"/>
<location filename="mainwindow.cpp" line="220"/> <location filename="mainwindow.cpp" line="221"/>
<location filename="mainwindow.cpp" line="483"/> <location filename="mainwindow.cpp" line="500"/>
<location filename="mainwindow.cpp" line="585"/> <location filename="mainwindow.cpp" line="602"/>
<location filename="mainwindow.cpp" line="603"/> <location filename="mainwindow.cpp" line="620"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="143"/> <location filename="main.ui" line="144"/>
<source>Standard</source> <source>Standard</source>
<translation>Standard</translation> <translation>Standard</translation>
</message> </message>
@ -159,217 +159,222 @@ kate -l(line) (file)</translation>
<translation>&amp;File</translation> <translation>&amp;File</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="83"/> <location filename="main.ui" line="84"/>
<source>&amp;View</source> <source>&amp;View</source>
<translation>&amp;View</translation> <translation>&amp;View</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="87"/> <location filename="main.ui" line="88"/>
<source>&amp;Toolbars</source> <source>&amp;Toolbars</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="120"/> <location filename="main.ui" line="121"/>
<source>&amp;Check</source> <source>&amp;Check</source>
<translation>&amp;Check</translation> <translation>&amp;Check</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="129"/> <location filename="main.ui" line="130"/>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation>&amp;Edit</translation> <translation>&amp;Edit</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="174"/> <location filename="main.ui" line="175"/>
<source>&amp;License...</source> <source>&amp;License...</source>
<translation>&amp;License...</translation> <translation>&amp;License...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="179"/> <location filename="main.ui" line="180"/>
<source>A&amp;uthors...</source> <source>A&amp;uthors...</source>
<translation>A&amp;uthors...</translation> <translation>A&amp;uthors...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="188"/> <location filename="main.ui" line="189"/>
<source>&amp;About...</source> <source>&amp;About...</source>
<translation>&amp;About...</translation> <translation>&amp;About...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="193"/> <location filename="main.ui" line="194"/>
<source>&amp;Files...</source> <source>&amp;Files...</source>
<translation>&amp;Files...</translation> <translation>&amp;Files...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="196"/> <location filename="main.ui" line="197"/>
<source>Ctrl+F</source> <source>Ctrl+F</source>
<translation>Ctrl+F</translation> <translation>Ctrl+F</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="205"/> <location filename="main.ui" line="206"/>
<source>&amp;Directory...</source> <source>&amp;Directory...</source>
<translation>&amp;Directory...</translation> <translation>&amp;Directory...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="208"/> <location filename="main.ui" line="209"/>
<source>Ctrl+D</source> <source>Ctrl+D</source>
<translation>Ctrl+D</translation> <translation>Ctrl+D</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="217"/> <location filename="main.ui" line="218"/>
<source>&amp;Recheck files</source> <source>&amp;Recheck files</source>
<translation>&amp;Recheck files</translation> <translation>&amp;Recheck files</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="220"/> <location filename="main.ui" line="221"/>
<source>Ctrl+R</source> <source>Ctrl+R</source>
<translation>Ctrl+R</translation> <translation>Ctrl+R</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="229"/> <location filename="main.ui" line="230"/>
<source>&amp;Stop</source> <source>&amp;Stop</source>
<translation>&amp;Stop</translation> <translation>&amp;Stop</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="232"/> <location filename="main.ui" line="233"/>
<source>Esc</source> <source>Esc</source>
<translation>Esc</translation> <translation>Esc</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="241"/> <location filename="main.ui" line="242"/>
<source>&amp;Save results to file...</source> <source>&amp;Save results to file...</source>
<translation>&amp;Save results to file...</translation> <translation>&amp;Save results to file...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="244"/> <location filename="main.ui" line="245"/>
<source>Ctrl+S</source> <source>Ctrl+S</source>
<translation>Ctrl+S</translation> <translation>Ctrl+S</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="249"/> <location filename="main.ui" line="250"/>
<source>&amp;Quit</source> <source>&amp;Quit</source>
<translation>&amp;Quit</translation> <translation>&amp;Quit</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="258"/> <location filename="main.ui" line="259"/>
<source>&amp;Clear results</source> <source>&amp;Clear results</source>
<translation>&amp;Clear results</translation> <translation>&amp;Clear results</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="267"/> <location filename="main.ui" line="268"/>
<source>&amp;Preferences</source> <source>&amp;Preferences</source>
<translation>&amp;Preferences</translation> <translation>&amp;Preferences</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="279"/> <location filename="main.ui" line="280"/>
<source>Show style errors</source> <source>Show style errors</source>
<translation>Show style errors</translation> <translation>Show style errors</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="291"/> <location filename="main.ui" line="292"/>
<source>Show common errors</source> <source>Show common errors</source>
<translation>Show common errors</translation> <translation>Show common errors</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="296"/> <location filename="main.ui" line="297"/>
<source>&amp;Check all</source> <source>&amp;Check all</source>
<translation>&amp;Check all</translation> <translation>&amp;Check all</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="301"/> <location filename="main.ui" line="302"/>
<source>&amp;Uncheck all</source> <source>&amp;Uncheck all</source>
<translation>&amp;Uncheck all</translation> <translation>&amp;Uncheck all</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="306"/> <location filename="main.ui" line="307"/>
<source>Collapse &amp;all</source> <source>Collapse &amp;all</source>
<translation>Collapse &amp;all</translation> <translation>Collapse &amp;all</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="311"/> <location filename="main.ui" line="312"/>
<source>&amp;Expand all</source> <source>&amp;Expand all</source>
<translation>&amp;Expand all</translation> <translation>&amp;Expand all</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="319"/> <location filename="main.ui" line="320"/>
<source>&amp;Standard</source> <source>&amp;Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="322"/> <location filename="main.ui" line="323"/>
<source>Standard items</source> <source>Standard items</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="338"/> <location filename="main.ui" line="339"/>
<source>Toolbar</source> <source>Toolbar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="346"/> <location filename="main.ui" line="347"/>
<source>&amp;Categories</source> <source>&amp;Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="349"/> <location filename="main.ui" line="350"/>
<source>Error categories</source> <source>Error categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="354"/> <location filename="main.ui" line="355"/>
<source>&amp;Open XML...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.ui" line="360"/>
<source>Open P&amp;roject File...</source> <source>Open P&amp;roject File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="359"/> <location filename="main.ui" line="365"/>
<source>&amp;New Project File...</source> <source>&amp;New Project File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="327"/> <location filename="main.ui" line="328"/>
<source>&amp;Contents</source> <source>&amp;Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="161"/> <location filename="main.ui" line="162"/>
<source>Categories</source> <source>Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="330"/> <location filename="main.ui" line="331"/>
<source>Open the help contents</source> <source>Open the help contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="333"/> <location filename="main.ui" line="334"/>
<source>F1</source> <source>F1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="105"/> <location filename="main.ui" line="106"/>
<source>&amp;Language</source> <source>&amp;Language</source>
<translation>&amp;Language</translation> <translation>&amp;Language</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="110"/> <location filename="main.ui" line="111"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation>&amp;Help</translation> <translation>&amp;Help</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="253"/> <location filename="mainwindow.cpp" line="254"/>
<source>Select files to check</source> <source>Select files to check</source>
<translation>Select files to check</translation> <translation>Select files to check</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="267"/> <location filename="mainwindow.cpp" line="268"/>
<source>Select directory to check</source> <source>Select directory to check</source>
<translation>Select directory to check</translation> <translation>Select directory to check</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="221"/> <location filename="mainwindow.cpp" line="222"/>
<source>No suitable files found to check!</source> <source>No suitable files found to check!</source>
<translation>No suitable files found to check!</translation> <translation>No suitable files found to check!</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="479"/> <location filename="mainwindow.cpp" line="496"/>
<source>Cannot exit while checking. <source>Cannot exit while checking.
Stop the checking before exiting.</source> Stop the checking before exiting.</source>
@ -378,47 +383,53 @@ Stop the checking before exiting.</source>
Stop the checking before exiting.</translation> Stop the checking before exiting.</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="510"/> <location filename="mainwindow.cpp" line="527"/>
<source>License</source> <source>License</source>
<translation>License</translation> <translation>License</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="517"/> <location filename="mainwindow.cpp" line="534"/>
<source>Authors</source> <source>Authors</source>
<translation>Authors</translation> <translation>Authors</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="525"/> <location filename="mainwindow.cpp" line="542"/>
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source> <source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
<translation>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</translation> <translation>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="527"/> <location filename="mainwindow.cpp" line="544"/>
<source>Save the report file</source> <source>Save the report file</source>
<translation>Save the report file</translation> <translation>Save the report file</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="535"/> <location filename="mainwindow.cpp" line="442"/>
<location filename="mainwindow.cpp" line="552"/>
<source>XML files (*.xml)</source> <source>XML files (*.xml)</source>
<translation>XML files (*.xml)</translation> <translation>XML files (*.xml)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="541"/> <location filename="mainwindow.cpp" line="444"/>
<source>Open the report file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="558"/>
<source>Text files (*.txt)</source> <source>Text files (*.txt)</source>
<translation>Text files (*.txt)</translation> <translation>Text files (*.txt)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="547"/> <location filename="mainwindow.cpp" line="564"/>
<source>CSV files (*.csv)</source> <source>CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="587"/> <location filename="mainwindow.cpp" line="604"/>
<source>Cppcheck - %1</source> <source>Cppcheck - %1</source>
<translation>Cppcheck - %1</translation> <translation>Cppcheck - %1</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="604"/> <location filename="mainwindow.cpp" line="621"/>
<source>Failed to change the language: <source>Failed to change the language:
%1 %1
@ -432,12 +443,12 @@ Stop the checking before exiting.</translation>
%1</translation> %1</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="671"/> <location filename="mainwindow.cpp" line="688"/>
<source>Project files (*.cppcheck);;All files(*.*)</source> <source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="673"/> <location filename="mainwindow.cpp" line="690"/>
<source>Select Project File</source> <source>Select Project File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -547,62 +558,67 @@ Stop the checking before exiting.</translation>
<context> <context>
<name>ResultsTree</name> <name>ResultsTree</name>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>File</source> <source>File</source>
<translation>File</translation> <translation>File</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Severity</source> <source>Severity</source>
<translation>Severity</translation> <translation>Severity</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Line</source> <source>Line</source>
<translation>Line</translation> <translation>Line</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Message</source> <source>Message</source>
<translation>Message</translation> <translation>Message</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="88"/> <location filename="resultstree.cpp" line="82"/>
<source>Undefined file</source> <source>Undefined file</source>
<translation>Undefined file</translation> <translation>Undefined file</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="419"/> <location filename="resultstree.cpp" line="411"/>
<source>Copy filename</source> <source>Copy filename</source>
<translation>Copy filename</translation> <translation>Copy filename</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="420"/> <location filename="resultstree.cpp" line="412"/>
<source>Copy full path</source> <source>Copy full path</source>
<translation>Copy full path</translation> <translation>Copy full path</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="421"/> <location filename="resultstree.cpp" line="413"/>
<source>Copy message</source> <source>Copy message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="459"/> <location filename="resultstree.cpp" line="451"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="460"/> <location filename="resultstree.cpp" line="452"/>
<source>Configure the text file viewer program in Cppcheck preferences/Applications.</source> <source>Configure the text file viewer program in Cppcheck preferences/Applications.</source>
<oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource> <oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource>
<translation>You can open this error by specifying applications in program&apos;s settings.</translation> <translation>You can open this error by specifying applications in program&apos;s settings.</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="497"/> <location filename="resultstree.cpp" line="479"/>
<source>Could not find the file!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="517"/>
<source>Could not start %1 <source>Could not start %1
Please check the application path and parameters are correct.</source> Please check the application path and parameters are correct.</source>
@ -611,12 +627,24 @@ Please check the application path and parameters are correct.</source>
Please check the application path and parameters are correct.</translation> Please check the application path and parameters are correct.</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="661"/> <location filename="resultstree.cpp" line="531"/>
<source>Could not find file:
%1
Please select the directory where file is located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="538"/>
<source>Select Directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="693"/>
<source>style</source> <source>style</source>
<translation>Style</translation> <translation>Style</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="665"/> <location filename="resultstree.cpp" line="697"/>
<source>error</source> <source>error</source>
<translation>Error</translation> <translation>Error</translation>
</message> </message>
@ -624,31 +652,37 @@ Please check the application path and parameters are correct.</translation>
<context> <context>
<name>ResultsView</name> <name>ResultsView</name>
<message> <message>
<location filename="resultsview.cpp" line="174"/> <location filename="resultsview.cpp" line="182"/>
<location filename="resultsview.cpp" line="186"/> <location filename="resultsview.cpp" line="194"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="175"/> <location filename="resultsview.cpp" line="183"/>
<source>No errors found.</source> <source>No errors found.</source>
<translation>No errors found.</translation> <translation>No errors found.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="183"/> <location filename="resultsview.cpp" line="191"/>
<source>Errors were found, but they are configured to be hidden. <source>Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.</source> To toggle what kind of errors are shown, open view menu.</source>
<translation>Errors were found, but they are configured to be hidden. <translation>Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.</translation> To toggle what kind of errors are shown, open view menu.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="101"/> <location filename="resultsview.cpp" line="240"/>
<location filename="resultsview.cpp" line="250"/>
<source>Failed to read the report.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultsview.cpp" line="109"/>
<source>No errors found, nothing to save.</source> <source>No errors found, nothing to save.</source>
<translation>No errors found, nothing to save.</translation> <translation>No errors found, nothing to save.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="128"/> <location filename="resultsview.cpp" line="136"/>
<location filename="resultsview.cpp" line="138"/> <location filename="resultsview.cpp" line="146"/>
<source>Failed to save the report.</source> <source>Failed to save the report.</source>
<translation>Failed to save the report.</translation> <translation>Failed to save the report.</translation>
</message> </message>

View File

@ -143,15 +143,15 @@ kate -l(line) (file)
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="main.ui" line="26"/> <location filename="main.ui" line="26"/>
<location filename="mainwindow.cpp" line="220"/> <location filename="mainwindow.cpp" line="221"/>
<location filename="mainwindow.cpp" line="483"/> <location filename="mainwindow.cpp" line="500"/>
<location filename="mainwindow.cpp" line="585"/> <location filename="mainwindow.cpp" line="602"/>
<location filename="mainwindow.cpp" line="603"/> <location filename="mainwindow.cpp" line="620"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="143"/> <location filename="main.ui" line="144"/>
<source>Standard</source> <source>Standard</source>
<translation>Vakio</translation> <translation>Vakio</translation>
</message> </message>
@ -161,217 +161,222 @@ kate -l(line) (file)
<translation>&amp;Tiedosto</translation> <translation>&amp;Tiedosto</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="83"/> <location filename="main.ui" line="84"/>
<source>&amp;View</source> <source>&amp;View</source>
<translation>&amp;Näytä</translation> <translation>&amp;Näytä</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="87"/> <location filename="main.ui" line="88"/>
<source>&amp;Toolbars</source> <source>&amp;Toolbars</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="120"/> <location filename="main.ui" line="121"/>
<source>&amp;Check</source> <source>&amp;Check</source>
<translation>&amp;Tarkista</translation> <translation>&amp;Tarkista</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="129"/> <location filename="main.ui" line="130"/>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation>&amp;Muokkaa</translation> <translation>&amp;Muokkaa</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="174"/> <location filename="main.ui" line="175"/>
<source>&amp;License...</source> <source>&amp;License...</source>
<translation>&amp;Lisenssi...</translation> <translation>&amp;Lisenssi...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="179"/> <location filename="main.ui" line="180"/>
<source>A&amp;uthors...</source> <source>A&amp;uthors...</source>
<translation>&amp;Tekijät...</translation> <translation>&amp;Tekijät...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="188"/> <location filename="main.ui" line="189"/>
<source>&amp;About...</source> <source>&amp;About...</source>
<translation>&amp;Tietoa ohjelmasta Cppcheck...</translation> <translation>&amp;Tietoa ohjelmasta Cppcheck...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="193"/> <location filename="main.ui" line="194"/>
<source>&amp;Files...</source> <source>&amp;Files...</source>
<translation>&amp;Tiedostot...</translation> <translation>&amp;Tiedostot...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="196"/> <location filename="main.ui" line="197"/>
<source>Ctrl+F</source> <source>Ctrl+F</source>
<translation>Ctrl+F</translation> <translation>Ctrl+F</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="205"/> <location filename="main.ui" line="206"/>
<source>&amp;Directory...</source> <source>&amp;Directory...</source>
<translation>&amp;Hakemisto...</translation> <translation>&amp;Hakemisto...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="208"/> <location filename="main.ui" line="209"/>
<source>Ctrl+D</source> <source>Ctrl+D</source>
<translation>Ctrl+D</translation> <translation>Ctrl+D</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="217"/> <location filename="main.ui" line="218"/>
<source>&amp;Recheck files</source> <source>&amp;Recheck files</source>
<translation>Tarkista tiedostot &amp;uudelleen</translation> <translation>Tarkista tiedostot &amp;uudelleen</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="220"/> <location filename="main.ui" line="221"/>
<source>Ctrl+R</source> <source>Ctrl+R</source>
<translation>Ctrl+R</translation> <translation>Ctrl+R</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="229"/> <location filename="main.ui" line="230"/>
<source>&amp;Stop</source> <source>&amp;Stop</source>
<translation>&amp;Pysäytä</translation> <translation>&amp;Pysäytä</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="232"/> <location filename="main.ui" line="233"/>
<source>Esc</source> <source>Esc</source>
<translation>Esc</translation> <translation>Esc</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="241"/> <location filename="main.ui" line="242"/>
<source>&amp;Save results to file...</source> <source>&amp;Save results to file...</source>
<translation>&amp;Tallenna tulokset tiedostoon...</translation> <translation>&amp;Tallenna tulokset tiedostoon...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="244"/> <location filename="main.ui" line="245"/>
<source>Ctrl+S</source> <source>Ctrl+S</source>
<translation>Ctrl+S</translation> <translation>Ctrl+S</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="249"/> <location filename="main.ui" line="250"/>
<source>&amp;Quit</source> <source>&amp;Quit</source>
<translation>&amp;Lopeta</translation> <translation>&amp;Lopeta</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="258"/> <location filename="main.ui" line="259"/>
<source>&amp;Clear results</source> <source>&amp;Clear results</source>
<translation>&amp;Tyhjennä tulokset</translation> <translation>&amp;Tyhjennä tulokset</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="267"/> <location filename="main.ui" line="268"/>
<source>&amp;Preferences</source> <source>&amp;Preferences</source>
<translation>&amp;Asetukset</translation> <translation>&amp;Asetukset</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="279"/> <location filename="main.ui" line="280"/>
<source>Show style errors</source> <source>Show style errors</source>
<translation>Näytä tyylivirheet</translation> <translation>Näytä tyylivirheet</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="291"/> <location filename="main.ui" line="292"/>
<source>Show common errors</source> <source>Show common errors</source>
<translation>Näytä yleiset virheet</translation> <translation>Näytä yleiset virheet</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="296"/> <location filename="main.ui" line="297"/>
<source>&amp;Check all</source> <source>&amp;Check all</source>
<translation>&amp;Valitse kaikki</translation> <translation>&amp;Valitse kaikki</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="301"/> <location filename="main.ui" line="302"/>
<source>&amp;Uncheck all</source> <source>&amp;Uncheck all</source>
<translation>&amp;Poista kaikista valinta</translation> <translation>&amp;Poista kaikista valinta</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="306"/> <location filename="main.ui" line="307"/>
<source>Collapse &amp;all</source> <source>Collapse &amp;all</source>
<translation>&amp;Pienennä kaikki</translation> <translation>&amp;Pienennä kaikki</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="311"/> <location filename="main.ui" line="312"/>
<source>&amp;Expand all</source> <source>&amp;Expand all</source>
<translation>&amp;Laajenna kaikki</translation> <translation>&amp;Laajenna kaikki</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="319"/> <location filename="main.ui" line="320"/>
<source>&amp;Standard</source> <source>&amp;Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="322"/> <location filename="main.ui" line="323"/>
<source>Standard items</source> <source>Standard items</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="338"/> <location filename="main.ui" line="339"/>
<source>Toolbar</source> <source>Toolbar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="346"/> <location filename="main.ui" line="347"/>
<source>&amp;Categories</source> <source>&amp;Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="349"/> <location filename="main.ui" line="350"/>
<source>Error categories</source> <source>Error categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="354"/> <location filename="main.ui" line="355"/>
<source>&amp;Open XML...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.ui" line="360"/>
<source>Open P&amp;roject File...</source> <source>Open P&amp;roject File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="359"/> <location filename="main.ui" line="365"/>
<source>&amp;New Project File...</source> <source>&amp;New Project File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="327"/> <location filename="main.ui" line="328"/>
<source>&amp;Contents</source> <source>&amp;Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="161"/> <location filename="main.ui" line="162"/>
<source>Categories</source> <source>Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="330"/> <location filename="main.ui" line="331"/>
<source>Open the help contents</source> <source>Open the help contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="333"/> <location filename="main.ui" line="334"/>
<source>F1</source> <source>F1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="105"/> <location filename="main.ui" line="106"/>
<source>&amp;Language</source> <source>&amp;Language</source>
<translation>&amp;Kieli</translation> <translation>&amp;Kieli</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="110"/> <location filename="main.ui" line="111"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation>&amp;Ohje</translation> <translation>&amp;Ohje</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="253"/> <location filename="mainwindow.cpp" line="254"/>
<source>Select files to check</source> <source>Select files to check</source>
<translation>Valitse tarkistettavat tiedostot</translation> <translation>Valitse tarkistettavat tiedostot</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="267"/> <location filename="mainwindow.cpp" line="268"/>
<source>Select directory to check</source> <source>Select directory to check</source>
<translation>Valitse tarkistettava hakemisto</translation> <translation>Valitse tarkistettava hakemisto</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="221"/> <location filename="mainwindow.cpp" line="222"/>
<source>No suitable files found to check!</source> <source>No suitable files found to check!</source>
<translation>Tarkistettavaksi sopivia tiedostoja ei löytynyt!</translation> <translation>Tarkistettavaksi sopivia tiedostoja ei löytynyt!</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="479"/> <location filename="mainwindow.cpp" line="496"/>
<source>Cannot exit while checking. <source>Cannot exit while checking.
Stop the checking before exiting.</source> Stop the checking before exiting.</source>
@ -380,47 +385,53 @@ Stop the checking before exiting.</source>
Lopeta tarkistus ennen ohjelman sammuttamista.</translation> Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="510"/> <location filename="mainwindow.cpp" line="527"/>
<source>License</source> <source>License</source>
<translation>Lisenssi</translation> <translation>Lisenssi</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="517"/> <location filename="mainwindow.cpp" line="534"/>
<source>Authors</source> <source>Authors</source>
<translation>Tekijät</translation> <translation>Tekijät</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="525"/> <location filename="mainwindow.cpp" line="542"/>
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source> <source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
<translation>XML-tiedostot (*.xml);;Tekstitiedostot (*.txt);;CSV-tiedostot (*.csv)</translation> <translation>XML-tiedostot (*.xml);;Tekstitiedostot (*.txt);;CSV-tiedostot (*.csv)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="527"/> <location filename="mainwindow.cpp" line="544"/>
<source>Save the report file</source> <source>Save the report file</source>
<translation>Tallenna raportti</translation> <translation>Tallenna raportti</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="535"/> <location filename="mainwindow.cpp" line="442"/>
<location filename="mainwindow.cpp" line="552"/>
<source>XML files (*.xml)</source> <source>XML files (*.xml)</source>
<translation>XML-tiedostot (*xml)</translation> <translation>XML-tiedostot (*xml)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="541"/> <location filename="mainwindow.cpp" line="444"/>
<source>Open the report file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="558"/>
<source>Text files (*.txt)</source> <source>Text files (*.txt)</source>
<translation>Tekstitiedostot (*.txt)</translation> <translation>Tekstitiedostot (*.txt)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="547"/> <location filename="mainwindow.cpp" line="564"/>
<source>CSV files (*.csv)</source> <source>CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="587"/> <location filename="mainwindow.cpp" line="604"/>
<source>Cppcheck - %1</source> <source>Cppcheck - %1</source>
<translation>Cppcheck - %1</translation> <translation>Cppcheck - %1</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="604"/> <location filename="mainwindow.cpp" line="621"/>
<source>Failed to change the language: <source>Failed to change the language:
%1 %1
@ -436,12 +447,12 @@ Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
</translation> </translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="671"/> <location filename="mainwindow.cpp" line="688"/>
<source>Project files (*.cppcheck);;All files(*.*)</source> <source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="673"/> <location filename="mainwindow.cpp" line="690"/>
<source>Select Project File</source> <source>Select Project File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -551,62 +562,67 @@ Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
<context> <context>
<name>ResultsTree</name> <name>ResultsTree</name>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>File</source> <source>File</source>
<translation>Tiedosto</translation> <translation>Tiedosto</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Severity</source> <source>Severity</source>
<translation>Tyyppi</translation> <translation>Tyyppi</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Line</source> <source>Line</source>
<translation>Rivi</translation> <translation>Rivi</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Message</source> <source>Message</source>
<translation>Virhe</translation> <translation>Virhe</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="88"/> <location filename="resultstree.cpp" line="82"/>
<source>Undefined file</source> <source>Undefined file</source>
<translation>Määrittelemätön tiedosto</translation> <translation>Määrittelemätön tiedosto</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="419"/> <location filename="resultstree.cpp" line="411"/>
<source>Copy filename</source> <source>Copy filename</source>
<translation>Kopioi tiedostonimi</translation> <translation>Kopioi tiedostonimi</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="420"/> <location filename="resultstree.cpp" line="412"/>
<source>Copy full path</source> <source>Copy full path</source>
<translation>Kopioi tiedoston koko polku</translation> <translation>Kopioi tiedoston koko polku</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="421"/> <location filename="resultstree.cpp" line="413"/>
<source>Copy message</source> <source>Copy message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="459"/> <location filename="resultstree.cpp" line="451"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="460"/> <location filename="resultstree.cpp" line="452"/>
<source>Configure the text file viewer program in Cppcheck preferences/Applications.</source> <source>Configure the text file viewer program in Cppcheck preferences/Applications.</source>
<oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource> <oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource>
<translation>Voit asetuksista määritellä muita ohjelmia joilla avata tämän virheen sisältävän tiedoston.</translation> <translation>Voit asetuksista määritellä muita ohjelmia joilla avata tämän virheen sisältävän tiedoston.</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="497"/> <location filename="resultstree.cpp" line="479"/>
<source>Could not find the file!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="517"/>
<source>Could not start %1 <source>Could not start %1
Please check the application path and parameters are correct.</source> Please check the application path and parameters are correct.</source>
@ -615,12 +631,24 @@ Please check the application path and parameters are correct.</source>
Tarkista että ohjelman polku ja parametrit ovat oikeat.</translation> Tarkista että ohjelman polku ja parametrit ovat oikeat.</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="661"/> <location filename="resultstree.cpp" line="531"/>
<source>Could not find file:
%1
Please select the directory where file is located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="538"/>
<source>Select Directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="693"/>
<source>style</source> <source>style</source>
<translation>Tyyli</translation> <translation>Tyyli</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="665"/> <location filename="resultstree.cpp" line="697"/>
<source>error</source> <source>error</source>
<translation>Yleinen</translation> <translation>Yleinen</translation>
</message> </message>
@ -628,31 +656,37 @@ Tarkista että ohjelman polku ja parametrit ovat oikeat.</translation>
<context> <context>
<name>ResultsView</name> <name>ResultsView</name>
<message> <message>
<location filename="resultsview.cpp" line="174"/> <location filename="resultsview.cpp" line="182"/>
<location filename="resultsview.cpp" line="186"/> <location filename="resultsview.cpp" line="194"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="175"/> <location filename="resultsview.cpp" line="183"/>
<source>No errors found.</source> <source>No errors found.</source>
<translation>Virheitä ei löytynyt.</translation> <translation>Virheitä ei löytynyt.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="183"/> <location filename="resultsview.cpp" line="191"/>
<source>Errors were found, but they are configured to be hidden. <source>Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.</source> To toggle what kind of errors are shown, open view menu.</source>
<translation>Virheitä löytyi, mutta asetuksissa kyseiset virheet on määritelty piilotettavaksi. <translation>Virheitä löytyi, mutta asetuksissa kyseiset virheet on määritelty piilotettavaksi.
Määrittääksesi minkä tyyppisiä virheitä näytetään, avaa näkymä valikko.</translation> Määrittääksesi minkä tyyppisiä virheitä näytetään, avaa näkymä valikko.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="101"/> <location filename="resultsview.cpp" line="240"/>
<location filename="resultsview.cpp" line="250"/>
<source>Failed to read the report.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultsview.cpp" line="109"/>
<source>No errors found, nothing to save.</source> <source>No errors found, nothing to save.</source>
<translation>Virheitä ei löytynyt, ei mitään tallennettavaa.</translation> <translation>Virheitä ei löytynyt, ei mitään tallennettavaa.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="128"/> <location filename="resultsview.cpp" line="136"/>
<location filename="resultsview.cpp" line="138"/> <location filename="resultsview.cpp" line="146"/>
<source>Failed to save the report.</source> <source>Failed to save the report.</source>
<translation>Raportin tallentaminen epäonnistui.</translation> <translation>Raportin tallentaminen epäonnistui.</translation>
</message> </message>

View File

@ -141,15 +141,15 @@ kate -l(line) (file)</translation>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="main.ui" line="26"/> <location filename="main.ui" line="26"/>
<location filename="mainwindow.cpp" line="220"/> <location filename="mainwindow.cpp" line="221"/>
<location filename="mainwindow.cpp" line="483"/> <location filename="mainwindow.cpp" line="500"/>
<location filename="mainwindow.cpp" line="585"/> <location filename="mainwindow.cpp" line="602"/>
<location filename="mainwindow.cpp" line="603"/> <location filename="mainwindow.cpp" line="620"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="143"/> <location filename="main.ui" line="144"/>
<source>Standard</source> <source>Standard</source>
<translation>Standaard</translation> <translation>Standaard</translation>
</message> </message>
@ -159,217 +159,222 @@ kate -l(line) (file)</translation>
<translation>&amp;Bestand</translation> <translation>&amp;Bestand</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="83"/> <location filename="main.ui" line="84"/>
<source>&amp;View</source> <source>&amp;View</source>
<translation>&amp;Weergave</translation> <translation>&amp;Weergave</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="87"/> <location filename="main.ui" line="88"/>
<source>&amp;Toolbars</source> <source>&amp;Toolbars</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="120"/> <location filename="main.ui" line="121"/>
<source>&amp;Check</source> <source>&amp;Check</source>
<translation>&amp;Controleer</translation> <translation>&amp;Controleer</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="129"/> <location filename="main.ui" line="130"/>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation>Be&amp;werken</translation> <translation>Be&amp;werken</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="174"/> <location filename="main.ui" line="175"/>
<source>&amp;License...</source> <source>&amp;License...</source>
<translation>&amp;Licentie...</translation> <translation>&amp;Licentie...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="179"/> <location filename="main.ui" line="180"/>
<source>A&amp;uthors...</source> <source>A&amp;uthors...</source>
<translation>A&amp;uteurs...</translation> <translation>A&amp;uteurs...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="188"/> <location filename="main.ui" line="189"/>
<source>&amp;About...</source> <source>&amp;About...</source>
<translation>&amp;Over...</translation> <translation>&amp;Over...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="193"/> <location filename="main.ui" line="194"/>
<source>&amp;Files...</source> <source>&amp;Files...</source>
<translation>&amp;Bestanden...</translation> <translation>&amp;Bestanden...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="196"/> <location filename="main.ui" line="197"/>
<source>Ctrl+F</source> <source>Ctrl+F</source>
<translation>Ctrl+F</translation> <translation>Ctrl+F</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="205"/> <location filename="main.ui" line="206"/>
<source>&amp;Directory...</source> <source>&amp;Directory...</source>
<translation>&amp;Mappen...</translation> <translation>&amp;Mappen...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="208"/> <location filename="main.ui" line="209"/>
<source>Ctrl+D</source> <source>Ctrl+D</source>
<translation>Ctrl+D</translation> <translation>Ctrl+D</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="217"/> <location filename="main.ui" line="218"/>
<source>&amp;Recheck files</source> <source>&amp;Recheck files</source>
<translation>&amp;Opnieuw controleren</translation> <translation>&amp;Opnieuw controleren</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="220"/> <location filename="main.ui" line="221"/>
<source>Ctrl+R</source> <source>Ctrl+R</source>
<translation>Ctrl+R</translation> <translation>Ctrl+R</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="229"/> <location filename="main.ui" line="230"/>
<source>&amp;Stop</source> <source>&amp;Stop</source>
<translation>&amp;Stop</translation> <translation>&amp;Stop</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="232"/> <location filename="main.ui" line="233"/>
<source>Esc</source> <source>Esc</source>
<translation>Esc</translation> <translation>Esc</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="241"/> <location filename="main.ui" line="242"/>
<source>&amp;Save results to file...</source> <source>&amp;Save results to file...</source>
<translation>&amp;Resultaten opslaan...</translation> <translation>&amp;Resultaten opslaan...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="244"/> <location filename="main.ui" line="245"/>
<source>Ctrl+S</source> <source>Ctrl+S</source>
<translation>Ctrl+S</translation> <translation>Ctrl+S</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="249"/> <location filename="main.ui" line="250"/>
<source>&amp;Quit</source> <source>&amp;Quit</source>
<translation>&amp;Afsluiten</translation> <translation>&amp;Afsluiten</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="258"/> <location filename="main.ui" line="259"/>
<source>&amp;Clear results</source> <source>&amp;Clear results</source>
<translation>&amp;Resultaten wissen</translation> <translation>&amp;Resultaten wissen</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="267"/> <location filename="main.ui" line="268"/>
<source>&amp;Preferences</source> <source>&amp;Preferences</source>
<translation>&amp;Voorkeuren</translation> <translation>&amp;Voorkeuren</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="279"/> <location filename="main.ui" line="280"/>
<source>Show style errors</source> <source>Show style errors</source>
<translation type="unfinished">Toon stijl fouten</translation> <translation type="unfinished">Toon stijl fouten</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="291"/> <location filename="main.ui" line="292"/>
<source>Show common errors</source> <source>Show common errors</source>
<translation>Toon gewone fouten</translation> <translation>Toon gewone fouten</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="296"/> <location filename="main.ui" line="297"/>
<source>&amp;Check all</source> <source>&amp;Check all</source>
<translation>&amp;Selecteer alles</translation> <translation>&amp;Selecteer alles</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="301"/> <location filename="main.ui" line="302"/>
<source>&amp;Uncheck all</source> <source>&amp;Uncheck all</source>
<translation>Selecteer &amp;niets</translation> <translation>Selecteer &amp;niets</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="306"/> <location filename="main.ui" line="307"/>
<source>Collapse &amp;all</source> <source>Collapse &amp;all</source>
<translation>Alles Inkl&amp;appen</translation> <translation>Alles Inkl&amp;appen</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="311"/> <location filename="main.ui" line="312"/>
<source>&amp;Expand all</source> <source>&amp;Expand all</source>
<translation>Alles &amp;Uitklappen</translation> <translation>Alles &amp;Uitklappen</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="319"/> <location filename="main.ui" line="320"/>
<source>&amp;Standard</source> <source>&amp;Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="322"/> <location filename="main.ui" line="323"/>
<source>Standard items</source> <source>Standard items</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="338"/> <location filename="main.ui" line="339"/>
<source>Toolbar</source> <source>Toolbar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="346"/> <location filename="main.ui" line="347"/>
<source>&amp;Categories</source> <source>&amp;Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="349"/> <location filename="main.ui" line="350"/>
<source>Error categories</source> <source>Error categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="354"/> <location filename="main.ui" line="355"/>
<source>&amp;Open XML...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.ui" line="360"/>
<source>Open P&amp;roject File...</source> <source>Open P&amp;roject File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="359"/> <location filename="main.ui" line="365"/>
<source>&amp;New Project File...</source> <source>&amp;New Project File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="327"/> <location filename="main.ui" line="328"/>
<source>&amp;Contents</source> <source>&amp;Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="161"/> <location filename="main.ui" line="162"/>
<source>Categories</source> <source>Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="330"/> <location filename="main.ui" line="331"/>
<source>Open the help contents</source> <source>Open the help contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="333"/> <location filename="main.ui" line="334"/>
<source>F1</source> <source>F1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="105"/> <location filename="main.ui" line="106"/>
<source>&amp;Language</source> <source>&amp;Language</source>
<translation>&amp;Taal</translation> <translation>&amp;Taal</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="110"/> <location filename="main.ui" line="111"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation>&amp;Help</translation> <translation>&amp;Help</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="253"/> <location filename="mainwindow.cpp" line="254"/>
<source>Select files to check</source> <source>Select files to check</source>
<translation>Selecteer bestanden om te controleren</translation> <translation>Selecteer bestanden om te controleren</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="267"/> <location filename="mainwindow.cpp" line="268"/>
<source>Select directory to check</source> <source>Select directory to check</source>
<translation>Selecteer een map om te controleren</translation> <translation>Selecteer een map om te controleren</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="221"/> <location filename="mainwindow.cpp" line="222"/>
<source>No suitable files found to check!</source> <source>No suitable files found to check!</source>
<translation>Geen geschikte bestanden gevonden om te controleren!</translation> <translation>Geen geschikte bestanden gevonden om te controleren!</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="479"/> <location filename="mainwindow.cpp" line="496"/>
<source>Cannot exit while checking. <source>Cannot exit while checking.
Stop the checking before exiting.</source> Stop the checking before exiting.</source>
@ -378,47 +383,53 @@ Stop the checking before exiting.</source>
Stop de controle alvorens te sluiten.</translation> Stop de controle alvorens te sluiten.</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="510"/> <location filename="mainwindow.cpp" line="527"/>
<source>License</source> <source>License</source>
<translation>Licentie</translation> <translation>Licentie</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="517"/> <location filename="mainwindow.cpp" line="534"/>
<source>Authors</source> <source>Authors</source>
<translation>Auteurs</translation> <translation>Auteurs</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="525"/> <location filename="mainwindow.cpp" line="542"/>
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source> <source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
<translation>XML bestanden (*.xml);;Tekst bestanden (*.txt);;CSV bestanden (*.csv)</translation> <translation>XML bestanden (*.xml);;Tekst bestanden (*.txt);;CSV bestanden (*.csv)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="527"/> <location filename="mainwindow.cpp" line="544"/>
<source>Save the report file</source> <source>Save the report file</source>
<translation>Rapport opslaan </translation> <translation>Rapport opslaan </translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="535"/> <location filename="mainwindow.cpp" line="442"/>
<location filename="mainwindow.cpp" line="552"/>
<source>XML files (*.xml)</source> <source>XML files (*.xml)</source>
<translation>XML bestanden (*.xml)</translation> <translation>XML bestanden (*.xml)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="541"/> <location filename="mainwindow.cpp" line="444"/>
<source>Open the report file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="558"/>
<source>Text files (*.txt)</source> <source>Text files (*.txt)</source>
<translation>Tekst bestanden (*.txt)</translation> <translation>Tekst bestanden (*.txt)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="547"/> <location filename="mainwindow.cpp" line="564"/>
<source>CSV files (*.csv)</source> <source>CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="587"/> <location filename="mainwindow.cpp" line="604"/>
<source>Cppcheck - %1</source> <source>Cppcheck - %1</source>
<translation>Cppcheck - %1</translation> <translation>Cppcheck - %1</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="604"/> <location filename="mainwindow.cpp" line="621"/>
<source>Failed to change the language: <source>Failed to change the language:
%1 %1
@ -432,12 +443,12 @@ Stop de controle alvorens te sluiten.</translation>
%1</translation> %1</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="671"/> <location filename="mainwindow.cpp" line="688"/>
<source>Project files (*.cppcheck);;All files(*.*)</source> <source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="673"/> <location filename="mainwindow.cpp" line="690"/>
<source>Select Project File</source> <source>Select Project File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -547,62 +558,67 @@ Stop de controle alvorens te sluiten.</translation>
<context> <context>
<name>ResultsTree</name> <name>ResultsTree</name>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>File</source> <source>File</source>
<translation>Bestand</translation> <translation>Bestand</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Severity</source> <source>Severity</source>
<translation>Ernst</translation> <translation>Ernst</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Line</source> <source>Line</source>
<translation>Regel</translation> <translation>Regel</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Message</source> <source>Message</source>
<translation>Boodschap</translation> <translation>Boodschap</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="88"/> <location filename="resultstree.cpp" line="82"/>
<source>Undefined file</source> <source>Undefined file</source>
<translation>Niet gedefinieerd bestand</translation> <translation>Niet gedefinieerd bestand</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="419"/> <location filename="resultstree.cpp" line="411"/>
<source>Copy filename</source> <source>Copy filename</source>
<translation>Kopier bestandsnaam</translation> <translation>Kopier bestandsnaam</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="420"/> <location filename="resultstree.cpp" line="412"/>
<source>Copy full path</source> <source>Copy full path</source>
<translation>Kopieer volledig pad</translation> <translation>Kopieer volledig pad</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="421"/> <location filename="resultstree.cpp" line="413"/>
<source>Copy message</source> <source>Copy message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="459"/> <location filename="resultstree.cpp" line="451"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="460"/> <location filename="resultstree.cpp" line="452"/>
<source>Configure the text file viewer program in Cppcheck preferences/Applications.</source> <source>Configure the text file viewer program in Cppcheck preferences/Applications.</source>
<oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource> <oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource>
<translation>U dient een applicatie te configureren in de instellingen om deze fout in te openen.</translation> <translation>U dient een applicatie te configureren in de instellingen om deze fout in te openen.</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="497"/> <location filename="resultstree.cpp" line="479"/>
<source>Could not find the file!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="517"/>
<source>Could not start %1 <source>Could not start %1
Please check the application path and parameters are correct.</source> Please check the application path and parameters are correct.</source>
@ -611,12 +627,24 @@ Please check the application path and parameters are correct.</source>
Gelieve te controleren of de het pad en de parameters correct zijn.</translation> Gelieve te controleren of de het pad en de parameters correct zijn.</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="661"/> <location filename="resultstree.cpp" line="531"/>
<source>Could not find file:
%1
Please select the directory where file is located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="538"/>
<source>Select Directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="693"/>
<source>style</source> <source>style</source>
<translation>Stijlfouten</translation> <translation>Stijlfouten</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="665"/> <location filename="resultstree.cpp" line="697"/>
<source>error</source> <source>error</source>
<translation>Fouten</translation> <translation>Fouten</translation>
</message> </message>
@ -624,31 +652,37 @@ Gelieve te controleren of de het pad en de parameters correct zijn.</translation
<context> <context>
<name>ResultsView</name> <name>ResultsView</name>
<message> <message>
<location filename="resultsview.cpp" line="174"/> <location filename="resultsview.cpp" line="182"/>
<location filename="resultsview.cpp" line="186"/> <location filename="resultsview.cpp" line="194"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="175"/> <location filename="resultsview.cpp" line="183"/>
<source>No errors found.</source> <source>No errors found.</source>
<translation>Geen fouten gevonden.</translation> <translation>Geen fouten gevonden.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="183"/> <location filename="resultsview.cpp" line="191"/>
<source>Errors were found, but they are configured to be hidden. <source>Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.</source> To toggle what kind of errors are shown, open view menu.</source>
<translation>Fouten werden gevonden, maar volgens de configuratie zijn deze verborgen. <translation>Fouten werden gevonden, maar volgens de configuratie zijn deze verborgen.
Gebruik het uitzicht menu om te selecteren welke fouten getoond worden.</translation> Gebruik het uitzicht menu om te selecteren welke fouten getoond worden.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="101"/> <location filename="resultsview.cpp" line="240"/>
<location filename="resultsview.cpp" line="250"/>
<source>Failed to read the report.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultsview.cpp" line="109"/>
<source>No errors found, nothing to save.</source> <source>No errors found, nothing to save.</source>
<translation>Geen fouten gevonden; geen data om op te slaan.</translation> <translation>Geen fouten gevonden; geen data om op te slaan.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="128"/> <location filename="resultsview.cpp" line="136"/>
<location filename="resultsview.cpp" line="138"/> <location filename="resultsview.cpp" line="146"/>
<source>Failed to save the report.</source> <source>Failed to save the report.</source>
<translation>Kon het rapport niet opslaan.</translation> <translation>Kon het rapport niet opslaan.</translation>
</message> </message>

View File

@ -128,10 +128,10 @@ kate -l(line) (file)</oldsource>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="main.ui" line="26"/> <location filename="main.ui" line="26"/>
<location filename="mainwindow.cpp" line="220"/> <location filename="mainwindow.cpp" line="221"/>
<location filename="mainwindow.cpp" line="483"/> <location filename="mainwindow.cpp" line="500"/>
<location filename="mainwindow.cpp" line="585"/> <location filename="mainwindow.cpp" line="602"/>
<location filename="mainwindow.cpp" line="603"/> <location filename="mainwindow.cpp" line="620"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -141,269 +141,280 @@ kate -l(line) (file)</oldsource>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="83"/> <location filename="main.ui" line="84"/>
<source>&amp;View</source> <source>&amp;View</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="87"/> <location filename="main.ui" line="88"/>
<source>&amp;Toolbars</source> <source>&amp;Toolbars</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="105"/> <location filename="main.ui" line="106"/>
<source>&amp;Language</source> <source>&amp;Language</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="110"/> <location filename="main.ui" line="111"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="120"/> <location filename="main.ui" line="121"/>
<source>&amp;Check</source> <source>&amp;Check</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="129"/> <location filename="main.ui" line="130"/>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="143"/> <location filename="main.ui" line="144"/>
<source>Standard</source> <source>Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="174"/> <location filename="main.ui" line="175"/>
<source>&amp;License...</source> <source>&amp;License...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="179"/> <location filename="main.ui" line="180"/>
<source>A&amp;uthors...</source> <source>A&amp;uthors...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="188"/> <location filename="main.ui" line="189"/>
<source>&amp;About...</source> <source>&amp;About...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="193"/> <location filename="main.ui" line="194"/>
<source>&amp;Files...</source> <source>&amp;Files...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="196"/> <location filename="main.ui" line="197"/>
<source>Ctrl+F</source> <source>Ctrl+F</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="205"/> <location filename="main.ui" line="206"/>
<source>&amp;Directory...</source> <source>&amp;Directory...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="208"/> <location filename="main.ui" line="209"/>
<source>Ctrl+D</source> <source>Ctrl+D</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="217"/> <location filename="main.ui" line="218"/>
<source>&amp;Recheck files</source> <source>&amp;Recheck files</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="220"/> <location filename="main.ui" line="221"/>
<source>Ctrl+R</source> <source>Ctrl+R</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="229"/> <location filename="main.ui" line="230"/>
<source>&amp;Stop</source> <source>&amp;Stop</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="232"/> <location filename="main.ui" line="233"/>
<source>Esc</source> <source>Esc</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="241"/> <location filename="main.ui" line="242"/>
<source>&amp;Save results to file...</source> <source>&amp;Save results to file...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="244"/> <location filename="main.ui" line="245"/>
<source>Ctrl+S</source> <source>Ctrl+S</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="249"/> <location filename="main.ui" line="250"/>
<source>&amp;Quit</source> <source>&amp;Quit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="258"/> <location filename="main.ui" line="259"/>
<source>&amp;Clear results</source> <source>&amp;Clear results</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="267"/> <location filename="main.ui" line="268"/>
<source>&amp;Preferences</source> <source>&amp;Preferences</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="279"/> <location filename="main.ui" line="280"/>
<source>Show style errors</source> <source>Show style errors</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="291"/> <location filename="main.ui" line="292"/>
<source>Show common errors</source> <source>Show common errors</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="296"/> <location filename="main.ui" line="297"/>
<source>&amp;Check all</source> <source>&amp;Check all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="301"/> <location filename="main.ui" line="302"/>
<source>&amp;Uncheck all</source> <source>&amp;Uncheck all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="306"/> <location filename="main.ui" line="307"/>
<source>Collapse &amp;all</source> <source>Collapse &amp;all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="311"/> <location filename="main.ui" line="312"/>
<source>&amp;Expand all</source> <source>&amp;Expand all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="319"/> <location filename="main.ui" line="320"/>
<source>&amp;Standard</source> <source>&amp;Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="322"/> <location filename="main.ui" line="323"/>
<source>Standard items</source> <source>Standard items</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="338"/> <location filename="main.ui" line="339"/>
<source>Toolbar</source> <source>Toolbar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="346"/> <location filename="main.ui" line="347"/>
<source>&amp;Categories</source> <source>&amp;Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="349"/> <location filename="main.ui" line="350"/>
<source>Error categories</source> <source>Error categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="354"/> <location filename="main.ui" line="355"/>
<source>&amp;Open XML...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.ui" line="360"/>
<source>Open P&amp;roject File...</source> <source>Open P&amp;roject File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="359"/> <location filename="main.ui" line="365"/>
<source>&amp;New Project File...</source> <source>&amp;New Project File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="327"/> <location filename="main.ui" line="328"/>
<source>&amp;Contents</source> <source>&amp;Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="161"/> <location filename="main.ui" line="162"/>
<source>Categories</source> <source>Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="330"/> <location filename="main.ui" line="331"/>
<source>Open the help contents</source> <source>Open the help contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="333"/> <location filename="main.ui" line="334"/>
<source>F1</source> <source>F1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="221"/> <location filename="mainwindow.cpp" line="222"/>
<source>No suitable files found to check!</source> <source>No suitable files found to check!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="253"/> <location filename="mainwindow.cpp" line="254"/>
<source>Select files to check</source> <source>Select files to check</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="267"/> <location filename="mainwindow.cpp" line="268"/>
<source>Select directory to check</source> <source>Select directory to check</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="479"/> <location filename="mainwindow.cpp" line="444"/>
<source>Open the report file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="496"/>
<source>Cannot exit while checking. <source>Cannot exit while checking.
Stop the checking before exiting.</source> Stop the checking before exiting.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="510"/> <location filename="mainwindow.cpp" line="527"/>
<source>License</source> <source>License</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="517"/> <location filename="mainwindow.cpp" line="534"/>
<source>Authors</source> <source>Authors</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="525"/> <location filename="mainwindow.cpp" line="542"/>
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source> <source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="527"/> <location filename="mainwindow.cpp" line="544"/>
<source>Save the report file</source> <source>Save the report file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="535"/> <location filename="mainwindow.cpp" line="442"/>
<location filename="mainwindow.cpp" line="552"/>
<source>XML files (*.xml)</source> <source>XML files (*.xml)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="541"/> <location filename="mainwindow.cpp" line="558"/>
<source>Text files (*.txt)</source> <source>Text files (*.txt)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="547"/> <location filename="mainwindow.cpp" line="564"/>
<source>CSV files (*.csv)</source> <source>CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="587"/> <location filename="mainwindow.cpp" line="604"/>
<source>Cppcheck - %1</source> <source>Cppcheck - %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="604"/> <location filename="mainwindow.cpp" line="621"/>
<source>Failed to change the language: <source>Failed to change the language:
%1 %1
@ -412,12 +423,12 @@ Stop the checking before exiting.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="671"/> <location filename="mainwindow.cpp" line="688"/>
<source>Project files (*.cppcheck);;All files(*.*)</source> <source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="673"/> <location filename="mainwindow.cpp" line="690"/>
<source>Select Project File</source> <source>Select Project File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -525,73 +536,90 @@ Stop the checking before exiting.</source>
<context> <context>
<name>ResultsTree</name> <name>ResultsTree</name>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>File</source> <source>File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Severity</source> <source>Severity</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Message</source> <source>Message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="88"/> <location filename="resultstree.cpp" line="82"/>
<source>Undefined file</source> <source>Undefined file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="419"/> <location filename="resultstree.cpp" line="411"/>
<source>Copy filename</source> <source>Copy filename</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="420"/> <location filename="resultstree.cpp" line="412"/>
<source>Copy full path</source> <source>Copy full path</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="421"/> <location filename="resultstree.cpp" line="413"/>
<source>Copy message</source> <source>Copy message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="459"/> <location filename="resultstree.cpp" line="451"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="460"/> <location filename="resultstree.cpp" line="452"/>
<source>Configure the text file viewer program in Cppcheck preferences/Applications.</source> <source>Configure the text file viewer program in Cppcheck preferences/Applications.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="497"/> <location filename="resultstree.cpp" line="479"/>
<source>Could not find the file!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="517"/>
<source>Could not start %1 <source>Could not start %1
Please check the application path and parameters are correct.</source> Please check the application path and parameters are correct.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="661"/> <location filename="resultstree.cpp" line="531"/>
<source>Could not find file:
%1
Please select the directory where file is located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="538"/>
<source>Select Directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="693"/>
<source>style</source> <source>style</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="665"/> <location filename="resultstree.cpp" line="697"/>
<source>error</source> <source>error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -599,30 +627,36 @@ Please check the application path and parameters are correct.</source>
<context> <context>
<name>ResultsView</name> <name>ResultsView</name>
<message> <message>
<location filename="resultsview.cpp" line="174"/> <location filename="resultsview.cpp" line="182"/>
<location filename="resultsview.cpp" line="186"/> <location filename="resultsview.cpp" line="194"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="175"/> <location filename="resultsview.cpp" line="183"/>
<source>No errors found.</source> <source>No errors found.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="183"/> <location filename="resultsview.cpp" line="191"/>
<source>Errors were found, but they are configured to be hidden. <source>Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.</source> To toggle what kind of errors are shown, open view menu.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="101"/> <location filename="resultsview.cpp" line="240"/>
<location filename="resultsview.cpp" line="250"/>
<source>Failed to read the report.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultsview.cpp" line="109"/>
<source>No errors found, nothing to save.</source> <source>No errors found, nothing to save.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="128"/> <location filename="resultsview.cpp" line="136"/>
<location filename="resultsview.cpp" line="138"/> <location filename="resultsview.cpp" line="146"/>
<source>Failed to save the report.</source> <source>Failed to save the report.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -131,15 +131,15 @@ kate -l(line) (file)</oldsource>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="main.ui" line="26"/> <location filename="main.ui" line="26"/>
<location filename="mainwindow.cpp" line="220"/> <location filename="mainwindow.cpp" line="221"/>
<location filename="mainwindow.cpp" line="483"/> <location filename="mainwindow.cpp" line="500"/>
<location filename="mainwindow.cpp" line="585"/> <location filename="mainwindow.cpp" line="602"/>
<location filename="mainwindow.cpp" line="603"/> <location filename="mainwindow.cpp" line="620"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="143"/> <location filename="main.ui" line="144"/>
<source>Standard</source> <source>Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -149,264 +149,275 @@ kate -l(line) (file)</oldsource>
<translation>Файл</translation> <translation>Файл</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="83"/> <location filename="main.ui" line="84"/>
<source>&amp;View</source> <source>&amp;View</source>
<translation>Вид</translation> <translation>Вид</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="87"/> <location filename="main.ui" line="88"/>
<source>&amp;Toolbars</source> <source>&amp;Toolbars</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="120"/> <location filename="main.ui" line="121"/>
<source>&amp;Check</source> <source>&amp;Check</source>
<translation>Проверить</translation> <translation>Проверить</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="129"/> <location filename="main.ui" line="130"/>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation>Правка</translation> <translation>Правка</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="174"/> <location filename="main.ui" line="175"/>
<source>&amp;License...</source> <source>&amp;License...</source>
<translation>Лицензия...</translation> <translation>Лицензия...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="179"/> <location filename="main.ui" line="180"/>
<source>A&amp;uthors...</source> <source>A&amp;uthors...</source>
<translation>Авторы...</translation> <translation>Авторы...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="188"/> <location filename="main.ui" line="189"/>
<source>&amp;About...</source> <source>&amp;About...</source>
<translation>О программе...</translation> <translation>О программе...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="193"/> <location filename="main.ui" line="194"/>
<source>&amp;Files...</source> <source>&amp;Files...</source>
<translation>Файлы...</translation> <translation>Файлы...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="196"/> <location filename="main.ui" line="197"/>
<source>Ctrl+F</source> <source>Ctrl+F</source>
<translation>Ctrl+F</translation> <translation>Ctrl+F</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="205"/> <location filename="main.ui" line="206"/>
<source>&amp;Directory...</source> <source>&amp;Directory...</source>
<translation>Каталог...</translation> <translation>Каталог...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="208"/> <location filename="main.ui" line="209"/>
<source>Ctrl+D</source> <source>Ctrl+D</source>
<translation>Ctrl+D</translation> <translation>Ctrl+D</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="217"/> <location filename="main.ui" line="218"/>
<source>&amp;Recheck files</source> <source>&amp;Recheck files</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="220"/> <location filename="main.ui" line="221"/>
<source>Ctrl+R</source> <source>Ctrl+R</source>
<translation>Ctrl+R</translation> <translation>Ctrl+R</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="229"/> <location filename="main.ui" line="230"/>
<source>&amp;Stop</source> <source>&amp;Stop</source>
<translation>Остановить</translation> <translation>Остановить</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="232"/> <location filename="main.ui" line="233"/>
<source>Esc</source> <source>Esc</source>
<translation>Esc</translation> <translation>Esc</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="241"/> <location filename="main.ui" line="242"/>
<source>&amp;Save results to file...</source> <source>&amp;Save results to file...</source>
<translation>Сохранить отчёт в файл...</translation> <translation>Сохранить отчёт в файл...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="244"/> <location filename="main.ui" line="245"/>
<source>Ctrl+S</source> <source>Ctrl+S</source>
<translation>Ctrl+S</translation> <translation>Ctrl+S</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="249"/> <location filename="main.ui" line="250"/>
<source>&amp;Quit</source> <source>&amp;Quit</source>
<translation>Выход</translation> <translation>Выход</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="258"/> <location filename="main.ui" line="259"/>
<source>&amp;Clear results</source> <source>&amp;Clear results</source>
<translation>Очистить отчёт</translation> <translation>Очистить отчёт</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="267"/> <location filename="main.ui" line="268"/>
<source>&amp;Preferences</source> <source>&amp;Preferences</source>
<translation>Параметры</translation> <translation>Параметры</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="279"/> <location filename="main.ui" line="280"/>
<source>Show style errors</source> <source>Show style errors</source>
<translation>Показывать ошибки стиля</translation> <translation>Показывать ошибки стиля</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="291"/> <location filename="main.ui" line="292"/>
<source>Show common errors</source> <source>Show common errors</source>
<translation>Показывать общие ошибки</translation> <translation>Показывать общие ошибки</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="296"/> <location filename="main.ui" line="297"/>
<source>&amp;Check all</source> <source>&amp;Check all</source>
<translation>Отметить все</translation> <translation>Отметить все</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="301"/> <location filename="main.ui" line="302"/>
<source>&amp;Uncheck all</source> <source>&amp;Uncheck all</source>
<translation>Сбросить все</translation> <translation>Сбросить все</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="306"/> <location filename="main.ui" line="307"/>
<source>Collapse &amp;all</source> <source>Collapse &amp;all</source>
<translation>Свернуть все</translation> <translation>Свернуть все</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="311"/> <location filename="main.ui" line="312"/>
<source>&amp;Expand all</source> <source>&amp;Expand all</source>
<translation>Развернуть все</translation> <translation>Развернуть все</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="319"/> <location filename="main.ui" line="320"/>
<source>&amp;Standard</source> <source>&amp;Standard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="322"/> <location filename="main.ui" line="323"/>
<source>Standard items</source> <source>Standard items</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="338"/> <location filename="main.ui" line="339"/>
<source>Toolbar</source> <source>Toolbar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="346"/> <location filename="main.ui" line="347"/>
<source>&amp;Categories</source> <source>&amp;Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="349"/> <location filename="main.ui" line="350"/>
<source>Error categories</source> <source>Error categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="354"/> <location filename="main.ui" line="355"/>
<source>&amp;Open XML...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.ui" line="360"/>
<source>Open P&amp;roject File...</source> <source>Open P&amp;roject File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="359"/> <location filename="main.ui" line="365"/>
<source>&amp;New Project File...</source> <source>&amp;New Project File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="327"/> <location filename="main.ui" line="328"/>
<source>&amp;Contents</source> <source>&amp;Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="161"/> <location filename="main.ui" line="162"/>
<source>Categories</source> <source>Categories</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="330"/> <location filename="main.ui" line="331"/>
<source>Open the help contents</source> <source>Open the help contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="333"/> <location filename="main.ui" line="334"/>
<source>F1</source> <source>F1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="105"/> <location filename="main.ui" line="106"/>
<source>&amp;Language</source> <source>&amp;Language</source>
<translation>Язык</translation> <translation>Язык</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="110"/> <location filename="main.ui" line="111"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation>Помощь</translation> <translation>Помощь</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="253"/> <location filename="mainwindow.cpp" line="254"/>
<source>Select files to check</source> <source>Select files to check</source>
<translation>Выберите файлы для проверки</translation> <translation>Выберите файлы для проверки</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="267"/> <location filename="mainwindow.cpp" line="268"/>
<source>Select directory to check</source> <source>Select directory to check</source>
<translation>Выберите каталог для проверки</translation> <translation>Выберите каталог для проверки</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="221"/> <location filename="mainwindow.cpp" line="222"/>
<source>No suitable files found to check!</source> <source>No suitable files found to check!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="479"/> <location filename="mainwindow.cpp" line="496"/>
<source>Cannot exit while checking. <source>Cannot exit while checking.
Stop the checking before exiting.</source> Stop the checking before exiting.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="510"/> <location filename="mainwindow.cpp" line="527"/>
<source>License</source> <source>License</source>
<translation>Лицензия</translation> <translation>Лицензия</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="517"/> <location filename="mainwindow.cpp" line="534"/>
<source>Authors</source> <source>Authors</source>
<translation>Авторы</translation> <translation>Авторы</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="525"/> <location filename="mainwindow.cpp" line="542"/>
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source> <source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="527"/> <location filename="mainwindow.cpp" line="544"/>
<source>Save the report file</source> <source>Save the report file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="535"/> <location filename="mainwindow.cpp" line="442"/>
<location filename="mainwindow.cpp" line="552"/>
<source>XML files (*.xml)</source> <source>XML files (*.xml)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="541"/> <location filename="mainwindow.cpp" line="444"/>
<source>Open the report file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="558"/>
<source>Text files (*.txt)</source> <source>Text files (*.txt)</source>
<translation>Текстовые файлы (*.txt)</translation> <translation>Текстовые файлы (*.txt)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="547"/> <location filename="mainwindow.cpp" line="564"/>
<source>CSV files (*.csv)</source> <source>CSV files (*.csv)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="587"/> <location filename="mainwindow.cpp" line="604"/>
<source>Cppcheck - %1</source> <source>Cppcheck - %1</source>
<translation>Cppcheck - %1</translation> <translation>Cppcheck - %1</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="604"/> <location filename="mainwindow.cpp" line="621"/>
<source>Failed to change the language: <source>Failed to change the language:
%1 %1
@ -422,12 +433,12 @@ Stop the checking before exiting.</source>
</translation> </translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="671"/> <location filename="mainwindow.cpp" line="688"/>
<source>Project files (*.cppcheck);;All files(*.*)</source> <source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="673"/> <location filename="mainwindow.cpp" line="690"/>
<source>Select Project File</source> <source>Select Project File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -537,74 +548,91 @@ Stop the checking before exiting.</source>
<context> <context>
<name>ResultsTree</name> <name>ResultsTree</name>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>File</source> <source>File</source>
<translation>Файл</translation> <translation>Файл</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Severity</source> <source>Severity</source>
<translation>Важность</translation> <translation>Важность</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Line</source> <source>Line</source>
<translation>Строка</translation> <translation>Строка</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Message</source> <source>Message</source>
<translation>Сообщение</translation> <translation>Сообщение</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="88"/> <location filename="resultstree.cpp" line="82"/>
<source>Undefined file</source> <source>Undefined file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="419"/> <location filename="resultstree.cpp" line="411"/>
<source>Copy filename</source> <source>Copy filename</source>
<translation>Скопировать имя файла</translation> <translation>Скопировать имя файла</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="420"/> <location filename="resultstree.cpp" line="412"/>
<source>Copy full path</source> <source>Copy full path</source>
<translation>Скопировать полный путь</translation> <translation>Скопировать полный путь</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="421"/> <location filename="resultstree.cpp" line="413"/>
<source>Copy message</source> <source>Copy message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="459"/> <location filename="resultstree.cpp" line="451"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="460"/> <location filename="resultstree.cpp" line="452"/>
<source>Configure the text file viewer program in Cppcheck preferences/Applications.</source> <source>Configure the text file viewer program in Cppcheck preferences/Applications.</source>
<oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource> <oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="497"/> <location filename="resultstree.cpp" line="479"/>
<source>Could not find the file!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="517"/>
<source>Could not start %1 <source>Could not start %1
Please check the application path and parameters are correct.</source> Please check the application path and parameters are correct.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="661"/> <location filename="resultstree.cpp" line="531"/>
<source>Could not find file:
%1
Please select the directory where file is located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="538"/>
<source>Select Directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="693"/>
<source>style</source> <source>style</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="665"/> <location filename="resultstree.cpp" line="697"/>
<source>error</source> <source>error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -612,30 +640,36 @@ Please check the application path and parameters are correct.</source>
<context> <context>
<name>ResultsView</name> <name>ResultsView</name>
<message> <message>
<location filename="resultsview.cpp" line="174"/> <location filename="resultsview.cpp" line="182"/>
<location filename="resultsview.cpp" line="186"/> <location filename="resultsview.cpp" line="194"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="175"/> <location filename="resultsview.cpp" line="183"/>
<source>No errors found.</source> <source>No errors found.</source>
<translation>Ошибок не найдено.</translation> <translation>Ошибок не найдено.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="183"/> <location filename="resultsview.cpp" line="191"/>
<source>Errors were found, but they are configured to be hidden. <source>Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.</source> To toggle what kind of errors are shown, open view menu.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="101"/> <location filename="resultsview.cpp" line="240"/>
<location filename="resultsview.cpp" line="250"/>
<source>Failed to read the report.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultsview.cpp" line="109"/>
<source>No errors found, nothing to save.</source> <source>No errors found, nothing to save.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="128"/> <location filename="resultsview.cpp" line="136"/>
<location filename="resultsview.cpp" line="138"/> <location filename="resultsview.cpp" line="146"/>
<source>Failed to save the report.</source> <source>Failed to save the report.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -141,15 +141,15 @@ kate -l(line) (file)</translation>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="main.ui" line="26"/> <location filename="main.ui" line="26"/>
<location filename="mainwindow.cpp" line="220"/> <location filename="mainwindow.cpp" line="221"/>
<location filename="mainwindow.cpp" line="483"/> <location filename="mainwindow.cpp" line="500"/>
<location filename="mainwindow.cpp" line="585"/> <location filename="mainwindow.cpp" line="602"/>
<location filename="mainwindow.cpp" line="603"/> <location filename="mainwindow.cpp" line="620"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="143"/> <location filename="main.ui" line="144"/>
<source>Standard</source> <source>Standard</source>
<translation>Standard</translation> <translation>Standard</translation>
</message> </message>
@ -159,265 +159,276 @@ kate -l(line) (file)</translation>
<translation>&amp;Arkiv</translation> <translation>&amp;Arkiv</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="83"/> <location filename="main.ui" line="84"/>
<source>&amp;View</source> <source>&amp;View</source>
<translation>&amp;Visa</translation> <translation>&amp;Visa</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="87"/> <location filename="main.ui" line="88"/>
<source>&amp;Toolbars</source> <source>&amp;Toolbars</source>
<translation>Verktygsfält</translation> <translation>Verktygsfält</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="120"/> <location filename="main.ui" line="121"/>
<source>&amp;Check</source> <source>&amp;Check</source>
<translation>&amp;Check</translation> <translation>&amp;Check</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="129"/> <location filename="main.ui" line="130"/>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation>&amp;Redigera</translation> <translation>&amp;Redigera</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="174"/> <location filename="main.ui" line="175"/>
<source>&amp;License...</source> <source>&amp;License...</source>
<translation>&amp;Licens...</translation> <translation>&amp;Licens...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="179"/> <location filename="main.ui" line="180"/>
<source>A&amp;uthors...</source> <source>A&amp;uthors...</source>
<translation>&amp;Utvecklat av...</translation> <translation>&amp;Utvecklat av...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="188"/> <location filename="main.ui" line="189"/>
<source>&amp;About...</source> <source>&amp;About...</source>
<translation>&amp;Om...</translation> <translation>&amp;Om...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="193"/> <location filename="main.ui" line="194"/>
<source>&amp;Files...</source> <source>&amp;Files...</source>
<translation>&amp;Filer...</translation> <translation>&amp;Filer...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="196"/> <location filename="main.ui" line="197"/>
<source>Ctrl+F</source> <source>Ctrl+F</source>
<translation>Ctrl+F</translation> <translation>Ctrl+F</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="205"/> <location filename="main.ui" line="206"/>
<source>&amp;Directory...</source> <source>&amp;Directory...</source>
<translation>&amp;Katalog...</translation> <translation>&amp;Katalog...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="208"/> <location filename="main.ui" line="209"/>
<source>Ctrl+D</source> <source>Ctrl+D</source>
<translation>Ctrl+D</translation> <translation>Ctrl+D</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="217"/> <location filename="main.ui" line="218"/>
<source>&amp;Recheck files</source> <source>&amp;Recheck files</source>
<translation>Starta &amp;om check</translation> <translation>Starta &amp;om check</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="220"/> <location filename="main.ui" line="221"/>
<source>Ctrl+R</source> <source>Ctrl+R</source>
<translation>Ctrl+R</translation> <translation>Ctrl+R</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="229"/> <location filename="main.ui" line="230"/>
<source>&amp;Stop</source> <source>&amp;Stop</source>
<translation>&amp;Stoppa</translation> <translation>&amp;Stoppa</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="232"/> <location filename="main.ui" line="233"/>
<source>Esc</source> <source>Esc</source>
<translation>Esc</translation> <translation>Esc</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="241"/> <location filename="main.ui" line="242"/>
<source>&amp;Save results to file...</source> <source>&amp;Save results to file...</source>
<translation>&amp;Spara resultat till fil...</translation> <translation>&amp;Spara resultat till fil...</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="244"/> <location filename="main.ui" line="245"/>
<source>Ctrl+S</source> <source>Ctrl+S</source>
<translation>Ctrl+S</translation> <translation>Ctrl+S</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="249"/> <location filename="main.ui" line="250"/>
<source>&amp;Quit</source> <source>&amp;Quit</source>
<translation>&amp;Avsluta</translation> <translation>&amp;Avsluta</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="258"/> <location filename="main.ui" line="259"/>
<source>&amp;Clear results</source> <source>&amp;Clear results</source>
<translation>&amp;Töm resultat</translation> <translation>&amp;Töm resultat</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="267"/> <location filename="main.ui" line="268"/>
<source>&amp;Preferences</source> <source>&amp;Preferences</source>
<translation>&amp;Inställningar</translation> <translation>&amp;Inställningar</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="279"/> <location filename="main.ui" line="280"/>
<source>Show style errors</source> <source>Show style errors</source>
<translation>Visa stilvarningar</translation> <translation>Visa stilvarningar</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="291"/> <location filename="main.ui" line="292"/>
<source>Show common errors</source> <source>Show common errors</source>
<translation>Visa vanliga fel</translation> <translation>Visa vanliga fel</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="296"/> <location filename="main.ui" line="297"/>
<source>&amp;Check all</source> <source>&amp;Check all</source>
<translation>&amp;Kryssa alla</translation> <translation>&amp;Kryssa alla</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="301"/> <location filename="main.ui" line="302"/>
<source>&amp;Uncheck all</source> <source>&amp;Uncheck all</source>
<translation>Kryssa &amp;ur alla</translation> <translation>Kryssa &amp;ur alla</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="306"/> <location filename="main.ui" line="307"/>
<source>Collapse &amp;all</source> <source>Collapse &amp;all</source>
<translatorcomment>Ingen bra översättning!</translatorcomment> <translatorcomment>Ingen bra översättning!</translatorcomment>
<translation>&amp;Fäll ihop alla</translation> <translation>&amp;Fäll ihop alla</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="311"/> <location filename="main.ui" line="312"/>
<source>&amp;Expand all</source> <source>&amp;Expand all</source>
<translation>&amp;Expandera alla</translation> <translation>&amp;Expandera alla</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="319"/> <location filename="main.ui" line="320"/>
<source>&amp;Standard</source> <source>&amp;Standard</source>
<translation>&amp;Standard</translation> <translation>&amp;Standard</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="322"/> <location filename="main.ui" line="323"/>
<source>Standard items</source> <source>Standard items</source>
<translation>Standard poster</translation> <translation>Standard poster</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="338"/> <location filename="main.ui" line="339"/>
<source>Toolbar</source> <source>Toolbar</source>
<translation>Verktygsfält</translation> <translation>Verktygsfält</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="346"/> <location filename="main.ui" line="347"/>
<source>&amp;Categories</source> <source>&amp;Categories</source>
<translation>&amp;Kategorier</translation> <translation>&amp;Kategorier</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="349"/> <location filename="main.ui" line="350"/>
<source>Error categories</source> <source>Error categories</source>
<translation>Fel kategorier</translation> <translation>Fel kategorier</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="354"/> <location filename="main.ui" line="355"/>
<source>&amp;Open XML...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.ui" line="360"/>
<source>Open P&amp;roject File...</source> <source>Open P&amp;roject File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="359"/> <location filename="main.ui" line="365"/>
<source>&amp;New Project File...</source> <source>&amp;New Project File...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="327"/> <location filename="main.ui" line="328"/>
<source>&amp;Contents</source> <source>&amp;Contents</source>
<translation>&amp;Innehåll</translation> <translation>&amp;Innehåll</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="161"/> <location filename="main.ui" line="162"/>
<source>Categories</source> <source>Categories</source>
<translation>Kategorier</translation> <translation>Kategorier</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="330"/> <location filename="main.ui" line="331"/>
<source>Open the help contents</source> <source>Open the help contents</source>
<translation>Öppna hjälp</translation> <translation>Öppna hjälp</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="333"/> <location filename="main.ui" line="334"/>
<source>F1</source> <source>F1</source>
<translation>F1</translation> <translation>F1</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="105"/> <location filename="main.ui" line="106"/>
<source>&amp;Language</source> <source>&amp;Language</source>
<translation>&amp;Språk</translation> <translation>&amp;Språk</translation>
</message> </message>
<message> <message>
<location filename="main.ui" line="110"/> <location filename="main.ui" line="111"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation>&amp;Hjälp</translation> <translation>&amp;Hjälp</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="253"/> <location filename="mainwindow.cpp" line="254"/>
<source>Select files to check</source> <source>Select files to check</source>
<translation>Välj filer att kontrollera</translation> <translation>Välj filer att kontrollera</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="267"/> <location filename="mainwindow.cpp" line="268"/>
<source>Select directory to check</source> <source>Select directory to check</source>
<translation>Välj katalog som skall kontrolleras</translation> <translation>Välj katalog som skall kontrolleras</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="221"/> <location filename="mainwindow.cpp" line="222"/>
<source>No suitable files found to check!</source> <source>No suitable files found to check!</source>
<translation>Inga lämpliga filer hittades!</translation> <translation>Inga lämpliga filer hittades!</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="479"/> <location filename="mainwindow.cpp" line="496"/>
<source>Cannot exit while checking. <source>Cannot exit while checking.
Stop the checking before exiting.</source> Stop the checking before exiting.</source>
<translation>Kan ej avsluta medans check pågår.</translation> <translation>Kan ej avsluta medans check pågår.</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="510"/> <location filename="mainwindow.cpp" line="527"/>
<source>License</source> <source>License</source>
<translation>Licens</translation> <translation>Licens</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="517"/> <location filename="mainwindow.cpp" line="534"/>
<source>Authors</source> <source>Authors</source>
<translation>Utvecklare</translation> <translation>Utvecklare</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="525"/> <location filename="mainwindow.cpp" line="542"/>
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source> <source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
<translation>XML filer (*.xml);;Text filer (*.txt);;CSV filer (*.csv)</translation> <translation>XML filer (*.xml);;Text filer (*.txt);;CSV filer (*.csv)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="527"/> <location filename="mainwindow.cpp" line="544"/>
<source>Save the report file</source> <source>Save the report file</source>
<translation>Spara rapport</translation> <translation>Spara rapport</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="535"/> <location filename="mainwindow.cpp" line="442"/>
<location filename="mainwindow.cpp" line="552"/>
<source>XML files (*.xml)</source> <source>XML files (*.xml)</source>
<translation>XML filer (*.xml)</translation> <translation>XML filer (*.xml)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="541"/> <location filename="mainwindow.cpp" line="444"/>
<source>Open the report file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="558"/>
<source>Text files (*.txt)</source> <source>Text files (*.txt)</source>
<translation>Text filer (*.txt)</translation> <translation>Text filer (*.txt)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="547"/> <location filename="mainwindow.cpp" line="564"/>
<source>CSV files (*.csv)</source> <source>CSV files (*.csv)</source>
<translation>CSV filer (*.csv)</translation> <translation>CSV filer (*.csv)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="587"/> <location filename="mainwindow.cpp" line="604"/>
<source>Cppcheck - %1</source> <source>Cppcheck - %1</source>
<translation>Cppcheck - %1</translation> <translation>Cppcheck - %1</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="604"/> <location filename="mainwindow.cpp" line="621"/>
<source>Failed to change the language: <source>Failed to change the language:
%1 %1
@ -433,12 +444,12 @@ Stop the checking before exiting.</source>
</translation> </translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="671"/> <location filename="mainwindow.cpp" line="688"/>
<source>Project files (*.cppcheck);;All files(*.*)</source> <source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="673"/> <location filename="mainwindow.cpp" line="690"/>
<source>Select Project File</source> <source>Select Project File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -548,62 +559,67 @@ Stop the checking before exiting.</source>
<context> <context>
<name>ResultsTree</name> <name>ResultsTree</name>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>File</source> <source>File</source>
<translation>Fil</translation> <translation>Fil</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Severity</source> <source>Severity</source>
<translation>Typ</translation> <translation>Typ</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Line</source> <source>Line</source>
<translation>Rad</translation> <translation>Rad</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="42"/> <location filename="resultstree.cpp" line="43"/>
<location filename="resultstree.cpp" line="796"/> <location filename="resultstree.cpp" line="828"/>
<source>Message</source> <source>Message</source>
<translation>Meddelande</translation> <translation>Meddelande</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="88"/> <location filename="resultstree.cpp" line="82"/>
<source>Undefined file</source> <source>Undefined file</source>
<translation>Odefinierad fil</translation> <translation>Odefinierad fil</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="419"/> <location filename="resultstree.cpp" line="411"/>
<source>Copy filename</source> <source>Copy filename</source>
<translation>Kopiera filnamn</translation> <translation>Kopiera filnamn</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="420"/> <location filename="resultstree.cpp" line="412"/>
<source>Copy full path</source> <source>Copy full path</source>
<translation>Kopiera full sökväg</translation> <translation>Kopiera full sökväg</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="421"/> <location filename="resultstree.cpp" line="413"/>
<source>Copy message</source> <source>Copy message</source>
<translation>Kopiera meddelande</translation> <translation>Kopiera meddelande</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="459"/> <location filename="resultstree.cpp" line="451"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="460"/> <location filename="resultstree.cpp" line="452"/>
<source>Configure the text file viewer program in Cppcheck preferences/Applications.</source> <source>Configure the text file viewer program in Cppcheck preferences/Applications.</source>
<oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource> <oldsource>You can open this error by specifying applications in program&apos;s settings.</oldsource>
<translation>Konfigurera program i inställningar/program.</translation> <translation>Konfigurera program i inställningar/program.</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="497"/> <location filename="resultstree.cpp" line="479"/>
<source>Could not find the file!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="517"/>
<source>Could not start %1 <source>Could not start %1
Please check the application path and parameters are correct.</source> Please check the application path and parameters are correct.</source>
@ -612,12 +628,24 @@ Please check the application path and parameters are correct.</source>
Kontrollera att sökvägen och parametrarna är korrekta.</translation> Kontrollera att sökvägen och parametrarna är korrekta.</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="661"/> <location filename="resultstree.cpp" line="531"/>
<source>Could not find file:
%1
Please select the directory where file is located.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="538"/>
<source>Select Directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultstree.cpp" line="693"/>
<source>style</source> <source>style</source>
<translation>stil</translation> <translation>stil</translation>
</message> </message>
<message> <message>
<location filename="resultstree.cpp" line="665"/> <location filename="resultstree.cpp" line="697"/>
<source>error</source> <source>error</source>
<translation>fel</translation> <translation>fel</translation>
</message> </message>
@ -625,31 +653,37 @@ Kontrollera att sökvägen och parametrarna är korrekta.</translation>
<context> <context>
<name>ResultsView</name> <name>ResultsView</name>
<message> <message>
<location filename="resultsview.cpp" line="174"/> <location filename="resultsview.cpp" line="182"/>
<location filename="resultsview.cpp" line="186"/> <location filename="resultsview.cpp" line="194"/>
<source>Cppcheck</source> <source>Cppcheck</source>
<translation>Cppcheck</translation> <translation>Cppcheck</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="175"/> <location filename="resultsview.cpp" line="183"/>
<source>No errors found.</source> <source>No errors found.</source>
<translation>Inga fel hittades.</translation> <translation>Inga fel hittades.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="183"/> <location filename="resultsview.cpp" line="191"/>
<source>Errors were found, but they are configured to be hidden. <source>Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.</source> To toggle what kind of errors are shown, open view menu.</source>
<translation>Fel hittades, men de visas ej. <translation>Fel hittades, men de visas ej.
För att ställa in vilka fel som skall visas använd visa menyn.</translation> För att ställa in vilka fel som skall visas använd visa menyn.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="101"/> <location filename="resultsview.cpp" line="240"/>
<location filename="resultsview.cpp" line="250"/>
<source>Failed to read the report.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="resultsview.cpp" line="109"/>
<source>No errors found, nothing to save.</source> <source>No errors found, nothing to save.</source>
<translation>Inga fel hittades, ingenting att spara.</translation> <translation>Inga fel hittades, ingenting att spara.</translation>
</message> </message>
<message> <message>
<location filename="resultsview.cpp" line="128"/> <location filename="resultsview.cpp" line="136"/>
<location filename="resultsview.cpp" line="138"/> <location filename="resultsview.cpp" line="146"/>
<source>Failed to save the report.</source> <source>Failed to save the report.</source>
<translation>Misslyckades med att spara rapporten.</translation> <translation>Misslyckades med att spara rapporten.</translation>
</message> </message>

View File

@ -51,19 +51,16 @@ void CsvReport::WriteFooter()
// No footer for CSV report // No footer for CSV report
} }
void CsvReport::WriteError(const QStringList &files, const QStringList &lines, void CsvReport::WriteError(const ErrorItem &error)
const QString &id, const QString &severity, const QString &msg)
{ {
Q_UNUSED(id);
/* /*
Error as CSV line Error as CSV line
gui/test.cpp,23,error,Mismatching allocation and deallocation: k gui/test.cpp,23,error,Mismatching allocation and deallocation: k
*/ */
QString line; QString line;
line += QString("%1,%2,").arg(files[files.size() - 1]).arg(lines[lines.size() - 1]); line += QString("%1,%2,").arg(error.files[error.files.size() - 1]).arg(error.lines[error.lines.size() - 1]);
line += QString("%1,%2").arg(severity).arg(msg); line += QString("%1,%2").arg(error.severity).arg(error.msg);
mTxtWriter << line << endl; mTxtWriter << line << endl;
} }

View File

@ -60,10 +60,9 @@ public:
/** /**
* @brief Write error to report. * @brief Write error to report.
* @param error Error data.
*/ */
virtual void WriteError(const QStringList &files, const QStringList &lines, virtual void WriteError(const ErrorItem &error);
const QString &id, const QString &severity,
const QString &msg);
private: private:

39
gui/erroritem.cpp Normal file
View File

@ -0,0 +1,39 @@
/*
* Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2010 Daniel Marjamäki and Cppcheck team.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "erroritem.h"
ErrorItem::ErrorItem(const ErrorItem &item)
{
file = item.file;
files = item.files;
lines = item.lines;
id = item.id;
severity = item.severity;
msg = item.msg;
}
ErrorItem::ErrorItem(const ErrorLine &line)
{
file = line.file;
files.append(line.file);
lines.append(line.line.toUInt());
id = line.id;
severity = line.severity;
msg = line.msg;
}

62
gui/erroritem.h Normal file
View File

@ -0,0 +1,62 @@
/*
* Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2010 Daniel Marjamäki and Cppcheck team.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ERRORITEM_H
#define ERRORITEM_H
#include <QString>
#include <QStringList>
class ErrorLine;
/// @addtogroup GUI
/// @{
/**
* @brief A class containing error data for one error.
*/
class ErrorItem
{
public:
ErrorItem() { }
ErrorItem(const ErrorItem &item);
ErrorItem(const ErrorLine &line);
QString file;
QStringList files;
QList<unsigned int> lines;
QString id;
QString severity;
QString msg;
};
/**
* @brief A class containing error data for one shown error line.
*/
class ErrorLine
{
public:
QString file;
QString line;
QString id;
QString severity;
QString msg;
};
/// @}
#endif // ERRORITEM_H

View File

@ -51,6 +51,7 @@ HEADERS += mainwindow.h \
applicationdialog.h \ applicationdialog.h \
aboutdialog.h \ aboutdialog.h \
common.h \ common.h \
erroritem.h \
fileviewdialog.h \ fileviewdialog.h \
projectfile.h \ projectfile.h \
projectfiledialog.h \ projectfiledialog.h \
@ -73,6 +74,7 @@ SOURCES += main.cpp \
fileviewdialog.cpp \ fileviewdialog.cpp \
projectfile.cpp \ projectfile.cpp \
projectfiledialog.cpp \ projectfiledialog.cpp \
erroritem.cpp \
report.cpp \ report.cpp \
txtreport.cpp \ txtreport.cpp \
xmlreport.cpp \ xmlreport.cpp \
@ -85,7 +87,3 @@ win32 {
LIBS += -lshlwapi -lhtmlhelp LIBS += -lshlwapi -lhtmlhelp
} }
# run lrelease before build
lrelease.commands = lrelease gui.pro
QMAKE_EXTRA_TARGETS += lrelease
PRE_TARGETDEPS += lrelease

View File

@ -20,6 +20,7 @@
#include <QApplication> #include <QApplication>
#include <QTextCodec> #include <QTextCodec>
#include <QTranslator> #include <QTranslator>
#include <QMetaType>
#include "mainwindow.h" #include "mainwindow.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
@ -27,6 +28,9 @@ int main(int argc, char *argv[])
QApplication app(argc, argv); QApplication app(argc, argv);
app.setWindowIcon(QIcon(":icon.png")); app.setWindowIcon(QIcon(":icon.png"));
// Register this metatype that is used to transfer error info
qRegisterMetaType<QList<unsigned int>>("QList<unsigned int>");
// Set codecs so that UTF-8 strings in sources are handled correctly. // Set codecs so that UTF-8 strings in sources are handled correctly.
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));

View File

@ -73,6 +73,7 @@
<property name="title"> <property name="title">
<string>&amp;File</string> <string>&amp;File</string>
</property> </property>
<addaction name="mActionOpenXML"/>
<addaction name="mActionNewProjectFile"/> <addaction name="mActionNewProjectFile"/>
<addaction name="mActionOpenProjectFile"/> <addaction name="mActionOpenProjectFile"/>
<addaction name="mActionSave"/> <addaction name="mActionSave"/>
@ -349,6 +350,11 @@
<string>Error categories</string> <string>Error categories</string>
</property> </property>
</action> </action>
<action name="mActionOpenXML">
<property name="text">
<string>&amp;Open XML...</string>
</property>
</action>
<action name="mActionOpenProjectFile"> <action name="mActionOpenProjectFile">
<property name="text"> <property name="text">
<string>Open P&amp;roject File...</string> <string>Open P&amp;roject File...</string>

View File

@ -57,6 +57,7 @@ MainWindow::MainWindow() :
connect(mUI.mActionCheckDirectory, SIGNAL(triggered()), this, SLOT(CheckDirectory())); connect(mUI.mActionCheckDirectory, SIGNAL(triggered()), this, SLOT(CheckDirectory()));
connect(mUI.mActionSettings, SIGNAL(triggered()), this, SLOT(ProgramSettings())); connect(mUI.mActionSettings, SIGNAL(triggered()), this, SLOT(ProgramSettings()));
connect(mUI.mActionClearResults, SIGNAL(triggered()), this, SLOT(ClearResults())); connect(mUI.mActionClearResults, SIGNAL(triggered()), this, SLOT(ClearResults()));
connect(mUI.mActionOpenXML, SIGNAL(triggered()), this, SLOT(OpenXML()));
connect(mUI.mActionShowStyle, SIGNAL(toggled(bool)), this, SLOT(ShowStyle(bool))); connect(mUI.mActionShowStyle, SIGNAL(toggled(bool)), this, SLOT(ShowStyle(bool)));
connect(mUI.mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool))); connect(mUI.mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool)));
@ -435,6 +436,22 @@ void MainWindow::ClearResults()
mUI.mActionSave->setEnabled(false); mUI.mActionSave->setEnabled(false);
} }
void MainWindow::OpenXML()
{
QString selectedFilter;
QString filter(tr("XML files (*.xml)"));
QString selectedFile = QFileDialog::getOpenFileName(this,
tr("Open the report file"),
QString(),
filter,
&selectedFilter);
if (!selectedFile.isEmpty())
{
mUI.mResults->ReadErrorsXml(selectedFile);
}
}
void MainWindow::EnableCheckButtons(bool enable) void MainWindow::EnableCheckButtons(bool enable)
{ {
mUI.mActionStop->setEnabled(!enable); mUI.mActionStop->setEnabled(!enable);

View File

@ -67,6 +67,12 @@ public slots:
*/ */
void ClearResults(); void ClearResults();
/**
* @brief Slot to open XML report file
*
*/
void OpenXML();
/** /**
* @brief Show errors with type "style" * @brief Show errors with type "style"
* @param checked Should errors be shown (true) or hidden (false) * @param checked Should errors be shown (true) or hidden (false)

View File

@ -17,6 +17,7 @@
*/ */
#include <QFile> #include <QFile>
#include "erroritem.h"
#include "report.h" #include "report.h"
Report::Report(const QString &filename, QObject * parent) : Report::Report(const QString &filename, QObject * parent) :
@ -41,6 +42,17 @@ bool Report::Create()
return succeed; return succeed;
} }
bool Report::Open()
{
bool succeed = false;
if (!mFile.isOpen())
{
mFile.setFileName(mFilename);
succeed = mFile.open(QIODevice::ReadOnly | QIODevice::Text);
}
return succeed;
}
void Report::Close() void Report::Close()
{ {
if (mFile.isOpen()) if (mFile.isOpen())

View File

@ -23,6 +23,7 @@
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QFile> #include <QFile>
#include "erroritem.h"
/// @addtogroup GUI /// @addtogroup GUI
/// @{ /// @{
@ -50,6 +51,12 @@ public:
*/ */
virtual bool Create(); virtual bool Create();
/**
* @brief Open the existing report (file).
* @return true if succeeded, false if file could not be created.
*/
virtual bool Open();
/** /**
* @brief Close the report (file). * @brief Close the report (file).
*/ */
@ -67,10 +74,9 @@ public:
/** /**
* @brief Write error to report. * @brief Write error to report.
* @param error Error data.
*/ */
virtual void WriteError(const QStringList &files, const QStringList &lines, virtual void WriteError(const ErrorItem &error) = 0;
const QString &id, const QString &severity,
const QString &msg) = 0;
protected: protected:

View File

@ -24,14 +24,15 @@
#include <QDir> #include <QDir>
#include <QMessageBox> #include <QMessageBox>
#include <QFileInfo> #include <QFileInfo>
#include <QFileDialog>
#include <QClipboard> #include <QClipboard>
#include "erroritem.h"
#include "resultstree.h" #include "resultstree.h"
#include "xmlreport.h" #include "xmlreport.h"
ResultsTree::ResultsTree(QWidget * parent) : ResultsTree::ResultsTree(QWidget * parent) :
QTreeView(parent), QTreeView(parent),
mContextItem(0), mContextItem(0),
mCheckPath(""),
mVisibleErrors(false) mVisibleErrors(false)
{ {
for (int i = 0; i < SHOW_NONE; i++) for (int i = 0; i < SHOW_NONE; i++)
@ -67,28 +68,21 @@ QStandardItem *ResultsTree::CreateItem(const QString &name)
return item; return item;
} }
void ResultsTree::AddErrorItem(const QString &file, void ResultsTree::AddErrorItem(const ErrorItem &item)
const QString &severity,
const QString &message,
const QStringList &files,
const QVariantList &lines,
const QString &id)
{ {
Q_UNUSED(file); if (item.files.isEmpty())
if (files.isEmpty())
{ {
return; return;
} }
QString realfile = StripPath(files[0], false); QString realfile = StripPath(item.files[0], false);
if (realfile.isEmpty()) if (realfile.isEmpty())
{ {
realfile = tr("Undefined file"); realfile = tr("Undefined file");
} }
bool hide = !mShowTypes[SeverityToShowType(severity)]; bool hide = !mShowTypes[SeverityToShowType(item.severity)];
//if there is at least one error that is not hidden, we have a visible error //if there is at least one error that is not hidden, we have a visible error
if (!hide) if (!hide)
@ -96,48 +90,49 @@ void ResultsTree::AddErrorItem(const QString &file,
mVisibleErrors = true; mVisibleErrors = true;
} }
ErrorLine line;
line.file = realfile;
line.id = item.id;
line.line = QString::number(item.lines[0]);
line.msg = item.msg;
line.severity = item.severity;
//Create the base item for the error and ensure it has a proper //Create the base item for the error and ensure it has a proper
//file item as a parent //file item as a parent
QStandardItem *item = AddBacktraceFiles(EnsureFileItem(files[0], hide), QStandardItem *stditem = AddBacktraceFiles(EnsureFileItem(line.file, hide),
realfile, line,
lines[0].toInt(),
severity,
message,
hide, hide,
SeverityToIcon(severity)); SeverityToIcon(line.severity));
if (!item) if (!stditem)
return; return;
//Add user data to that item //Add user data to that item
QMap<QString, QVariant> data; QMap<QString, QVariant> data;
data["severity"] = SeverityToShowType(severity); data["severity"] = SeverityToShowType(item.severity);
data["message"] = message; data["message"] = item.msg;
data["file"] = files[0]; data["file"] = item.files[0];
data["line"] = lines[0]; data["line"] = QString::number(item.lines[0]);
data["id"] = id; data["id"] = item.id;
item->setData(QVariant(data)); stditem->setData(QVariant(data));
//Add backtrace files as children //Add backtrace files as children
for (int i = 1; i < files.size() && i < lines.size(); i++) for (int i = 1; i < item.files.size() && i < item.lines.size(); i++)
{ {
line.file = StripPath(item.files[i], false);
line.line = item.lines[i];
QStandardItem *child_item; QStandardItem *child_item;
child_item = AddBacktraceFiles(stditem,
child_item = AddBacktraceFiles(item, line,
StripPath(files[i], false),
lines[i].toInt(),
severity,
message,
hide, hide,
":images/go-down.png"); ":images/go-down.png");
//Add user data to that item //Add user data to that item
QMap<QString, QVariant> child_data; QMap<QString, QVariant> child_data;
child_data["severity"] = SeverityToShowType(severity); child_data["severity"] = SeverityToShowType(line.severity);
child_data["message"] = message; child_data["message"] = line.msg;
child_data["file"] = files[i]; child_data["file"] = item.files[i];
child_data["line"] = lines[i]; child_data["line"] = line.line;
child_data["id"] = id; child_data["id"] = line.id;
child_item->setData(QVariant(child_data)); child_item->setData(QVariant(child_data));
} }
@ -150,10 +145,7 @@ void ResultsTree::AddErrorItem(const QString &file,
} }
QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent, QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent,
const QString &file, const ErrorLine &item,
const int line,
const QString &severity,
const QString &message,
const bool hide, const bool hide,
const QString &icon) const QString &icon)
@ -164,12 +156,12 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent,
} }
QList<QStandardItem*> list; QList<QStandardItem*> list;
list << CreateItem(file); list << CreateItem(item.file);
list << CreateItem(tr(severity.toLatin1())); list << CreateItem(tr(item.severity.toLatin1()));
list << CreateItem(QString("%1").arg(line)); list << CreateItem(QString("%1").arg(item.line));
//TODO message has parameter names so we'll need changes to the core //TODO message has parameter names so we'll need changes to the core
//cppcheck so we can get proper translations //cppcheck so we can get proper translations
list << CreateItem(tr(message.toLatin1())); list << CreateItem(tr(item.msg.toLatin1()));
// Check for duplicate rows and don't add them if found // Check for duplicate rows and don't add them if found
for (int i = 0; i < parent->rowCount(); i++) for (int i = 0; i < parent->rowCount(); i++)
@ -452,7 +444,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
void ResultsTree::StartApplication(QStandardItem *target, int application) void ResultsTree::StartApplication(QStandardItem *target, int application)
{ {
//If there are now application's specified, tell the user about it //If there are no applications specified, tell the user about it
if (mApplications->GetApplicationCount() == 0) if (mApplications->GetApplicationCount() == 0)
{ {
QMessageBox msg(QMessageBox::Information, QMessageBox msg(QMessageBox::Information,
@ -476,6 +468,34 @@ void ResultsTree::StartApplication(QStandardItem *target, int application)
//Replace (file) with filename //Replace (file) with filename
QString file = data["file"].toString(); QString file = data["file"].toString();
QFileInfo info(file);
if (!info.exists())
{
if (info.isAbsolute())
{
QMessageBox msgbox(this);
msgbox.setWindowTitle("Cppcheck");
msgbox.setText(tr("Could not find the file!"));
msgbox.setIcon(QMessageBox::Critical);
msgbox.exec();
}
else
{
QDir checkdir(mCheckPath);
if (checkdir.isAbsolute() && checkdir.exists())
{
file = mCheckPath + "/" + file;
}
else
{
QString dir = AskFileDir(file);
dir += '/';
file = dir + file;
}
}
}
if (file.indexOf(" ") > -1) if (file.indexOf(" ") > -1)
{ {
file.insert(0, "\""); file.insert(0, "\"");
@ -506,6 +526,22 @@ void ResultsTree::StartApplication(QStandardItem *target, int application)
} }
} }
QString ResultsTree::AskFileDir(const QString &file)
{
QString text = tr("Could not find file:\n%1\nPlease select the directory where file is located.").arg(file);
QMessageBox msgbox(this);
msgbox.setWindowTitle("Cppcheck");
msgbox.setText(text);
msgbox.setIcon(QMessageBox::Warning);
msgbox.exec();
QString dir = QFileDialog::getExistingDirectory(this, tr("Select Directory"),
"",
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
mCheckPath = dir;
return dir;
}
void ResultsTree::CopyFilename() void ResultsTree::CopyFilename()
{ {
CopyPath(mContextItem, false); CopyPath(mContextItem, false);
@ -601,8 +637,6 @@ void ResultsTree::SaveErrors(Report *report, QStandardItem *item)
return; return;
} }
//qDebug() << item->text() << "has" << item->rowCount() << "errors";
for (int i = 0; i < item->rowCount(); i++) for (int i = 0; i < item->rowCount(); i++)
{ {
QStandardItem *error = item->child(i, 0); QStandardItem *error = item->child(i, 0);
@ -622,17 +656,15 @@ void ResultsTree::SaveErrors(Report *report, QStandardItem *item)
//Convert it to QVariantMap //Convert it to QVariantMap
QVariantMap data = userdata.toMap(); QVariantMap data = userdata.toMap();
QString severity = ShowTypeToString(VariantToShowType(data["severity"])); ErrorItem item;
QString message = data["message"].toString(); item.severity = ShowTypeToString(VariantToShowType(data["severity"]));
QString id = data["id"].toString(); item.msg = data["message"].toString();
item.id = data["id"].toString();
QString file = StripPath(data["file"].toString(), true); QString file = StripPath(data["file"].toString(), true);
QString line = data["line"].toString(); unsigned int line = data["line"].toUInt();
QStringList files; item.files << file;
QStringList lines; item.lines << line;
files << file;
lines << line;
for (int j = 0; j < error->rowCount(); j++) for (int j = 0; j < error->rowCount(); j++)
{ {
@ -643,13 +675,13 @@ void ResultsTree::SaveErrors(Report *report, QStandardItem *item)
QVariantMap child_data = child_userdata.toMap(); QVariantMap child_data = child_userdata.toMap();
file = StripPath(child_data["file"].toString(), true); file = StripPath(child_data["file"].toString(), true);
line = child_data["line"].toString(); line = child_data["line"].toUInt();
files << file; item.files << file;
lines << line; item.lines << line;
} }
report->WriteError(files, lines, id, severity, message); report->WriteError(item);
} }
} }

View File

@ -25,11 +25,13 @@
#include <QStandardItem> #include <QStandardItem>
#include <QSettings> #include <QSettings>
#include <QContextMenuEvent> #include <QContextMenuEvent>
#include <QTextStream>
#include "common.h" #include "common.h"
#include "applicationlist.h" #include "applicationlist.h"
#include <QTextStream>
class Report; class Report;
class ErrorItem;
class ErrorLine;
/// @addtogroup GUI /// @addtogroup GUI
/// @{ /// @{
@ -50,19 +52,9 @@ public:
/** /**
* @brief Add a new item to the tree * @brief Add a new item to the tree
* *
* @param file filename * @param item Error item data
* @param severity error severity
* @param message error message
* @param files list of files affected by the error
* @param lines list of file line numers affected by the error
* @param id error id
*/ */
void AddErrorItem(const QString &file, void AddErrorItem(const ErrorItem &item);
const QString &severity,
const QString &message,
const QStringList &files,
const QVariantList &lines,
const QString &id);
/** /**
* @brief Clear all errors from the tree * @brief Clear all errors from the tree
@ -224,19 +216,13 @@ protected:
* @brief Add a new error item beneath a file or a backtrace item beneath an error * @brief Add a new error item beneath a file or a backtrace item beneath an error
* *
* @param parent Parent for the item. Either a file item or an error item * @param parent Parent for the item. Either a file item or an error item
* @param file Filename of the error * @param item Error line data
* @param line Line numer
* @param severity Error severity
* @param message Error message
* @param hide Should this be hidden (true) or shown (false) * @param hide Should this be hidden (true) or shown (false)
* @param icon Should a default backtrace item icon be added * @param icon Should a default backtrace item icon be added
* @return newly created QStandardItem * * @return newly created QStandardItem *
*/ */
QStandardItem *AddBacktraceFiles(QStandardItem *parent, QStandardItem *AddBacktraceFiles(QStandardItem *parent,
const QString &file, const ErrorLine &item,
const int line,
const QString &severity,
const QString &message,
const bool hide, const bool hide,
const QString &icon); const QString &icon);
@ -276,6 +262,12 @@ protected:
*/ */
void LoadSettings(); void LoadSettings();
/**
* @brief Ask directory where file is located.
* @param file File name.
* @return Directory user chose.
*/
QString AskFileDir(const QString &file);
/** /**
* @brief Create a new QStandardItem * @brief Create a new QStandardItem

View File

@ -70,11 +70,19 @@ void ResultsView::Error(const QString &file,
const QString &severity, const QString &severity,
const QString &message, const QString &message,
const QStringList &files, const QStringList &files,
const QVariantList &lines, const QList<unsigned int> &lines,
const QString &id) const QString &id)
{ {
mErrorsFound = true; mErrorsFound = true;
mUI.mTree->AddErrorItem(file, severity, message, files, lines, id); ErrorItem item;
item.file = file;
item.files = files;
item.id = id;
item.lines = lines;
item.msg = message;
item.severity = severity;
mUI.mTree->AddErrorItem(item);
emit GotResults(); emit GotResults();
} }
@ -217,3 +225,38 @@ void ResultsView::DisableProgressbar()
{ {
mUI.mProgress->setEnabled(false); mUI.mProgress->setEnabled(false);
} }
void ResultsView::ReadErrorsXml(const QString &filename)
{
XmlReport *report = new XmlReport(filename, this);
QList<ErrorLine> errors;
if (report)
{
if (report->Open())
errors = report->Read();
else
{
QMessageBox msgBox;
msgBox.setText(tr("Failed to read the report."));
msgBox.setIcon(QMessageBox::Critical);
msgBox.exec();
}
delete report;
report = NULL;
}
else
{
QMessageBox msgBox;
msgBox.setText(tr("Failed to read the report."));
msgBox.setIcon(QMessageBox::Critical);
msgBox.exec();
}
ErrorLine line;
foreach(line, errors)
{
ErrorItem item(line);
mUI.mTree->AddErrorItem(item);
}
mUI.mTree->SetCheckDirectory("");
}

View File

@ -129,6 +129,14 @@ public:
void Translate(); void Translate();
void DisableProgressbar(); void DisableProgressbar();
/**
* @brief Read errors from report XML file.
* @param filename Report file to read.
*
*/
void ReadErrorsXml(const QString &filename);
signals: signals:
/** /**
@ -161,7 +169,7 @@ public slots:
const QString &severity, const QString &severity,
const QString &message, const QString &message,
const QStringList &files, const QStringList &files,
const QVariantList &lines, const QList<unsigned int> &lines,
const QString &id); const QString &id);
/** /**

View File

@ -145,13 +145,13 @@ void ThreadHandler::Initialize(ResultsView *view)
const QString &, const QString &,
const QString &, const QString &,
const QStringList &, const QStringList &,
const QVariantList &, const QList<unsigned int> &,
const QString &)), const QString &)),
view, SLOT(Error(const QString &, view, SLOT(Error(const QString &,
const QString &, const QString &,
const QString &, const QString &,
const QStringList &, const QStringList &,
const QVariantList &, const QList<unsigned int> &,
const QString &))); const QString &)));
} }

View File

@ -47,7 +47,7 @@ void ThreadResult::reportErr(const ErrorLogger::ErrorMessage &msg)
{ {
QMutexLocker locker(&mutex); QMutexLocker locker(&mutex);
QVariantList lines; QList<unsigned int> lines;
QStringList files; QStringList files;
for (std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator tok = msg._callStack.begin(); for (std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator tok = msg._callStack.begin();

View File

@ -98,7 +98,7 @@ signals:
const QString &severity, const QString &severity,
const QString &message, const QString &message,
const QStringList &files, const QStringList &files,
const QVariantList &lines, const QList<unsigned int> &lines,
const QString &id); const QString &id);
protected: protected:

View File

@ -51,11 +51,8 @@ void TxtReport::WriteFooter()
// No footer for txt report // No footer for txt report
} }
void TxtReport::WriteError(const QStringList &files, const QStringList &lines, void TxtReport::WriteError(const ErrorItem &error)
const QString &id, const QString &severity, const QString &msg)
{ {
Q_UNUSED(id);
/* /*
Error example from the core program in text Error example from the core program in text
[gui/test.cpp:23] -> [gui/test.cpp:14]: (error) Mismatching allocation and deallocation: k [gui/test.cpp:23] -> [gui/test.cpp:14]: (error) Mismatching allocation and deallocation: k
@ -63,21 +60,21 @@ void TxtReport::WriteError(const QStringList &files, const QStringList &lines,
QString line; QString line;
for (int i = 0; i < lines.size(); i++) for (int i = 0; i < error.lines.size(); i++)
{ {
line += QString("[%1:%2]").arg(files[i]).arg(lines[i]); line += QString("[%1:%2]").arg(error.files[i]).arg(error.lines[i]);
if (i < lines.size() - 1 && lines.size() > 0) if (i < error.lines.size() - 1 && error.lines.size() > 0)
{ {
line += " -> "; line += " -> ";
} }
if (i == lines.size() - 1) if (i == error.lines.size() - 1)
{ {
line += ": "; line += ": ";
} }
} }
line += QString("(%1) %2").arg(severity).arg(msg); line += QString("(%1) %2").arg(error.severity).arg(error.msg);
mTxtWriter << line << endl; mTxtWriter << line << endl;
} }

View File

@ -58,10 +58,9 @@ public:
/** /**
* @brief Write error to report. * @brief Write error to report.
* @param error Error data.
*/ */
virtual void WriteError(const QStringList &files, const QStringList &lines, virtual void WriteError(const ErrorItem &error);
const QString &id, const QString &severity,
const QString &msg);
private: private:

View File

@ -18,15 +18,29 @@
#include <QFile> #include <QFile>
#include <QXmlStreamWriter> #include <QXmlStreamWriter>
#include <qdebug>
#include "erroritem.h"
#include "xmlreport.h" #include "xmlreport.h"
static const char ResultElementName[] = "results";
static const char ErrorElementName[] = "error";
static const char FilenameAttribute[] = "file";
static const char LineAttribute[] = "line";
static const char IdAttribute[] = "id";
static const char SeverityAttribute[] = "severity";
static const char MsgAttribute[] = "msg";
XmlReport::XmlReport(const QString &filename, QObject * parent) : XmlReport::XmlReport(const QString &filename, QObject * parent) :
Report(filename, parent) Report(filename, parent),
mXmlReader(NULL),
mXmlWriter(NULL)
{ {
} }
XmlReport::~XmlReport() XmlReport::~XmlReport()
{ {
delete mXmlReader;
delete mXmlWriter;
Close(); Close();
} }
@ -35,7 +49,18 @@ bool XmlReport::Create()
bool success = false; bool success = false;
if (Report::Create()) if (Report::Create())
{ {
mXmlWriter.setDevice(Report::GetFile()); mXmlWriter = new QXmlStreamWriter(Report::GetFile());
success = true;
}
return success;
}
bool XmlReport::Open()
{
bool success = false;
if (Report::Open())
{
mXmlReader = new QXmlStreamReader(Report::GetFile());
success = true; success = true;
} }
return success; return success;
@ -43,19 +68,18 @@ bool XmlReport::Create()
void XmlReport::WriteHeader() void XmlReport::WriteHeader()
{ {
mXmlWriter.setAutoFormatting(true); mXmlWriter->setAutoFormatting(true);
mXmlWriter.writeStartDocument(); mXmlWriter->writeStartDocument();
mXmlWriter.writeStartElement("results"); mXmlWriter->writeStartElement(ResultElementName);
} }
void XmlReport::WriteFooter() void XmlReport::WriteFooter()
{ {
mXmlWriter.writeEndElement(); mXmlWriter->writeEndElement();
mXmlWriter.writeEndDocument(); mXmlWriter->writeEndDocument();
} }
void XmlReport::WriteError(const QStringList &files, const QStringList &lines, void XmlReport::WriteError(const ErrorItem &error)
const QString &id, const QString &severity, const QString &msg)
{ {
/* /*
Error example from the core program in xml Error example from the core program in xml
@ -63,11 +87,73 @@ void XmlReport::WriteError(const QStringList &files, const QStringList &lines,
The callstack seems to be ignored here aswell, instead last item of the stack is used The callstack seems to be ignored here aswell, instead last item of the stack is used
*/ */
mXmlWriter.writeStartElement("error"); mXmlWriter->writeStartElement(ErrorElementName);
mXmlWriter.writeAttribute("file", files[files.size() - 1]); mXmlWriter->writeAttribute(FilenameAttribute, error.files[error.files.size() - 1]);
mXmlWriter.writeAttribute("line", lines[lines.size() - 1]); const QString line = QString::number(error.lines[error.lines.size() - 1]);
mXmlWriter.writeAttribute("id", id); mXmlWriter->writeAttribute(LineAttribute, line);
mXmlWriter.writeAttribute("severity", severity); mXmlWriter->writeAttribute(IdAttribute, error.id);
mXmlWriter.writeAttribute("msg", msg); mXmlWriter->writeAttribute(SeverityAttribute, error.severity);
mXmlWriter.writeEndElement(); mXmlWriter->writeAttribute(MsgAttribute, error.msg);
mXmlWriter->writeEndElement();
}
QList<ErrorLine> XmlReport::Read()
{
QList<ErrorLine> errors;
bool insideResults = false;
if (!mXmlReader)
{
qDebug() << "You must Open() the file before reading it!";
return errors;
}
while (!mXmlReader->atEnd())
{
switch (mXmlReader->readNext())
{
case QXmlStreamReader::StartElement:
if (mXmlReader->name() == ResultElementName)
insideResults = true;
// Read error element from inside result element
if (insideResults && mXmlReader->name() == ErrorElementName)
{
ErrorLine line = ReadError(mXmlReader);
errors.append(line);
}
break;
case QXmlStreamReader::EndElement:
if (mXmlReader->name() == ResultElementName)
insideResults = false;
break;
// Not handled
case QXmlStreamReader::NoToken:
case QXmlStreamReader::Invalid:
case QXmlStreamReader::StartDocument:
case QXmlStreamReader::EndDocument:
case QXmlStreamReader::Characters:
case QXmlStreamReader::Comment:
case QXmlStreamReader::DTD:
case QXmlStreamReader::EntityReference:
case QXmlStreamReader::ProcessingInstruction:
break;
}
}
return errors;
}
ErrorLine XmlReport::ReadError(QXmlStreamReader *reader)
{
ErrorLine line;
if (reader->name().toString() == ErrorElementName)
{
QXmlStreamAttributes attribs = reader->attributes();
line.file = attribs.value("", FilenameAttribute).toString();
line.line = attribs.value("", LineAttribute).toString();
line.id = attribs.value("", IdAttribute).toString();
line.severity = attribs.value("", SeverityAttribute).toString();
line.msg = attribs.value("", MsgAttribute).toString();
}
return line;
} }

View File

@ -23,6 +23,7 @@
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QFile> #include <QFile>
#include <QXmlStreamReader>
#include <QXmlStreamWriter> #include <QXmlStreamWriter>
#include "report.h" #include "report.h"
@ -47,6 +48,11 @@ public:
*/ */
virtual bool Create(); virtual bool Create();
/**
* @brief Open existing report file.
*/
bool Open();
/** /**
* @brief Write report header. * @brief Write report header.
*/ */
@ -59,16 +65,32 @@ public:
/** /**
* @brief Write error to report. * @brief Write error to report.
* @param error Error data.
*/ */
virtual void WriteError(const QStringList &files, const QStringList &lines, virtual void WriteError(const ErrorItem &error);
const QString &id, const QString &severity, const QString &msg);
/**
* @brief Read contents of the report file.
*/
QList<ErrorLine> Read();
protected:
/**
* @brief Read and parse error item from XML stream.
* @param reader XML stream reader to use.
*/
ErrorLine ReadError(QXmlStreamReader *reader);
private: private:
/**
* @brief XML stream reader for reading the report in XML format.
*/
QXmlStreamReader *mXmlReader;
/** /**
* @brief XML stream writer for writing the report in XML format. * @brief XML stream writer for writing the report in XML format.
*/ */
QXmlStreamWriter mXmlWriter; QXmlStreamWriter *mXmlWriter;
}; };
/// @} /// @}
#endif // XML_REPORT_H #endif // XML_REPORT_H

View File

@ -340,7 +340,7 @@ void CheckMemoryLeak::memleakError(const Token *tok, const std::string &varname)
void CheckMemoryLeak::memleakUponReallocFailureError(const Token *tok, const std::string &varname) void CheckMemoryLeak::memleakUponReallocFailureError(const Token *tok, const std::string &varname)
{ {
reportErr(tok, Severity::error, "memleakOnRealloc", "Memory leak: \"" + varname + "\" nulled but not freed upon failure"); reportErr(tok, Severity::error, "memleakOnRealloc", "Common realloc mistake: \"" + varname + "\" nulled but not freed upon failure");
} }
void CheckMemoryLeak::resourceLeakError(const Token *tok, const std::string &varname) void CheckMemoryLeak::resourceLeakError(const Token *tok, const std::string &varname)

View File

@ -565,7 +565,7 @@ public:
void use(unsigned int varid); void use(unsigned int varid);
void modified(unsigned int varid); void modified(unsigned int varid);
VariableUsage *find(unsigned int varid); VariableUsage *find(unsigned int varid);
void alias(unsigned int varid1, unsigned int varid2); void alias(unsigned int varid1, unsigned int varid2, bool replace);
void erase(unsigned int varid) void erase(unsigned int varid)
{ {
_varUsage.erase(varid); _varUsage.erase(varid);
@ -578,21 +578,30 @@ private:
VariableMap _varUsage; VariableMap _varUsage;
}; };
void Variables::alias(unsigned int varid1, unsigned int varid2) /**
* Alias the 2 given variables. Either replace the existing aliases if
* they exist or merge them. You would replace an existing alias when this
* assignment is in the same scope as the previous assignment. You might
* merge the aliases when this assignment is in a different scope from the
* previous assignment depending on the relationship of the 2 scopes.
*/
void Variables::alias(unsigned int varid1, unsigned int varid2, bool replace)
{ {
VariableUsage *var1 = find(varid1);
VariableUsage *var2 = find(varid2);
// alias to self // alias to self
if (varid1 == varid2) if (varid1 == varid2)
{ {
VariableUsage *var = find(varid1); if (var1)
if (var) var1->use();
var->use();
return; return;
} }
std::set<unsigned int>::iterator i; std::set<unsigned int>::iterator i;
VariableUsage *var1 = find(varid1); if (replace)
{
// remove var1 from all aliases // remove var1 from all aliases
for (i = var1->_aliases.begin(); i != var1->_aliases.end(); ++i) for (i = var1->_aliases.begin(); i != var1->_aliases.end(); ++i)
{ {
@ -604,8 +613,7 @@ void Variables::alias(unsigned int varid1, unsigned int varid2)
// remove all aliases from var1 // remove all aliases from var1
var1->_aliases.clear(); var1->_aliases.clear();
}
VariableUsage *var2 = find(varid2);
// var1 gets all var2s aliases // var1 gets all var2s aliases
for (i = var2->_aliases.begin(); i != var2->_aliases.end(); ++i) for (i = var2->_aliases.begin(); i != var2->_aliases.end(); ++i)
@ -895,6 +903,12 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
next = start + 5 + offset; next = start + 5 + offset;
} }
// check for var ? ...
else if (Token::Match(tok->tokAt(start), "%var% ?"))
{
next = start;
}
// no cast // no cast
else else
{ {
@ -925,13 +939,22 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
var2->_type == Variables::array || var2->_type == Variables::array ||
var2->_type == Variables::pointer) var2->_type == Variables::pointer)
{ {
variables.alias(varid1, varid2); bool replace = true;
variables.alias(varid1, varid2, replace);
}
else if (tok->tokAt(next + 1)->str() == "?")
{
if (var2->_type == Variables::reference)
variables.readAliases(varid2);
else
variables.read(varid2);
} }
} }
} }
else if (var1->_type == Variables::reference) else if (var1->_type == Variables::reference)
{ {
variables.alias(varid1, varid2); variables.alias(varid1, varid2, true);
} }
else else
{ {

View File

@ -123,6 +123,10 @@ void CheckStl::iterators()
{ {
eraseByValueError(tok2, tok2->strAt(0), tok2->strAt(5)); eraseByValueError(tok2, tok2->strAt(0), tok2->strAt(5));
} }
else if (Token::Match(tok2, "return|break ;"))
{
validIterator = true;
}
} }
} }
} }

View File

@ -30,21 +30,6 @@
// FUNCTION USAGE - Check for unused functions etc // FUNCTION USAGE - Check for unused functions etc
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
CheckUnusedFunctions::CheckUnusedFunctions(ErrorLogger *errorLogger)
{
_errorLogger = errorLogger;
}
CheckUnusedFunctions::~CheckUnusedFunctions()
{
}
void CheckUnusedFunctions::setErrorLogger(ErrorLogger *errorLogger)
{
_errorLogger = errorLogger;
}
void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer) void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer)
{ {
// Function declarations.. // Function declarations..
@ -166,7 +151,7 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer)
void CheckUnusedFunctions::check() void CheckUnusedFunctions::check(ErrorLogger * const errorLogger)
{ {
for (std::map<std::string, FunctionUsage>::const_iterator it = _functions.begin(); it != _functions.end(); ++it) for (std::map<std::string, FunctionUsage>::const_iterator it = _functions.begin(); it != _functions.end(); ++it)
{ {
@ -182,7 +167,7 @@ void CheckUnusedFunctions::check()
filename = ""; filename = "";
else else
filename = func.filename; filename = func.filename;
_errorLogger->unusedFunction(filename, it->first); unusedFunctionError(errorLogger, filename, it->first);
} }
else if (! func.usedOtherFile) else if (! func.usedOtherFile)
{ {
@ -196,7 +181,20 @@ void CheckUnusedFunctions::check()
} }
} }
void CheckUnusedFunctions::unusedFunctionError(const Token *tok) void CheckUnusedFunctions::unusedFunctionError(ErrorLogger * const errorLogger, const std::string &filename, const std::string &funcname)
{ {
reportError(tok, Severity::style, "unusedFunction", "The function 'funcName' is never used"); std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
if (!filename.empty())
{
ErrorLogger::ErrorMessage::FileLocation fileLoc;
fileLoc.file = filename;
fileLoc.line = 1;
locationList.push_back(fileLoc);
}
const ErrorLogger::ErrorMessage errmsg(locationList, Severity::stringify(Severity::style), "The function '" + funcname + "' is never used", "unusedFunction");
if (errorLogger)
errorLogger->reportErr(errmsg);
else
reportError(errmsg);
} }

View File

@ -32,35 +32,33 @@
class CheckUnusedFunctions: public Check class CheckUnusedFunctions: public Check
{ {
public: public:
CheckUnusedFunctions(ErrorLogger *errorLogger = 0); /** @brief This constructor is used when registering the CheckUnusedFunctions */
~CheckUnusedFunctions(); CheckUnusedFunctions() : Check()
{ }
/** /** @brief This constructor is used when running checks. */
* Errors found by this class are forwarded to the given CheckUnusedFunctions(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
* errorlogger. : Check(tokenizer, settings, errorLogger)
* @param errorLogger The errorlogger to be used. { }
*/
void setErrorLogger(ErrorLogger *errorLogger);
// Parse current tokens and determine.. // Parse current tokens and determine..
// * Check what functions are used // * Check what functions are used
// * What functions are declared // * What functions are declared
void parseTokens(const Tokenizer &tokenizer); void parseTokens(const Tokenizer &tokenizer);
void check(ErrorLogger * const errorLogger);
void check();
private: private:
void getErrorMessages() void getErrorMessages()
{ {
unusedFunctionError(0); unusedFunctionError(0, "", "funcName");
} }
/** /**
* Dummy implementation, just to provide error for --errorlist * Dummy implementation, just to provide error for --errorlist
*/ */
void unusedFunctionError(const Token *tok); void unusedFunctionError(ErrorLogger * const errorLogger, const std::string &filename, const std::string &funcname);
/** /**
* Dummy implementation, just to provide error for --errorlist * Dummy implementation, just to provide error for --errorlist
@ -80,9 +78,6 @@ private:
return "Check for functions that are never called\n"; return "Check for functions that are never called\n";
} }
ErrorLogger *_errorLogger;
class FunctionUsage class FunctionUsage
{ {
public: public:

View File

@ -202,7 +202,7 @@ void CppCheck::clearFiles()
const char * CppCheck::version() const char * CppCheck::version()
{ {
return "1.43"; return "1.44";
} }
@ -624,7 +624,6 @@ unsigned int CppCheck::check()
{ {
exitcode = 0; exitcode = 0;
_checkUnusedFunctions.setErrorLogger(this);
std::sort(_filenames.begin(), _filenames.end()); std::sort(_filenames.begin(), _filenames.end());
// TODO: Should this be moved out to its own function so all the files can be // TODO: Should this be moved out to its own function so all the files can be
@ -728,7 +727,7 @@ unsigned int CppCheck::check()
if (_settings._errorsOnly == false) if (_settings._errorsOnly == false)
_errorLogger.reportOut("Checking usage of global functions.."); _errorLogger.reportOut("Checking usage of global functions..");
_checkUnusedFunctions.check(); _checkUnusedFunctions.check(this);
} }
_errorList.clear(); _errorList.clear();

View File

@ -162,17 +162,6 @@ public:
return true; return true;
} }
void unusedFunction(const std::string &filename, const std::string &funcname)
{
std::list<ErrorLogger::ErrorMessage::FileLocation> loc;
ErrorLogger::ErrorMessage::FileLocation fileLoc;
fileLoc.file = filename;
fileLoc.line = 1;
loc.push_back(fileLoc);
reportErr(ErrorLogger::ErrorMessage(loc, "style", "The function '" + funcname + "' is never used", "unusedFunction"));
}
static bool mismatchAllocDealloc() static bool mismatchAllocDealloc()
{ {
return true; return true;

View File

@ -183,6 +183,13 @@ static void checkExecutionPaths_(const Token *tok, std::list<ExecutionPath *> &c
return; return;
} }
// ?: => bailout
if (tok->str() == "?")
{
ExecutionPath::bailOut(checks);
return;
}
if (tok->str() == "switch") if (tok->str() == "switch")
{ {
const Token *tok2 = tok->next()->link(); const Token *tok2 = tok->next()->link();

View File

@ -22,6 +22,8 @@
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <stdexcept> #include <stdexcept>
#include <iostream>
#include <cctype> // std::isdigit, std::isalnum, etc
Settings::Settings() Settings::Settings()
{ {
@ -43,8 +45,19 @@ Settings::Settings()
bool Settings::Suppressions::parseFile(std::istream &istr) bool Settings::Suppressions::parseFile(std::istream &istr)
{ {
// Change '\r' to '\n' in the istr
std::string filedata;
std::string line; std::string line;
while (getline(istr, line)) while (std::getline(istr, line))
filedata += line + "\n";
while (filedata.find("\r") != std::string::npos)
filedata[filedata.find("\r")] = '\n';
bool ret = true;
// Parse filedata..
std::istringstream istr2(filedata);
while (std::getline(istr2, line))
{ {
// Skip empty lines // Skip empty lines
if (line.empty()) if (line.empty())
@ -63,16 +76,38 @@ bool Settings::Suppressions::parseFile(std::istream &istr)
} }
// We could perhaps check if the id is valid and return error if it is not // We could perhaps check if the id is valid and return error if it is not
addSuppression(id, file, lineNumber); ret &= addSuppression(id, file, lineNumber);
} }
return true; return ret;
} }
void Settings::Suppressions::addSuppression(const std::string &errorId, const std::string &file, unsigned int line) bool Settings::Suppressions::addSuppression(const std::string &errorId, const std::string &file, unsigned int line)
{ {
// Check that errorId is valid..
if (errorId.empty())
{
std::cerr << "Failed to add suppression. No id." << std::endl;
return false;
}
for (std::string::size_type pos = 0; pos < errorId.length(); ++pos)
{
if (errorId[pos] < 0 || !std::isalnum(errorId[pos]))
{
std::cerr << "Failed to add suppression. Invalid id \"" << errorId << "\"" << std::endl;
return false;
}
if (pos == 0 && std::isdigit(errorId[pos]))
{
std::cerr << "Failed to add suppression. Invalid id \"" << errorId << "\"" << std::endl;
return false;
}
}
_suppressions[errorId][file].push_back(line); _suppressions[errorId][file].push_back(line);
_suppressions[errorId][file].sort(); _suppressions[errorId][file].sort();
return true;
} }
bool Settings::Suppressions::isSuppressed(const std::string &errorId, const std::string &file, unsigned int line) bool Settings::Suppressions::isSuppressed(const std::string &errorId, const std::string &file, unsigned int line)

View File

@ -145,8 +145,9 @@ public:
* @param errorId the id for the error, e.g. "arrayIndexOutOfBounds" * @param errorId the id for the error, e.g. "arrayIndexOutOfBounds"
* @param file File name with the path, e.g. "src/main.cpp" * @param file File name with the path, e.g. "src/main.cpp"
* @param line number, e.g. "123" * @param line number, e.g. "123"
* @return true on success, false in syntax error is noticed.
*/ */
void addSuppression(const std::string &errorId, const std::string &file = "", unsigned int line = 0); bool addSuppression(const std::string &errorId, const std::string &file = "", unsigned int line = 0);
/** /**
* @brief Returns true if this message should not be shown to the user. * @brief Returns true if this message should not be shown to the user.

View File

@ -97,25 +97,26 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>&dhpackage;</refname> <refname>&dhpackage;</refname>
<refpurpose>Simple syntax checking of C/C++.</refpurpose> <refpurpose>Tool for static C/C++ code analysis</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>&dhpackage;</command> <command>&dhpackage;</command>
<arg choice="opt"><option>--append [file]</option></arg> <arg choice="opt"><option>--append=[file]</option></arg>
<arg choice="opt"><option>-D[id]</option></arg> <arg choice="opt"><option>-D[id]</option></arg>
<arg choice="opt"><option>--enable=[id]</option></arg> <arg choice="opt"><option>--enable=[id]</option></arg>
<arg choice="opt"><option>--error-exitcode=[n]</option></arg> <arg choice="opt"><option>--error-exitcode=[n]</option></arg>
<arg choice="opt"><option>--exitcode-suppressions [file]</option></arg> <arg choice="opt"><option>--exitcode-suppressions [file]</option></arg>
<arg choice="opt"><option>--file-list=file</option></arg>
<arg choice="opt"><option>--force</option></arg> <arg choice="opt"><option>--force</option></arg>
<arg choice="opt"><option>--help</option></arg> <arg choice="opt"><option>--help</option></arg>
<arg choice="opt"><option>-I[dir]</option></arg> <arg choice="opt"><option>-I[dir]</option></arg>
<arg choice="opt"><option>--inline-suppr</option></arg>
<arg choice="opt"><option>-j[jobs]</option></arg> <arg choice="opt"><option>-j[jobs]</option></arg>
<arg choice="opt"><option>--quiet</option></arg> <arg choice="opt"><option>--quiet</option></arg>
<arg choice="opt"><option>--style</option></arg> <arg choice="opt"><option>--style</option></arg>
<arg choice="opt"><option>--suppressions [file]</option></arg> <arg choice="opt"><option>--suppressions [file]</option></arg>
<arg choice="opt"><option>--template ['text']</option></arg> <arg choice="opt"><option>--template '[text]'</option></arg>
<arg choice="opt"><option>--unused-functions</option></arg>
<arg choice="opt"><option>--verbose</option></arg> <arg choice="opt"><option>--verbose</option></arg>
<arg choice="opt"><option>--version</option></arg> <arg choice="opt"><option>--version</option></arg>
<arg choice="opt"><option>--xml</option></arg> <arg choice="opt"><option>--xml</option></arg>
@ -125,10 +126,13 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
</refsynopsisdiv> </refsynopsisdiv>
<refsect1 id="description"> <refsect1 id="description">
<title>DESCRIPTION</title> <title>DESCRIPTION</title>
<para>Tool for static C/C++ code analysis <para>Cppcheck is a command-line tool that tries to detect bugs that your C/C++
intended to complement the checking of the compiler. compiler doesn't see. It is versatile, and can check non-standard code
Checks for: memory leaks, mismatching allocation-deallocation, including various compiler extensions, inline assembly code, etc.
buffer overrun, and many more.</para> Its internal preprocessor can handle includes, macros, and several
preprocessor commands. While Cppcheck is highly configurable,
you can start using it just by giving it a path to the source code.
</para>
</refsect1> </refsect1>
<refsect1 id="options"> <refsect1 id="options">
<title>OPTIONS</title> <title>OPTIONS</title>
@ -262,11 +266,12 @@ files, this is not needed.</para>
<varlistentry> <varlistentry>
<term><option>--suppressions [file]</option></term> <term><option>--suppressions [file]</option></term>
<listitem> <listitem>
<para>Suppress warnings listed in the file. Filename and line are optional. The format of the single line in file is: [error id]:[filename]:[line]</para> <para>Suppress warnings listed in the file. Filename and line are optional. The format of the single line in file is: [error id]:[filename]:[line].
You can use --template or --xml to see the error id.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--template ['text']</option></term> <term><option>--template '[text]'</option></term>
<listitem> <listitem>
<para>Format the error messages. E.g. '{file}:{line},{severity},{id},{message}' or '{file}({line}):({severity}) {message}'. Pre-defined templates: gcc, vs</para> <para>Format the error messages. E.g. '{file}:{line},{severity},{id},{message}' or '{file}({line}):({severity}) {message}'. Pre-defined templates: gcc, vs</para>
</listitem> </listitem>
@ -300,7 +305,7 @@ files, this is not needed.</para>
</refsect1> </refsect1>
<refsect1 id="author"> <refsect1 id="author">
<title>AUTHOR</title> <title>AUTHOR</title>
<para>The program was written by Bill Egert, Daniel Marjamäki, Gianluca Scacco, Hoang Tuan Su, Kimmo Varis, Leandro Penz, Nicolas Le Cam, Reijo Tomperi, Slava Semushin and Vesa Pikki</para> <para>The program was written by Bill Egert, Daniel Marjamäki, Gianluca Scacco, Hoang Tuan Su, Kimmo Varis, Leandro Penz, Martin Ettl, Nguyen Duong Tuan, Nicolas Le Cam, Reijo Tomperi, Robert Reif, Slava Semushin, Vesa Pikki and Zachary Blair</para>
</refsect1> </refsect1>
<refsect1 id="see_also"> <refsect1 id="see_also">
<title>SEE ALSO</title> <title>SEE ALSO</title>

View File

@ -3,9 +3,9 @@
"/usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd"> "/usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd">
<book> <book>
<bookinfo> <bookinfo>
<title>Cppcheck 1.43</title> <title>Cppcheck 1.44</title>
<date>2010-05-08</date> <date>2010-07-10</date>
</bookinfo> </bookinfo>
<chapter> <chapter>
@ -165,9 +165,14 @@ Checking path/file2.cpp...
<para>But if you want to manually limit the checking you can do so with <para>But if you want to manually limit the checking you can do so with
<literal>-D</literal>.</para> <literal>-D</literal>.</para>
<para>For example, if you want to limit the checking so the only <para>Beware that only the macros, which are given here and the macros
configuration to check should be "DEBUG=1;__cplusplus" then something like defined in source files and known header files are considered. That
this can be used:</para> excludes all the macros defined in some system header files, which are by
default not examined by cppcheck.</para>
<para>The usage: if you, for example, want to limit the checking so the
only configuration to check should be "DEBUG=1;__cplusplus" then something
like this can be used:</para>
<programlisting>cppcheck -DDEBUG=1 -D__cplusplus path</programlisting> <programlisting>cppcheck -DDEBUG=1 -D__cplusplus path</programlisting>
</chapter> </chapter>
@ -220,7 +225,7 @@ Checking path/file2.cpp...
<term>severity</term> <term>severity</term>
<listitem> <listitem>
<para>one of: error / possible error / style / possible style</para> <para>either error or style</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -1089,7 +1089,7 @@ private:
" ;\n" " ;\n"
" free(buf);\n" " free(buf);\n"
"}\n"); "}\n");
ASSERT_EQUALS("[test.cpp:6]: (error) Memory leak: \"buf\" nulled but not freed upon failure\n", errout.str()); ASSERT_EQUALS("[test.cpp:6]: (error) Common realloc mistake: \"buf\" nulled but not freed upon failure\n", errout.str());
} }
void if11() void if11()
@ -1178,7 +1178,7 @@ private:
"\n" "\n"
" return a;\n" " return a;\n"
"}\n", true); "}\n", true);
ASSERT_EQUALS("[test.cpp:9]: (error) Memory leak: \"a\" nulled but not freed upon failure\n", errout.str()); ASSERT_EQUALS("[test.cpp:9]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n", errout.str());
} }
@ -1199,7 +1199,7 @@ private:
"\n" "\n"
" return a;\n" " return a;\n"
"}\n", true); "}\n", true);
ASSERT_EQUALS("[test.cpp:9]: (error) Memory leak: \"a\" nulled but not freed upon failure\n" ASSERT_EQUALS("[test.cpp:9]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n"
"[test.cpp:11]: (error) Memory leak: a\n", errout.str()); "[test.cpp:11]: (error) Memory leak: a\n", errout.str());
} }
@ -1932,7 +1932,7 @@ private:
" char *a = (char *)malloc(10);\n" " char *a = (char *)malloc(10);\n"
" a = realloc(a, 100);\n" " a = realloc(a, 100);\n"
"}\n"); "}\n");
ASSERT_EQUALS("[test.cpp:4]: (error) Memory leak: \"a\" nulled but not freed upon failure\n" ASSERT_EQUALS("[test.cpp:4]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n"
"[test.cpp:5]: (error) Memory leak: a\n", errout.str()); "[test.cpp:5]: (error) Memory leak: a\n", errout.str());
} }
@ -1945,7 +1945,7 @@ private:
" free(a);\n" " free(a);\n"
"}\n"); "}\n");
ASSERT_EQUALS("[test.cpp:4]: (error) Memory leak: \"a\" nulled but not freed upon failure\n", errout.str()); ASSERT_EQUALS("[test.cpp:4]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n", errout.str());
} }
void realloc3() void realloc3()

View File

@ -1713,6 +1713,18 @@ private:
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
checkUninitVar("void foo()\n"
"{\n"
" const char *msgid1, *msgid2;\n"
" int ret = bar(&msgid1);\n"
" if (ret > 0) {\n"
" ret = bar(&msgid2);\n"
" }\n"
" ret = ret <= 0 ? -1 :\n"
" strcmp(msgid1, msgid2) == 0;\n"
"}\n");
ASSERT_EQUALS("", errout.str());
// while.. // while..
checkUninitVar("int f()\n" checkUninitVar("int f()\n"
"{\n" "{\n"

57
test/testsettings.cpp Normal file
View File

@ -0,0 +1,57 @@
/*
* Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2010 Daniel Marjamäki and Cppcheck team.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "settings.h"
#include "testsuite.h"
#include <sstream>
extern std::ostringstream errout;
class TestSettings : public TestFixture
{
public:
TestSettings() : TestFixture("TestSettings")
{ }
private:
void run()
{
TEST_CASE(suppressionsBadId1);
TEST_CASE(suppressionsDosFormat); // Ticket #1836
}
void suppressionsBadId1()
{
Settings::Suppressions suppressions;
std::istringstream s("123");
ASSERT_EQUALS(false, suppressions.parseFile(s));
}
void suppressionsDosFormat()
{
Settings::Suppressions suppressions;
std::istringstream s("abc\r\ndef\r\n");
ASSERT_EQUALS(true, suppressions.parseFile(s));
ASSERT_EQUALS(true, suppressions.isSuppressed("abc", "test.cpp", 1));
ASSERT_EQUALS(true, suppressions.isSuppressed("def", "test.cpp", 1));
}
};
REGISTER_TEST(TestSettings)

View File

@ -53,7 +53,8 @@ private:
TEST_CASE(erase3); TEST_CASE(erase3);
TEST_CASE(erase4); TEST_CASE(erase4);
TEST_CASE(eraseBreak); TEST_CASE(eraseBreak);
TEST_CASE(eraseReturn); TEST_CASE(eraseReturn1);
TEST_CASE(eraseReturn2);
TEST_CASE(eraseGoto); TEST_CASE(eraseGoto);
TEST_CASE(eraseAssign); TEST_CASE(eraseAssign);
TEST_CASE(eraseErase); TEST_CASE(eraseErase);
@ -442,10 +443,12 @@ private:
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }
void eraseReturn() void eraseReturn1()
{ {
check("void f()\n" check("void f()\n"
"{\n" "{\n"
" std::vector<int> foo;\n"
" std::vector<int>::iterator it;\n"
" for (it = foo.begin(); it != foo.end(); ++it)\n" " for (it = foo.begin(); it != foo.end(); ++it)\n"
" {\n" " {\n"
" foo.erase(it);\n" " foo.erase(it);\n"
@ -455,6 +458,27 @@ private:
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }
void eraseReturn2()
{
check("void f()\n"
"{\n"
" std::vector<int> foo;\n"
" std::vector<int>::iterator it;\n"
" for (it = foo.begin(); it != foo.end(); ++it)\n"
" {\n"
" if (*it == 1) {\n"
" foo.erase(it);\n"
" return;\n"
" }\n"
" else {\n"
" foo.erase(it);\n"
" return;\n"
" }\n"
" }\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
void eraseGoto() void eraseGoto()
{ {
check("void f()\n" check("void f()\n"

View File

@ -74,8 +74,7 @@ private:
void run() void run()
{ {
// This is commented out, because it causes a deadlock TEST_CASE(deadlock_with_many_errors);
// TEST_CASE(deadlock_with_many_errors);
TEST_CASE(no_errors_more_files); TEST_CASE(no_errors_more_files);
TEST_CASE(no_errors_less_files); TEST_CASE(no_errors_less_files);
TEST_CASE(no_errors_equal_amount_files); TEST_CASE(no_errors_equal_amount_files);

View File

@ -58,9 +58,11 @@ private:
errout.str(""); errout.str("");
// Check for unused functions.. // Check for unused functions..
CheckUnusedFunctions checkUnusedFunctions(this); Settings settings;
settings._checkCodingStyle = true;
CheckUnusedFunctions checkUnusedFunctions(&tokenizer, &settings, this);
checkUnusedFunctions.parseTokens(tokenizer); checkUnusedFunctions.parseTokens(tokenizer);
checkUnusedFunctions.check(); checkUnusedFunctions.check(this);
} }
void incondition() void incondition()

View File

@ -70,6 +70,7 @@ private:
TEST_CASE(localvar22); // ticket #1811 TEST_CASE(localvar22); // ticket #1811
TEST_CASE(localvar23); // ticket #1808 TEST_CASE(localvar23); // ticket #1808
TEST_CASE(localvar24); // ticket #1803 TEST_CASE(localvar24); // ticket #1803
TEST_CASE(localvar25); // ticket #1729
TEST_CASE(localvaralias1); TEST_CASE(localvaralias1);
TEST_CASE(localvaralias2); // ticket #1637 TEST_CASE(localvaralias2); // ticket #1637
TEST_CASE(localvaralias3); // ticket #1639 TEST_CASE(localvaralias3); // ticket #1639
@ -1232,6 +1233,18 @@ private:
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }
void localvar25() // ticket #1729
{
functionVariableUsage("int main() {\n"
" int ppos = 1;\n"
" int pneg = 0;\n"
" const char*edge = ppos? \" +\" : pneg ? \" -\" : \"\";\n"
" printf(\"This should be a '+' -> %s\n\", edge);\n"
" return 0;\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
void localvaralias1() void localvaralias1()
{ {
functionVariableUsage("void foo()\n" functionVariableUsage("void foo()\n"
@ -1796,6 +1809,56 @@ private:
"}"); "}");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
functionVariableUsage("void foo()\n"
"{\n"
" char buf[8];\n"
" char *srcdata;\n"
" if (a()) {\n"
" buf[0] = 1;\n"
" srcdata = buf;\n"
" srcdata = vdata;\n"
" }\n"
" b(srcdata);\n"
"}");
TODO_ASSERT_EQUALS(std::string("[test.cpp:3]: (style) Variable 'buf' is assigned a value that is never used\n"), errout.str());
functionVariableUsage("void foo()\n"
"{\n"
" char buf[8];\n"
" char *srcdata;\n"
" if (a()) {\n"
" buf[0] = 1;\n"
" srcdata = buf;\n"
" }\n"
" srcdata = vdata;\n"
" b(srcdata);\n"
"}");
TODO_ASSERT_EQUALS(std::string("[test.cpp:3]: (style) Variable 'buf' is assigned a value that is never used\n"), errout.str());
functionVariableUsage("void foo()\n"
"{\n"
" char buf[8];\n"
" char *srcdata;\n"
" if (a()) {\n"
" srcdata = buf;\n"
" }\n"
" srcdata = vdata;\n"
" b(srcdata);\n"
"}");
TODO_ASSERT_EQUALS(std::string("[test.cpp:3]: (style) Unused variable: buf\n"), errout.str());
functionVariableUsage("void foo()\n"
"{\n"
" char buf[8];\n"
" char *srcdata;\n"
" if (a()) {\n"
" srcdata = vdata;\n"
" }\n"
" srcdata = buf;\n"
" b(srcdata);\n"
"}");
ASSERT_EQUALS(std::string(""), errout.str());
functionVariableUsage("void foo()\n" functionVariableUsage("void foo()\n"
"{\n" "{\n"
" char buf[8];\n" " char buf[8];\n"
@ -1810,6 +1873,60 @@ private:
" b(srcdata);\n" " b(srcdata);\n"
"}"); "}");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
functionVariableUsage("void foo()\n"
"{\n"
" char buf[8];\n"
" char *srcdata;\n"
" char vdata[8];\n"
" if (a()) {\n"
" buf[0] = 1;\n"
" srcdata = buf;\n"
" srcdata = vdata;\n"
" }\n"
" b(srcdata);\n"
"}");
TODO_ASSERT_EQUALS(std::string("[test.cpp:3]: (style) Variable 'buf' is assigned a value that is never used\n"), errout.str());
functionVariableUsage("void foo()\n"
"{\n"
" char buf[8];\n"
" char *srcdata;\n"
" char vdata[8];\n"
" if (a()) {\n"
" buf[0] = 1;\n"
" srcdata = buf;\n"
" }\n"
" srcdata = vdata;\n"
" b(srcdata);\n"
"}");
TODO_ASSERT_EQUALS(std::string("[test.cpp:3]: (style) Variable 'buf' is assigned a value that is never used\n"), errout.str());
functionVariableUsage("void foo()\n"
"{\n"
" char buf[8];\n"
" char *srcdata;\n"
" char vdata[8];\n"
" if (a()) {\n"
" srcdata = buf;\n"
" }\n"
" srcdata = vdata;\n"
" b(srcdata);\n"
"}");
TODO_ASSERT_EQUALS(std::string("[test.cpp:3]: (style) Unused variable: buf\n"), errout.str());
functionVariableUsage("void foo()\n"
"{\n"
" char buf[8];\n"
" char *srcdata;\n"
" char vdata[8];\n"
" if (a()) {\n"
" srcdata = vdata;\n"
" }\n"
" srcdata = buf;\n"
" b(srcdata);\n"
"}");
TODO_ASSERT_EQUALS(std::string("[test.cpp:5]: (style) Unused variable: vdata\n"), errout.str());
} }
void localvaralias7() // ticket 1732 void localvaralias7() // ticket 1732

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Include> <Include>
<?define ProductName = "Cppcheck 1.43" ?> <?define ProductName = "Cppcheck 1.44" ?>
<?define ProductNameShort = "Cppcheck" ?> <?define ProductNameShort = "Cppcheck" ?>
<?define ProductVersion = "1.43.0" ?> <?define ProductVersion = "1.44.0" ?>
<?define ProductManufacturer = "The Cppcheck team" ?> <?define ProductManufacturer = "The Cppcheck team" ?>
<?define ProductDescription = "Cppcheck is a tool for static analysis of C/C++ code" ?> <?define ProductDescription = "Cppcheck is a tool for static analysis of C/C++ code" ?>