Skip to content

Commit 58c21dd

Browse files
committed
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.
1 parent d4e6d42 commit 58c21dd

12 files changed

Lines changed: 374 additions & 173 deletions

gui/cppcheck_de.ts

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<source>Cppcheck - A tool for static C/C++ code analysis.</source>
1919
<translation type="unfinished"></translation>
2020
</message>
21-
<message>
21+
<message utf8="true">
2222
<location filename="about.ui" line="65"/>
2323
<source>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</source>
2424
<translation type="unfinished"></translation>
@@ -116,10 +116,10 @@ kate -l(line) (file)</source>
116116
<name>MainWindow</name>
117117
<message>
118118
<location filename="main.ui" line="26"/>
119-
<location filename="mainwindow.cpp" line="238"/>
120-
<location filename="mainwindow.cpp" line="456"/>
121-
<location filename="mainwindow.cpp" line="554"/>
122-
<location filename="mainwindow.cpp" line="572"/>
119+
<location filename="mainwindow.cpp" line="239"/>
120+
<location filename="mainwindow.cpp" line="458"/>
121+
<location filename="mainwindow.cpp" line="561"/>
122+
<location filename="mainwindow.cpp" line="579"/>
123123
<source>Cppcheck</source>
124124
<translation type="unfinished"></translation>
125125
</message>
@@ -284,59 +284,64 @@ kate -l(line) (file)</source>
284284
<translation type="unfinished"></translation>
285285
</message>
286286
<message>
287-
<location filename="mainwindow.cpp" line="201"/>
287+
<location filename="mainwindow.cpp" line="202"/>
288288
<source>Select files to check</source>
289289
<translation type="unfinished"></translation>
290290
</message>
291291
<message>
292-
<location filename="mainwindow.cpp" line="210"/>
292+
<location filename="mainwindow.cpp" line="211"/>
293293
<source>Select directory to check</source>
294294
<translation type="unfinished"></translation>
295295
</message>
296296
<message>
297-
<location filename="mainwindow.cpp" line="239"/>
297+
<location filename="mainwindow.cpp" line="240"/>
298298
<source>No suitable files found to check!</source>
299299
<translation type="unfinished"></translation>
300300
</message>
301301
<message>
302-
<location filename="mainwindow.cpp" line="452"/>
302+
<location filename="mainwindow.cpp" line="454"/>
303303
<source>Cannot exit while checking.
304304

305305
Stop the checking before exiting.</source>
306306
<translation type="unfinished"></translation>
307307
</message>
308308
<message>
309-
<location filename="mainwindow.cpp" line="498"/>
309+
<location filename="mainwindow.cpp" line="500"/>
310310
<source>License</source>
311311
<translation type="unfinished"></translation>
312312
</message>
313313
<message>
314-
<location filename="mainwindow.cpp" line="505"/>
314+
<location filename="mainwindow.cpp" line="507"/>
315315
<source>Authors</source>
316316
<translation type="unfinished"></translation>
317317
</message>
318318
<message>
319-
<location filename="mainwindow.cpp" line="513"/>
320-
<source>XML files (*.xml);;Text files (*.txt)</source>
319+
<location filename="mainwindow.cpp" line="515"/>
320+
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
321321
<translation type="unfinished"></translation>
322322
</message>
323323
<message>
324-
<location filename="mainwindow.cpp" line="515"/>
324+
<location filename="mainwindow.cpp" line="517"/>
325325
<source>Save the report file</source>
326326
<translation type="unfinished"></translation>
327327
</message>
328328
<message>
329-
<location filename="mainwindow.cpp" line="523"/>
329+
<location filename="mainwindow.cpp" line="525"/>
330330
<source>XML files (*.xml)</source>
331331
<translation type="unfinished"></translation>
332332
</message>
333333
<message>
334-
<location filename="mainwindow.cpp" line="556"/>
334+
<location filename="mainwindow.cpp" line="531"/>
335+
<source>Text files (*.txt)</source>
336+
<translation type="unfinished"></translation>
337+
</message>
338+
<message>
339+
<location filename="mainwindow.cpp" line="563"/>
335340
<source>Cppcheck - %1</source>
336341
<translation type="unfinished"></translation>
337342
</message>
338343
<message>
339-
<location filename="mainwindow.cpp" line="573"/>
344+
<location filename="mainwindow.cpp" line="580"/>
340345
<source>Failed to change the language:
341346

