GUI: Add new CSV report type.
CSV files are handy (and commonly used) to export/import data to other programs. CSV reports allow easy import of cppcheck error data to other programs for further processing.
This commit is contained in:
parent
d4e6d42104
commit
58c21dde1c
|
@ -18,7 +18,7 @@
|
|||
<source>Cppcheck - A tool for static C/C++ code analysis.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<message utf8="true">
|
||||
<location filename="about.ui" line="65"/>
|
||||
<source>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -116,10 +116,10 @@ kate -l(line) (file)</source>
|
|||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="238"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<location filename="mainwindow.cpp" line="554"/>
|
||||
<location filename="mainwindow.cpp" line="572"/>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="458"/>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="579"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -284,59 +284,64 @@ kate -l(line) (file)</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="201"/>
|
||||
<location filename="mainwindow.cpp" line="202"/>
|
||||
<source>Select files to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="210"/>
|
||||
<location filename="mainwindow.cpp" line="211"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="240"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="452"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<source>Cannot exit while checking.
|
||||
|
||||
Stop the checking before exiting.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="498"/>
|
||||
<location filename="mainwindow.cpp" line="500"/>
|
||||
<source>License</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="505"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<source>Authors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="513"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt)</source>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<location filename="mainwindow.cpp" line="517"/>
|
||||
<source>Save the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="523"/>
|
||||
<location filename="mainwindow.cpp" line="525"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<location filename="mainwindow.cpp" line="531"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="563"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="573"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -397,25 +402,25 @@ Stop the checking before exiting.</source>
|
|||
<name>ResultsTree</name>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Severity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Line</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Message</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -453,22 +458,22 @@ Please check the application path and parameters are correct.</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="612"/>
|
||||
<location filename="resultstree.cpp" line="613"/>
|
||||
<source>all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="616"/>
|
||||
<location filename="resultstree.cpp" line="617"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="620"/>
|
||||
<location filename="resultstree.cpp" line="621"/>
|
||||
<source>security</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="624"/>
|
||||
<location filename="resultstree.cpp" line="625"/>
|
||||
<source>error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -476,18 +481,18 @@ Please check the application path and parameters are correct.</source>
|
|||
<context>
|
||||
<name>ResultsView</name>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="77"/>
|
||||
<location filename="resultsview.cpp" line="89"/>
|
||||
<location filename="resultsview.cpp" line="79"/>
|
||||
<location filename="resultsview.cpp" line="91"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="78"/>
|
||||
<location filename="resultsview.cpp" line="80"/>
|
||||
<source>No errors found.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="86"/>
|
||||
<location filename="resultsview.cpp" line="88"/>
|
||||
<source>Errors were found, but they are configured to be hidden.
|
||||
To toggle what kind of errors are shown, open view menu.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<source>Cppcheck - A tool for static C/C++ code analysis.</source>
|
||||
<translation>Cppcheck - A tool for static C/C++ code analysis.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<message utf8="true">
|
||||
<location filename="about.ui" line="65"/>
|
||||
<source>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</source>
|
||||
<translation>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</translation>
|
||||
|
@ -129,10 +129,10 @@ kate -l(line) (file)</translation>
|
|||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="238"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<location filename="mainwindow.cpp" line="554"/>
|
||||
<location filename="mainwindow.cpp" line="572"/>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="458"/>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="579"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
|
@ -297,22 +297,22 @@ kate -l(line) (file)</translation>
|
|||
<translation>&Help</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="201"/>
|
||||
<location filename="mainwindow.cpp" line="202"/>
|
||||
<source>Select files to check</source>
|
||||
<translation>Select files to check</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="210"/>
|
||||
<location filename="mainwindow.cpp" line="211"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation>Select directory to check</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="240"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation>No suitable files found to check!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="452"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<source>Cannot exit while checking.
|
||||
|
||||
Stop the checking before exiting.</source>
|
||||
|
@ -321,37 +321,46 @@ Stop the checking before exiting.</source>
|
|||
Stop the checking before exiting.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="498"/>
|
||||
<location filename="mainwindow.cpp" line="500"/>
|
||||
<source>License</source>
|
||||
<translation>License</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="505"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<source>Authors</source>
|
||||
<translation>Authors</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="513"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt)</source>
|
||||
<translation>XML files (*.xml);;Text files (*.txt)</translation>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt)</source>
|
||||
<translation type="obsolete">XML files (*.xml);;Text files (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="517"/>
|
||||
<source>Save the report file</source>
|
||||
<translation>Save the report file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="523"/>
|
||||
<location filename="mainwindow.cpp" line="525"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation>XML files (*.xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<location filename="mainwindow.cpp" line="531"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="563"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation>Cppcheck - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="573"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -414,25 +423,25 @@ Stop the checking before exiting.</translation>
|
|||
<name>ResultsTree</name>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>File</source>
|
||||
<translation>File</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Severity</source>
|
||||
<translation>Severity</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Line</source>
|
||||
<translation>Line</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Message</source>
|
||||
<translation>Message</translation>
|
||||
</message>
|
||||
|
@ -472,22 +481,22 @@ Please check the application path and parameters are correct.</source>
|
|||
Please check the application path and parameters are correct.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="612"/>
|
||||
<location filename="resultstree.cpp" line="613"/>
|
||||
<source>all</source>
|
||||
<translation>All</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="616"/>
|
||||
<location filename="resultstree.cpp" line="617"/>
|
||||
<source>style</source>
|
||||
<translation>Style</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="620"/>
|
||||
<location filename="resultstree.cpp" line="621"/>
|
||||
<source>security</source>
|
||||
<translation>Security</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="624"/>
|
||||
<location filename="resultstree.cpp" line="625"/>
|
||||
<source>error</source>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
|
@ -495,18 +504,18 @@ Please check the application path and parameters are correct.</translation>
|
|||
<context>
|
||||
<name>ResultsView</name>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="77"/>
|
||||
<location filename="resultsview.cpp" line="89"/>
|
||||
<location filename="resultsview.cpp" line="79"/>
|
||||
<location filename="resultsview.cpp" line="91"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="78"/>
|
||||
<location filename="resultsview.cpp" line="80"/>
|
||||
<source>No errors found.</source>
|
||||
<translation>No errors found.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="86"/>
|
||||
<location filename="resultsview.cpp" line="88"/>
|
||||
<source>Errors were found, but they are configured to be hidden.
|
||||
To toggle what kind of errors are shown, open view menu.</source>
|
||||
<translation>Errors were found, but they are configured to be hidden.
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<source>Cppcheck - A tool for static C/C++ code analysis.</source>
|
||||
<translation>Cppcheck - Työkalu C/C++ koodin staattiseen analysointiin.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<message utf8="true">
|
||||
<location filename="about.ui" line="65"/>
|
||||
<source>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</source>
|
||||
<translation>Copyright (C) 2007-2009 Daniel Marjamäki ja cppcheck tiimi.</translation>
|
||||
|
@ -131,10 +131,10 @@ kate -l(line) (file)
|
|||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="238"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<location filename="mainwindow.cpp" line="554"/>
|
||||
<location filename="mainwindow.cpp" line="572"/>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="458"/>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="579"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
|
@ -299,22 +299,22 @@ kate -l(line) (file)
|
|||
<translation>&Ohje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="201"/>
|
||||
<location filename="mainwindow.cpp" line="202"/>
|
||||
<source>Select files to check</source>
|
||||
<translation>Valitse tarkistettavat tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="210"/>
|
||||
<location filename="mainwindow.cpp" line="211"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation>Valitse tarkistettava hakemisto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="240"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation>Tarkistettavaksi sopivia tiedostoja ei löytynyt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="452"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<source>Cannot exit while checking.
|
||||
|
||||
Stop the checking before exiting.</source>
|
||||
|
@ -323,37 +323,46 @@ Stop the checking before exiting.</source>
|
|||
Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="498"/>
|
||||
<location filename="mainwindow.cpp" line="500"/>
|
||||
<source>License</source>
|
||||
<translation>Lisenssi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="505"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<source>Authors</source>
|
||||
<translation>Tekijät</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="513"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt)</source>
|
||||
<translation>XML-tiedostot (*.xml);;Tekstitiedostot (*.txt)</translation>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt)</source>
|
||||
<translation type="obsolete">XML-tiedostot (*.xml);;Tekstitiedostot (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="517"/>
|
||||
<source>Save the report file</source>
|
||||
<translation>Tallenna raportti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="523"/>
|
||||
<location filename="mainwindow.cpp" line="525"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation>XML-tiedostot (*xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<location filename="mainwindow.cpp" line="531"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="563"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation>Cppcheck - %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="573"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -418,25 +427,25 @@ Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
|
|||
<name>ResultsTree</name>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>File</source>
|
||||
<translation>Tiedosto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Severity</source>
|
||||
<translation>Tyyppi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Line</source>
|
||||
<translation>Rivi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Message</source>
|
||||
<translation>Virhe</translation>
|
||||
</message>
|
||||
|
@ -476,22 +485,22 @@ Please check the application path and parameters are correct.</source>
|
|||
Tarkista että ohjelman polku ja parametrit ovat oikeat.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="612"/>
|
||||
<location filename="resultstree.cpp" line="613"/>
|
||||
<source>all</source>
|
||||
<translation>Epävarmat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="616"/>
|
||||
<location filename="resultstree.cpp" line="617"/>
|
||||
<source>style</source>
|
||||
<translation>Tyyli</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="620"/>
|
||||
<location filename="resultstree.cpp" line="621"/>
|
||||
<source>security</source>
|
||||
<translation>Tietoturva</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="624"/>
|
||||
<location filename="resultstree.cpp" line="625"/>
|
||||
<source>error</source>
|
||||
<translation>Yleinen</translation>
|
||||
</message>
|
||||
|
@ -499,18 +508,18 @@ Tarkista että ohjelman polku ja parametrit ovat oikeat.</translation>
|
|||
<context>
|
||||
<name>ResultsView</name>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="77"/>
|
||||
<location filename="resultsview.cpp" line="89"/>
|
||||
<location filename="resultsview.cpp" line="79"/>
|
||||
<location filename="resultsview.cpp" line="91"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation>Cppcheck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="78"/>
|
||||
<location filename="resultsview.cpp" line="80"/>
|
||||
<source>No errors found.</source>
|
||||
<translation>Virheitä ei löytynyt.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="86"/>
|
||||
<location filename="resultsview.cpp" line="88"/>
|
||||
<source>Errors were found, but they are configured to be hidden.
|
||||
To toggle what kind of errors are shown, open view menu.</source>
|
||||
<translation>Virheitä löytyi, mutta asetuksissa kyseiset virheet on määritelty piilotettavaksi.
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<source>Cppcheck - A tool for static C/C++ code analysis.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<message utf8="true">
|
||||
<location filename="about.ui" line="65"/>
|
||||
<source>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -118,10 +118,10 @@ kate -l(line) (file)</source>
|
|||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="238"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<location filename="mainwindow.cpp" line="554"/>
|
||||
<location filename="mainwindow.cpp" line="572"/>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="458"/>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="579"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -286,59 +286,64 @@ kate -l(line) (file)</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="201"/>
|
||||
<location filename="mainwindow.cpp" line="202"/>
|
||||
<source>Select files to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="210"/>
|
||||
<location filename="mainwindow.cpp" line="211"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="240"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="452"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<source>Cannot exit while checking.
|
||||
|
||||
Stop the checking before exiting.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="498"/>
|
||||
<location filename="mainwindow.cpp" line="500"/>
|
||||
<source>License</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="505"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<source>Authors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="513"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt)</source>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<location filename="mainwindow.cpp" line="517"/>
|
||||
<source>Save the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="523"/>
|
||||
<location filename="mainwindow.cpp" line="525"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<location filename="mainwindow.cpp" line="531"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="563"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="573"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -399,25 +404,25 @@ Stop the checking before exiting.</source>
|
|||
<name>ResultsTree</name>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Severity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Line</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Message</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -455,22 +460,22 @@ Please check the application path and parameters are correct.</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="612"/>
|
||||
<location filename="resultstree.cpp" line="613"/>
|
||||
<source>all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="616"/>
|
||||
<location filename="resultstree.cpp" line="617"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="620"/>
|
||||
<location filename="resultstree.cpp" line="621"/>
|
||||
<source>security</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="624"/>
|
||||
<location filename="resultstree.cpp" line="625"/>
|
||||
<source>error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -478,18 +483,18 @@ Please check the application path and parameters are correct.</source>
|
|||
<context>
|
||||
<name>ResultsView</name>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="77"/>
|
||||
<location filename="resultsview.cpp" line="89"/>
|
||||
<location filename="resultsview.cpp" line="79"/>
|
||||
<location filename="resultsview.cpp" line="91"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="78"/>
|
||||
<location filename="resultsview.cpp" line="80"/>
|
||||
<source>No errors found.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="86"/>
|
||||
<location filename="resultsview.cpp" line="88"/>
|
||||
<source>Errors were found, but they are configured to be hidden.
|
||||
To toggle what kind of errors are shown, open view menu.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<source>Cppcheck - A tool for static C/C++ code analysis.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<message utf8="true">
|
||||
<location filename="about.ui" line="65"/>
|
||||
<source>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -118,10 +118,10 @@ kate -l(line) (file)</source>
|
|||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="main.ui" line="26"/>
|
||||
<location filename="mainwindow.cpp" line="238"/>
|
||||
<location filename="mainwindow.cpp" line="456"/>
|
||||
<location filename="mainwindow.cpp" line="554"/>
|
||||
<location filename="mainwindow.cpp" line="572"/>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="458"/>
|
||||
<location filename="mainwindow.cpp" line="561"/>
|
||||
<location filename="mainwindow.cpp" line="579"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -286,59 +286,64 @@ kate -l(line) (file)</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="201"/>
|
||||
<location filename="mainwindow.cpp" line="202"/>
|
||||
<source>Select files to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="210"/>
|
||||
<location filename="mainwindow.cpp" line="211"/>
|
||||
<source>Select directory to check</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="239"/>
|
||||
<location filename="mainwindow.cpp" line="240"/>
|
||||
<source>No suitable files found to check!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="452"/>
|
||||
<location filename="mainwindow.cpp" line="454"/>
|
||||
<source>Cannot exit while checking.
|
||||
|
||||
Stop the checking before exiting.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="498"/>
|
||||
<location filename="mainwindow.cpp" line="500"/>
|
||||
<source>License</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="505"/>
|
||||
<location filename="mainwindow.cpp" line="507"/>
|
||||
<source>Authors</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="513"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt)</source>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="515"/>
|
||||
<location filename="mainwindow.cpp" line="517"/>
|
||||
<source>Save the report file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="523"/>
|
||||
<location filename="mainwindow.cpp" line="525"/>
|
||||
<source>XML files (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="556"/>
|
||||
<location filename="mainwindow.cpp" line="531"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="563"/>
|
||||
<source>Cppcheck - %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="573"/>
|
||||
<location filename="mainwindow.cpp" line="580"/>
|
||||
<source>Failed to change the language:
|
||||
|
||||
%1
|
||||
|
@ -399,25 +404,25 @@ Stop the checking before exiting.</source>
|
|||
<name>ResultsTree</name>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Severity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Line</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="39"/>
|
||||
<location filename="resultstree.cpp" line="754"/>
|
||||
<location filename="resultstree.cpp" line="755"/>
|
||||
<source>Message</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -455,22 +460,22 @@ Please check the application path and parameters are correct.</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="612"/>
|
||||
<location filename="resultstree.cpp" line="613"/>
|
||||
<source>all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="616"/>
|
||||
<location filename="resultstree.cpp" line="617"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="620"/>
|
||||
<location filename="resultstree.cpp" line="621"/>
|
||||
<source>security</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultstree.cpp" line="624"/>
|
||||
<location filename="resultstree.cpp" line="625"/>
|
||||
<source>error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -478,18 +483,18 @@ Please check the application path and parameters are correct.</source>
|
|||
<context>
|
||||
<name>ResultsView</name>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="77"/>
|
||||
<location filename="resultsview.cpp" line="89"/>
|
||||
<location filename="resultsview.cpp" line="79"/>
|
||||
<location filename="resultsview.cpp" line="91"/>
|
||||
<source>Cppcheck</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="78"/>
|
||||
<location filename="resultsview.cpp" line="80"/>
|
||||
<source>No errors found.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="resultsview.cpp" line="86"/>
|
||||
<location filename="resultsview.cpp" line="88"/>
|
||||
<source>Errors were found, but they are configured to be hidden.
|
||||
To toggle what kind of errors are shown, open view menu.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Cppcheck - A tool for static C/C++ code analysis
|
||||
* Copyright (C) 2007-2009 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 <QFile>
|
||||
#include <QTextStream>
|
||||
#include "csvreport.h"
|
||||
|
||||
CsvReport::CsvReport(const QString &filename, QObject * parent) :
|
||||
Report(filename, parent)
|
||||
{
|
||||
}
|
||||
|
||||
CsvReport::~CsvReport()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
bool CsvReport::Create()
|
||||
{
|
||||
bool success = false;
|
||||
if (Report::Create())
|
||||
{
|
||||
mTxtWriter.setDevice(Report::GetFile());
|
||||
success = true;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
void CsvReport::WriteHeader()
|
||||
{
|
||||
// No header for CSV report
|
||||
}
|
||||
|
||||
void CsvReport::WriteFooter()
|
||||
{
|
||||
// No footer for CSV report
|
||||
}
|
||||
|
||||
void CsvReport::WriteError(const QStringList &files, const QStringList &lines,
|
||||
const QString &id, const QString &severity, const QString &msg)
|
||||
{
|
||||
Q_UNUSED(id);
|
||||
|
||||
/*
|
||||
Error as CSV line
|
||||
gui/test.cpp,23,error,Mismatching allocation and deallocation: k
|
||||
*/
|
||||
|
||||
QString line;
|
||||
line += QString("%1,%2,").arg(files[files.size() - 1]).arg(lines[lines.size() - 1]);
|
||||
line += QString("%1,%2").arg(severity).arg(msg);
|
||||
|
||||
mTxtWriter << line << endl;
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Cppcheck - A tool for static C/C++ code analysis
|
||||
* Copyright (C) 2007-2009 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 CSV_REPORT_H
|
||||
#define CSV_REPORT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include "report.h"
|
||||
|
||||
/**
|
||||
* @brief CSV text file report.
|
||||
* This report exports results as CSV (comma separated values). CSV files are
|
||||
* easy to import to many other programs.
|
||||
* @todo This class should be inherited from TxtReport?
|
||||
*/
|
||||
class CsvReport : public Report
|
||||
{
|
||||
public:
|
||||
CsvReport(const QString &filename, QObject * parent = 0);
|
||||
~CsvReport();
|
||||
|
||||
/**
|
||||
* @brief Create the report (file).
|
||||
* @return true if succeeded, false if file could not be created.
|
||||
*/
|
||||
virtual bool Create();
|
||||
|
||||
/**
|
||||
* @brief Write report header.
|
||||
*/
|
||||
virtual void WriteHeader();
|
||||
|
||||
/**
|
||||
* @brief Write report footer.
|
||||
*/
|
||||
virtual void WriteFooter();
|
||||
|
||||
/**
|
||||
* @brief Write error to report.
|
||||
*/
|
||||
virtual void WriteError(const QStringList &files, const QStringList &lines,
|
||||
const QString &id, const QString &severity,
|
||||
const QString &msg);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief Text stream writer for writing the report in text format.
|
||||
*/
|
||||
QTextStream mTxtWriter;
|
||||
};
|
||||
|
||||
#endif // CSV_REPORT_H
|
|
@ -45,6 +45,7 @@ HEADERS += mainwindow.h \
|
|||
txtreport.h \
|
||||
xmlreport.h \
|
||||
translationhandler.h \
|
||||
csvreport.h \
|
||||
../src/checkautovariables.h \
|
||||
../src/checkdangerousfunctions.h \
|
||||
../src/checkheaders.h \
|
||||
|
@ -85,6 +86,7 @@ SOURCES += main.cpp \
|
|||
txtreport.cpp \
|
||||
xmlreport.cpp \
|
||||
translationhandler.cpp \
|
||||
csvreport.cpp \
|
||||
../src/checkautovariables.cpp \
|
||||
../src/checkdangerousfunctions.cpp \
|
||||
../src/checkmemoryleak.cpp \
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "threadhandler.h"
|
||||
#include "fileviewdialog.h"
|
||||
#include "projectfile.h"
|
||||
#include "report.h"
|
||||
#include "../src/filelister.h"
|
||||
#include "../src/cppcheckexecutor.h"
|
||||
|
||||
|
@ -511,7 +512,7 @@ void MainWindow::ShowAuthors()
|
|||
void MainWindow::Save()
|
||||
{
|
||||
QString selectedFilter;
|
||||
QString filter(tr("XML files (*.xml);;Text files (*.txt)"));
|
||||
QString filter(tr("XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)"));
|
||||
QString selectedFile = QFileDialog::getSaveFileName(this,
|
||||
tr("Save the report file"),
|
||||
QString(),
|
||||
|
@ -520,22 +521,27 @@ void MainWindow::Save()
|
|||
|
||||
if (!selectedFile.isEmpty())
|
||||
{
|
||||
//Check if xml file type was selected
|
||||
bool xml = selectedFilter == tr("XML files (*.xml)");
|
||||
|
||||
//Force xml extension to the file
|
||||
if (xml && !selectedFile.endsWith(".xml", Qt::CaseInsensitive))
|
||||
Report::Type type;
|
||||
if (selectedFilter == tr("XML files (*.xml)"))
|
||||
{
|
||||
selectedFile += ".xml";
|
||||
type = Report::XML;
|
||||
if (!selectedFile.endsWith(".xml", Qt::CaseInsensitive))
|
||||
selectedFile += ".xml";
|
||||
}
|
||||
else if (selectedFilter == tr("Text files (*.txt)"))
|
||||
{
|
||||
type = Report::TXT;
|
||||
if (!selectedFile.endsWith(".txt", Qt::CaseInsensitive))
|
||||
selectedFile += ".txt";
|
||||
}
|
||||
else
|
||||
{
|
||||
type = Report::CSV;
|
||||
if (!selectedFile.endsWith(".csv", Qt::CaseInsensitive))
|
||||
selectedFile += ".csv";
|
||||
}
|
||||
|
||||
//Force .txt extension
|
||||
if (!xml && !selectedFile.endsWith(".txt", Qt::CaseInsensitive))
|
||||
{
|
||||
selectedFile += ".txt";
|
||||
}
|
||||
|
||||
mUI.mResults->Save(selectedFile, xml);
|
||||
mUI.mResults->Save(selectedFile, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,14 @@
|
|||
class Report : public QObject
|
||||
{
|
||||
public:
|
||||
|
||||
enum Type
|
||||
{
|
||||
TXT,
|
||||
XML,
|
||||
CSV,
|
||||
};
|
||||
|
||||
Report(const QString &filename, QObject * parent = 0);
|
||||
virtual ~Report();
|
||||
|
||||
|
|
|
@ -21,8 +21,10 @@
|
|||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include "resultsview.h"
|
||||
#include "report.h"
|
||||
#include "txtreport.h"
|
||||
#include "xmlreport.h"
|
||||
#include "csvreport.h"
|
||||
|
||||
ResultsView::ResultsView(QWidget * parent) :
|
||||
QWidget(parent),
|
||||
|
@ -129,7 +131,7 @@ void ResultsView::ExpandAllResults()
|
|||
mUI.mTree->expandAll();
|
||||
}
|
||||
|
||||
void ResultsView::Save(const QString &filename, bool xml)
|
||||
void ResultsView::Save(const QString &filename, Report::Type type)
|
||||
{
|
||||
if (!mErrorsFound)
|
||||
{
|
||||
|
@ -138,11 +140,25 @@ void ResultsView::Save(const QString &filename, bool xml)
|
|||
msgBox.exec();
|
||||
}
|
||||
|
||||
if (xml)
|
||||
Report *report = NULL;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
XmlReport report(filename);
|
||||
if (report.Create())
|
||||
mUI.mTree->SaveResults(&report);
|
||||
case Report::CSV:
|
||||
report = new CsvReport(filename, this);
|
||||
break;
|
||||
case Report::TXT:
|
||||
report = new TxtReport(filename, this);
|
||||
break;
|
||||
case Report::XML:
|
||||
report = new XmlReport(filename, this);
|
||||
break;
|
||||
}
|
||||
|
||||
if (report)
|
||||
{
|
||||
if (report->Create())
|
||||
mUI.mTree->SaveResults(report);
|
||||
else
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
|
@ -152,15 +168,9 @@ void ResultsView::Save(const QString &filename, bool xml)
|
|||
}
|
||||
else
|
||||
{
|
||||
TxtReport report(filename);
|
||||
if (report.Create())
|
||||
mUI.mTree->SaveResults(&report);
|
||||
else
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("Failed to save the report.");
|
||||
msgBox.exec();
|
||||
}
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("Failed to save the report.");
|
||||
msgBox.exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "../src/errorlogger.h"
|
||||
#include "resultstree.h"
|
||||
#include "common.h"
|
||||
#include "report.h"
|
||||
#include "ui_resultsview.h"
|
||||
|
||||
/**
|
||||
|
@ -60,9 +61,9 @@ public:
|
|||
* @brief Save results to a file
|
||||
*
|
||||
* @param filename Filename to save results to
|
||||
* @param xml should results be saved as xml (true) or txt (false)
|
||||
* @param type Type of the report.
|
||||
*/
|
||||
void Save(const QString &filename, bool xml);
|
||||
void Save(const QString &filename, Report::Type type);
|
||||
|
||||
/**
|
||||
* @brief Update tree settings
|
||||
|
|
Loading…
Reference in New Issue