342347
%1
@@ -397,25 +402,25 @@ Stop the checking before exiting.</source>
397402
<name>ResultsTree</name>
398403
<message>
399404
<location filename="resultstree.cpp" line="39"/>
400-
<location filename="resultstree.cpp" line="754"/>
405+
<location filename="resultstree.cpp" line="755"/>
401406
<source>File</source>
402407
<translation type="unfinished"></translation>
403408
</message>
404409
<message>
405410
<location filename="resultstree.cpp" line="39"/>
406-
<location filename="resultstree.cpp" line="754"/>
411+
<location filename="resultstree.cpp" line="755"/>
407412
<source>Severity</source>
408413
<translation type="unfinished"></translation>
409414
</message>
410415
<message>
411416
<location filename="resultstree.cpp" line="39"/>
412-
<location filename="resultstree.cpp" line="754"/>
417+
<location filename="resultstree.cpp" line="755"/>
413418
<source>Line</source>
414419
<translation type="unfinished"></translation>
415420
</message>
416421
<message>
417422
<location filename="resultstree.cpp" line="39"/>
418-
<location filename="resultstree.cpp" line="754"/>
423+
<location filename="resultstree.cpp" line="755"/>
419424
<source>Message</source>
420425
<translation type="unfinished"></translation>
421426
</message>
@@ -453,41 +458,41 @@ Please check the application path and parameters are correct.</source>
453458
<translation type="unfinished"></translation>
454459
</message>
455460
<message>
456-
<location filename="resultstree.cpp" line="612"/>
461+
<location filename="resultstree.cpp" line="613"/>
457462
<source>all</source>
458463
<translation type="unfinished"></translation>
459464
</message>
460465
<message>
461-
<location filename="resultstree.cpp" line="616"/>
466+
<location filename="resultstree.cpp" line="617"/>
462467
<source>style</source>
463468
<translation type="unfinished"></translation>
464469
</message>
465470
<message>
466-
<location filename="resultstree.cpp" line="620"/>
471+
<location filename="resultstree.cpp" line="621"/>
467472
<source>security</source>
468473
<translation type="unfinished"></translation>
469474
</message>
470475
<message>
471-
<location filename="resultstree.cpp" line="624"/>
476+
<location filename="resultstree.cpp" line="625"/>
472477
<source>error</source>
473478
<translation type="unfinished"></translation>
474479
</message>
475480
</context>
476481
<context>
477482
<name>ResultsView</name>
478483
<message>
479-
<location filename="resultsview.cpp" line="77"/>
480-
<location filename="resultsview.cpp" line="89"/>
484+
<location filename="resultsview.cpp" line="79"/>
485+
<location filename="resultsview.cpp" line="91"/>
481486
<source>Cppcheck</source>
482487
<translation type="unfinished"></translation>
483488
</message>
484489
<message>
485-
<location filename="resultsview.cpp" line="78"/>
490+
<location filename="resultsview.cpp" line="80"/>
486491
<source>No errors found.</source>
487492
<translation type="unfinished"></translation>
488493
</message>
489494
<message>
490-
<location filename="resultsview.cpp" line="86"/>
495+
<location filename="resultsview.cpp" line="88"/>
491496
<source>Errors were found, but they are configured to be hidden.
492497
To toggle what kind of errors are shown, open view menu.</source>
493498
<translation type="unfinished"></translation>

gui/cppcheck_en.ts

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<source>Cppcheck - A tool for static C/C++ code analysis.</source>
1919
<translation>Cppcheck - A tool for static C/C++ code analysis.</translation>
2020
</message>
21-
<message>
21+
<message utf8="true">
2222
<location filename="about.ui" line="65"/>
2323
<source>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</source>
2424
<translation>Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.</translation>
@@ -129,10 +129,10 @@ kate -l(line) (file)</translation>
129129
<name>MainWindow</name>
130130
<message>
131131
<location filename="main.ui" line="26"/>
132-
<location filename="mainwindow.cpp" line="238"/>
133-
<location filename="mainwindow.cpp" line="456"/>
134-
<location filename="mainwindow.cpp" line="554"/>
135-
<location filename="mainwindow.cpp" line="572"/>
132+
<location filename="mainwindow.cpp" line="239"/>
133+
<location filename="mainwindow.cpp" line="458"/>
134+
<location filename="mainwindow.cpp" line="561"/>
135+
<location filename="mainwindow.cpp" line="579"/>
136136
<source>Cppcheck</source>
137137
<translation>Cppcheck</translation>
138138
</message>
@@ -297,22 +297,22 @@ kate -l(line) (file)</translation>
297297
<translation>&amp;Help</translation>
298298
</message>
299299
<message>
300-
<location filename="mainwindow.cpp" line="201"/>
300+
<location filename="mainwindow.cpp" line="202"/>
301301
<source>Select files to check</source>
302302
<translation>Select files to check</translation>
303303
</message>
304304
<message>
305-
<location filename="mainwindow.cpp" line="210"/>
305+
<location filename="mainwindow.cpp" line="211"/>
306306
<source>Select directory to check</source>
307307
<translation>Select directory to check</translation>
308308
</message>
309309
<message>
310-
<location filename="mainwindow.cpp" line="239"/>
310+
<location filename="mainwindow.cpp" line="240"/>
311311
<source>No suitable files found to check!</source>
312312
<translation>No suitable files found to check!</translation>
313313
</message>
314314
<message>
315-
<location filename="mainwindow.cpp" line="452"/>
315+
<location filename="mainwindow.cpp" line="454"/>
316316
<source>Cannot exit while checking.
317317

318318
Stop the checking before exiting.</source>
@@ -321,37 +321,46 @@ Stop the checking before exiting.</source>
321321
Stop the checking before exiting.</translation>
322322
</message>
323323
<message>
324-
<location filename="mainwindow.cpp" line="498"/>
324+
<location filename="mainwindow.cpp" line="500"/>
325325
<source>License</source>
326326
<translation>License</translation>
327327
</message>
328328
<message>
329-
<location filename="mainwindow.cpp" line="505"/>
329+
<location filename="mainwindow.cpp" line="507"/>
330330
<source>Authors</source>
331331
<translation>Authors</translation>
332332
</message>
333333
<message>
334-
<location filename="mainwindow.cpp" line="513"/>
334+
<location filename="mainwindow.cpp" line="515"/>
335+
<source>XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)</source>
336+
<translation type="unfinished"></translation>
337+
</message>
338+
<message>
335339
<source>XML files (*.xml);;Text files (*.txt)</source>
336-
<translation>XML files (*.xml);;Text files (*.txt)</translation>
340+
<translation type="obsolete">XML files (*.xml);;Text files (*.txt)</translation>
337341
</message>
338342
<message>
339-
<location filename="mainwindow.cpp" line="515"/>
343+
<location filename="mainwindow.cpp" line="517"/>
340344
<source>Save the report file</source>
341345
<translation>Save the report file</translation>
342346
</message>
343347
<message>
344-
<location filename="mainwindow.cpp" line="523"/>
348+
<location filename="mainwindow.cpp" line="525"/>
345349
<source>XML files (*.xml)</source>
346350
<translation>XML files (*.xml)</translation>
347351
</message>
348352
<message>
349-
<location filename="mainwindow.cpp" line="556"/>
353+
<location filename="mainwindow.cpp" line="531"/>
354+
<source>Text files (*.txt)</source>
355+
<translation type="unfinished"></translation>
356+
</message>
357+
<message>
358+
<location filename="mainwindow.cpp" line="563"/>
350359
<source>Cppcheck - %1</source>
351360
<translation>Cppcheck - %1</translation>
352361
</message>
353362
<message>
354-
<location filename="mainwindow.cpp" line="573"/>
363+
<location filename="mainwindow.cpp" line="580"/>
355364
<source>Failed to change the language:
356365

357366
%1
@@ -414,25 +423,25 @@ Stop the checking before exiting.</translation>
414423
<name>ResultsTree</name>
415424
<message>
416425
<location filename="resultstree.cpp" line="39"/>
417-
<location filename="resultstree.cpp" line="754"/>
426+
<location filename="resultstree.cpp" line="755"/>
418427
<source>File</source>
419428
<translation>File</translation>
420429
</message>
421430
<message>
422431
<location filename="resultstree.cpp" line="39"/>
423-
<location filename="resultstree.cpp" line="754"/>
432+
<location filename="resultstree.cpp" line="755"/>
424433
<source>Severity</source>
425434
<translation>Severity</translation>
426435
</message>
427436
<message>
428437
<location filename="resultstree.cpp" line="39"/>
429-
<location filename="resultstree.cpp" line="754"/>
438+
<location filename="resultstree.cpp" line="755"/>
430439
<source>Line</source>
431440
<translation>Line</translation>
432441
</message>
433442
<message>
434443
<location filename="resultstree.cpp" line="39"/>
435-
<location filename="resultstree.cpp" line="754"/>
444+
<location filename="resultstree.cpp" line="755"/>
436445
<source>Message</source>
437446
<translation>Message</translation>
438447
</message>
@@ -472,41 +481,41 @@ Please check the application path and parameters are correct.</source>
472481
Please check the application path and parameters are correct.</translation>
473482
</message>
474483
<message>
475-
<location filename="resultstree.cpp" line="612"/>
484+
<location filename="resultstree.cpp" line="613"/>
476485
<source>all</source>
477486
<translation>All</translation>
478487
</message>
479488
<message>
480-
<location filename="resultstree.cpp" line="616"/>
489+
<location filename="resultstree.cpp" line="617"/>
481490
<source>style</source>
482491
<translation>Style</translation>
483492
</message>
484493
<message>
485-
<location filename="resultstree.cpp" line="620"/>
494+
<location filename="resultstree.cpp" line="621"/>
486495
<source>security</source>
487496
<translation>Security</translation>
488497
</message>
489498
<message>
490-
<location filename="resultstree.cpp" line="624"/>
499+
<location filename="resultstree.cpp" line="625"/>
491500
<source>error</source>
492501
<translation>Error</translation>
493502
</message>
494503
</context>
495504
<context>
496505
<name>ResultsView</name>
497506
<message>
498-
<location filename="resultsview.cpp" line="77"/>
499-
<location filename="resultsview.cpp" line="89"/>
507+
<location filename="resultsview.cpp" line="79"/>
508+
<location filename="resultsview.cpp" line="91"/>
500509
<source>Cppcheck</source>
501510
<translation>Cppcheck</translation>
502511
</message>
503512
<message>
504-
<location filename="resultsview.cpp" line="78"/>
513+
<location filename="resultsview.cpp" line="80"/>
505514
<source>No errors found.</source>
506515
<translation>No errors found.</translation>
507516
</message>
508517
<message>
509-
<location filename="resultsview.cpp" line="86"/>
518+
<location filename="resultsview.cpp" line="88"/>
510519
<source>Errors were found, but they are configured to be hidden.
511520
To toggle what kind of errors are shown, open view menu.</source>
512521
<translation>Errors were found, but they are configured to be hidden.

0 commit comments

Comments
 (0)