diff --git a/build.bat b/build.bat index a0c19630e..9aa6b7d52 100644 --- a/build.bat +++ b/build.bat @@ -49,6 +49,7 @@ goto end pushd gui qmake -config %TARGET% HAVE_RULES=%HAVE_RULES% %MAKE% +lupdate -no-obsolete gui.pro lrelease gui.pro popd goto end diff --git a/gui/cppcheck_de.ts b/gui/cppcheck_de.ts index c51248712..465f4f770 100644 --- a/gui/cppcheck_de.ts +++ b/gui/cppcheck_de.ts @@ -181,12 +181,12 @@ Parameter: -l(line) (file) - - - - - - + + + + + + Cppcheck Cppcheck @@ -596,27 +596,27 @@ Do you want to proceed checking without using any of these project files? - + License Lizenz - + Authors Autoren - + XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv) XML-Dateien Version 2 (*.xml);;XML-Dateien Version 1 (*.xml);;Textdateien (*.txt);;CSV-Dateien (*.csv) - + Save the report file Speichert die Berichtdatei - + XML files (*.xml) XML-Dateien (*.xml) @@ -635,21 +635,21 @@ Dies wurde vermutlich durch einen Wechsel der Cppcheck-Version hervorgerufen. Bi Sie müssen die Projektdatei schließen, bevor Sie neue Dateien oder Verzeichnisse auswählen! - + Current results will be cleared. Opening a new XML file will clear current results.Do you want to proceed? - Aktuelle Ergebnisse werden gelöscht. + Aktuelle Ergebnisse werden gelöscht. Das Einlesen einer XML Datei löscht die aktuellen Ergebnisse. Fortfahren? - + Open the report file Berichtdatei öffnen - + Checking is running. Do you want to stop the checking and exit Cppcheck?. @@ -658,32 +658,32 @@ Do you want to stop the checking and exit Cppcheck?. Möchten Sie die Prüfung abbrechen und Cppcheck beenden? - + XML files version 1 (*.xml) XML-Dateien Version 1 (*.xml) - + XML files version 2 (*.xml) XML-Dateien Version 2 (*.xml) - + Text files (*.txt) Textdateien (*.txt) - + CSV files (*.csv) CSV-Dateien (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the user interface language: %1 @@ -696,34 +696,34 @@ The user interface language has been reset to English. Open the Preferences-dial Die Sprache wurde auf Englisch zurückgesetzt. Öffnen Sie den Einstellungen-Dialog um eine verfügbare Sprache auszuwählen. - - + + Project files (*.cppcheck);;All files(*.*) Projektdateien (*.cppcheck);;Alle Dateien(*.*) - + Select Project File Projektdatei auswählen - - + + Project: Projekt: - + Select Project Filename Projektnamen auswählen - + No project file loaded Keine Projektdatei geladen - + The project file %1 @@ -1111,53 +1111,53 @@ Bitte wählen Sie das Verzeichnis, in dem sich die Datei befindet. ResultsView - + %p% (%1 of %2 files checked) %p% (%1 von %2 Dateien geprüft) - - + + Cppcheck Cppcheck - + No errors found. Keine Fehler gefunden. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. Es wurden Fehler gefunden, aber sie sind so konfiguriert, ausgeblendet zu werden. Legen Sie unter dem Menü Ansicht fest, welche Art von Fehlern angezeigt werden sollen. - - - + + + Failed to read the report. Lesen des Berichts fehlgeschlagen. - + Summary Zusammenfassung - + Message Meldung - + No errors found, nothing to save. Keine Fehler gefunden, nichts zu speichern. - - + + Failed to save the report. Der Bericht konnte nicht speichern werden. diff --git a/gui/cppcheck_es.ts b/gui/cppcheck_es.ts index 43ca73bf5..f368f3da0 100644 --- a/gui/cppcheck_es.ts +++ b/gui/cppcheck_es.ts @@ -170,12 +170,12 @@ Parameters: -l(line) (file) - - - - - - + + + + + + Cppcheck Cppcheck @@ -574,17 +574,17 @@ This is probably because the settings were changed between the Cppcheck versions Selecciona una carpeta para comprobar - + XML files (*.xml) Ficheros XML(*.xml) - + Open the report file Abrir informe - + Checking is running. Do you want to stop the checking and exit Cppcheck?. @@ -593,22 +593,22 @@ Do you want to stop the checking and exit Cppcheck?. ¿Quieres parar la comprobación y salir del Cppcheck?. - + License Licencia - + Authors Autores - + XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Failed to change the user interface language: %1 @@ -617,7 +617,7 @@ The user interface language has been reset to English. Open the Preferences-dial - + Save the report file Guardar informe @@ -641,66 +641,66 @@ Do you want to proceed checking without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results.Do you want to proceed? - + XML files version 1 (*.xml) - + XML files version 2 (*.xml) - + Text files (*.txt) Ficheros de texto (*.txt) - + CSV files (*.csv) Ficheros CVS (*.cvs) - + Cppcheck - %1 Cppcheck - %1 - - + + Project files (*.cppcheck);;All files(*.*) Ficheros de proyecto (*.cppcheck;;Todos los ficheros (*.*) - + Select Project File Selecciona proyecto - - + + Project: Proyecto: - + Select Project Filename Selecciona el nombre del proyecto - + No project file loaded No hay ningún proyecto cargado - + The project file %1 @@ -1084,53 +1084,53 @@ Por favor selecciona la carpeta donde se encuentra. Resultados - + No errors found, nothing to save. No se han encontrado errores, nada que guardar. - - + + Failed to save the report. Error al guardar el informe. - + %p% (%1 of %2 files checked) - - + + Cppcheck Cppcheck - + No errors found. No se han encontrado errores. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. Se han encontrado errores, pero están configurados para que no se muestren. Para cambiar el tipo de comportamiento, abrir el menú vista. - - - + + + Failed to read the report. Error al leer el informe. - + Summary Resumen - + Message Mensaje diff --git a/gui/cppcheck_fi.ts b/gui/cppcheck_fi.ts index 7cf929441..a2e8d1abd 100644 --- a/gui/cppcheck_fi.ts +++ b/gui/cppcheck_fi.ts @@ -173,12 +173,12 @@ Parameters: -l(line) (file) - - - - - - + + + + + + Cppcheck Cppcheck @@ -584,28 +584,28 @@ Do you want to proceed checking without using any of these project files? - + License Lisenssi - + Authors Tekijät - + XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv) XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML-tiedostot (*.xml);;Tekstitiedostot (*.txt);;CSV-tiedostot (*.csv) - + Save the report file Tallenna raportti - + XML files (*.xml) XML-tiedostot (*xml) @@ -622,51 +622,51 @@ This is probably because the settings were changed between the Cppcheck versions - + Current results will be cleared. Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file - + Checking is running. Do you want to stop the checking and exit Cppcheck?. - + XML files version 1 (*.xml) - + XML files version 2 (*.xml) - + Text files (*.txt) Tekstitiedostot (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the user interface language: %1 @@ -675,34 +675,34 @@ The user interface language has been reset to English. Open the Preferences-dial - - + + Project files (*.cppcheck);;All files(*.*) - + Select Project File - - + + Project: - + Select Project Filename - + No project file loaded - + The project file %1 @@ -1082,53 +1082,53 @@ Please select the directory where file is located. ResultsView - + %p% (%1 of %2 files checked) - - + + Cppcheck Cppcheck - + No errors found. Virheitä ei löytynyt. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. Virheitä löytyi, mutta asetuksissa kyseiset virheet on määritelty piilotettavaksi. Määrittääksesi minkä tyyppisiä virheitä näytetään, avaa näkymä valikko. - - - + + + Failed to read the report. - + Summary - + Message - + No errors found, nothing to save. Virheitä ei löytynyt, ei mitään tallennettavaa. - - + + Failed to save the report. Raportin tallentaminen epäonnistui. diff --git a/gui/cppcheck_ja.ts b/gui/cppcheck_ja.ts index ce7cd5750..49057de59 100644 --- a/gui/cppcheck_ja.ts +++ b/gui/cppcheck_ja.ts @@ -170,12 +170,12 @@ Parameters: -l(line) (file) - - - - - - + + + + + + Cppcheck Cppcheck @@ -593,24 +593,24 @@ Do you want to proceed checking without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results.Do you want to proceed? - + XML files (*.xml) XML ファイル (*.xml) - + Open the report file レポートを開く - + Checking is running. Do you want to stop the checking and exit Cppcheck?. @@ -619,53 +619,53 @@ Do you want to stop the checking and exit Cppcheck?. 解析を停止してCppcheckを終了しますか?. - + License ライセンス - + Authors 作者 - + XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv) XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML ファイル (*.xml);;テキストファイル (*.txt);;CSV形式ファイル (*.csv) - + Save the report file レポートを保存 - + XML files version 1 (*.xml) XMLファイルのバージョン1 - + XML files version 2 (*.xml) XMLファイルのバージョン2 - + Text files (*.txt) テキストファイル (*.txt) - + CSV files (*.csv) CSV形式ファイル (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the user interface language: %1 @@ -674,34 +674,34 @@ The user interface language has been reset to English. Open the Preferences-dial - - + + Project files (*.cppcheck);;All files(*.*) プロジェクトファイル (*.cppcheck);;すべてのファイル(*.*) - + Select Project File プロジェクトファイルを選択 - - + + Project: プロジェクト: - + Select Project Filename プロジェクトファイル名を選択 - + No project file loaded プロジェクトファイルが読み込まれていません - + The project file %1 @@ -1086,52 +1086,52 @@ Please select the directory where file is located. 結果 - + No errors found, nothing to save. 警告/エラーが見つからなかったため、保存しません。 - - + + Failed to save the report. レポートの保存に失敗しました。 - + %p% (%1 of %2 files checked) - - + + Cppcheck Cppcheck - + No errors found. 警告/エラーは見つかりませんでした。 - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. 警告/エラーが見つかりましたが、非表示設定になっています。 - - - + + + Failed to read the report. レポートの読み込みに失敗. - + Summary 内容 - + Message メッセージ diff --git a/gui/cppcheck_nl.ts b/gui/cppcheck_nl.ts index 212187cf4..57fcd74f0 100644 --- a/gui/cppcheck_nl.ts +++ b/gui/cppcheck_nl.ts @@ -173,12 +173,12 @@ Parameters: -l(line) (file) - - - - - - + + + + + + Cppcheck Cppcheck @@ -584,28 +584,28 @@ Do you want to proceed checking without using any of these project files? - + License Licentie - + Authors Auteurs - + XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv) XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML bestanden (*.xml);;Tekst bestanden (*.txt);;CSV bestanden (*.csv) - + Save the report file Rapport opslaan - + XML files (*.xml) XML bestanden (*.xml) @@ -622,51 +622,51 @@ This is probably because the settings were changed between the Cppcheck versions - + Current results will be cleared. Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file - + Checking is running. Do you want to stop the checking and exit Cppcheck?. - + XML files version 1 (*.xml) - + XML files version 2 (*.xml) - + Text files (*.txt) Tekst bestanden (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the user interface language: %1 @@ -675,34 +675,34 @@ The user interface language has been reset to English. Open the Preferences-dial - - + + Project files (*.cppcheck);;All files(*.*) - + Select Project File - - + + Project: - + Select Project Filename - + No project file loaded - + The project file %1 @@ -1082,53 +1082,53 @@ Please select the directory where file is located. ResultsView - + %p% (%1 of %2 files checked) - - + + Cppcheck Cppcheck - + No errors found. Geen fouten gevonden. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. Fouten werden gevonden, maar volgens de configuratie zijn deze verborgen. Gebruik het uitzicht menu om te selecteren welke fouten getoond worden. - - - + + + Failed to read the report. - + Summary - + Message - + No errors found, nothing to save. Geen fouten gevonden; geen data om op te slaan. - - + + Failed to save the report. Kon het rapport niet opslaan. diff --git a/gui/cppcheck_ru.ts b/gui/cppcheck_ru.ts index caec493b7..e90866e21 100644 --- a/gui/cppcheck_ru.ts +++ b/gui/cppcheck_ru.ts @@ -173,12 +173,12 @@ Parameters: -l(line) (file) - - - - - - + + + + + + Cppcheck Cppcheck @@ -584,28 +584,28 @@ Do you want to proceed checking without using any of these project files? - + License Лицензия - + Authors Авторы - + XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv) XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Save the report file - + XML files (*.xml) @@ -622,51 +622,51 @@ This is probably because the settings were changed between the Cppcheck versions - + Current results will be cleared. Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file - + Checking is running. Do you want to stop the checking and exit Cppcheck?. - + XML files version 1 (*.xml) - + XML files version 2 (*.xml) - + Text files (*.txt) Текстовые файлы (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the user interface language: %1 @@ -675,34 +675,34 @@ The user interface language has been reset to English. Open the Preferences-dial - - + + Project files (*.cppcheck);;All files(*.*) - + Select Project File - - + + Project: - + Select Project Filename - + No project file loaded - + The project file %1 @@ -1080,52 +1080,52 @@ Please select the directory where file is located. ResultsView - + %p% (%1 of %2 files checked) - - + + Cppcheck Cppcheck - + No errors found. Ошибок не найдено. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. - - - + + + Failed to read the report. - + Summary - + Message - + No errors found, nothing to save. - - + + Failed to save the report. diff --git a/gui/cppcheck_sr.ts b/gui/cppcheck_sr.ts index 1ae019d6a..ede900e64 100644 --- a/gui/cppcheck_sr.ts +++ b/gui/cppcheck_sr.ts @@ -171,12 +171,12 @@ Parameters: -l(line) (file) - - - - - - + + + + + + Cppcheck Cppcheck @@ -582,27 +582,27 @@ Do you want to proceed checking without using any of these project files? - + License License - + Authors Authors - + XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv) XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Save the report file Save the report file - + XML files (*.xml) XML files (*.xml) @@ -619,51 +619,51 @@ This is probably because the settings were changed between the Cppcheck versions - + Current results will be cleared. Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file - + Checking is running. Do you want to stop the checking and exit Cppcheck?. - + XML files version 1 (*.xml) - + XML files version 2 (*.xml) - + Text files (*.txt) Text files (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the user interface language: %1 @@ -672,34 +672,34 @@ The user interface language has been reset to English. Open the Preferences-dial - - + + Project files (*.cppcheck);;All files(*.*) - + Select Project File - - + + Project: - + Select Project Filename - + No project file loaded - + The project file %1 @@ -1075,53 +1075,53 @@ Please select the directory where file is located. ResultsView - + %p% (%1 of %2 files checked) - - + + Cppcheck Cppcheck - + No errors found. No errors found. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. - - - + + + Failed to read the report. - + Summary - + Message - + No errors found, nothing to save. No errors found, nothing to save. - - + + Failed to save the report. Failed to save the report. diff --git a/gui/cppcheck_sv.ts b/gui/cppcheck_sv.ts index ac534d9f4..7139f12bb 100644 --- a/gui/cppcheck_sv.ts +++ b/gui/cppcheck_sv.ts @@ -183,12 +183,12 @@ Parametrar: -l(line) (file) - - - - - - + + + + + + Cppcheck Cppcheck @@ -595,28 +595,28 @@ Do you want to proceed checking without using any of these project files? - + License Licens - + Authors Utvecklare - + XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv) XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML filer version 2 (*.xml);;XML filer version 1 (*.xml);;Text filer (*.txt);;CSV filer (*.csv) - + Save the report file Spara rapport - + XML files (*.xml) XML filer (*.xml) @@ -635,19 +635,19 @@ En trolig orsak är att inställningarna ändrats för olika Cppcheck versioner. Du måste stänga projektfilen innan nya filer eller sökvägar kan väljas! - + Current results will be cleared. Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file Öppna rapportfilen - + Checking is running. Do you want to stop the checking and exit Cppcheck?. @@ -656,32 +656,32 @@ Do you want to stop the checking and exit Cppcheck?. Vill du stoppa analysen och avsluta Cppcheck? - + XML files version 1 (*.xml) XML filer version 1 (*.xml) - + XML files version 2 (*.xml) XML filer version 2 (*.xml) - + Text files (*.txt) Text filer (*.txt) - + CSV files (*.csv) CSV filer (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the user interface language: %1 @@ -694,34 +694,34 @@ The user interface language has been reset to English. Open the Preferences-dial Språket har nollställts till Engelska. Öppna Preferences och välj något av de tillgängliga språken. - - + + Project files (*.cppcheck);;All files(*.*) Projektfiler (*.cppcheck);;Alla filer(*.*) - + Select Project File Välj projektfil - - + + Project: Projekt: - + Select Project Filename Välj Projektfil - + No project file loaded Inget projekt laddat - + The project file %1 @@ -1103,53 +1103,53 @@ Välj mappen där filen finns. ResultsView - + %p% (%1 of %2 files checked) - - + + Cppcheck Cppcheck - + No errors found. Inga fel hittades. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. Fel hittades, men de visas ej. För att ställa in vilka fel som skall visas använd visa menyn. - - - + + + Failed to read the report. Misslyckades att läsa rapporten. - + Summary Sammanfattning - + Message Meddelande - + No errors found, nothing to save. Inga fel hittades, ingenting att spara. - - + + Failed to save the report. Misslyckades med att spara rapporten. diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 6de89ecab..558958522 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -301,7 +301,7 @@ void MainWindow::DoCheckFiles(const QStringList &files) pathList.AddExcludeList(mProject->GetProjectFile()->GetExcludedPaths()); QStringList fileNames = pathList.GetFileList(); - mUI.mResults->Clear(); + mUI.mResults->Clear(true); mThread->ClearFiles(); if (fileNames.isEmpty()) { @@ -586,6 +586,9 @@ void MainWindow::ReCheck() if (files.empty()) return; + // Clear details, statistics and progress + mUI.mResults->Clear(false); + // Clear results for changed files for (int i = 0; i < files.size(); ++i) mUI.mResults->Clear(files[i]); @@ -601,7 +604,7 @@ void MainWindow::ReCheck() void MainWindow::ClearResults() { - mUI.mResults->Clear(); + mUI.mResults->Clear(true); mUI.mActionClearResults->setEnabled(false); mUI.mActionSave->setEnabled(false); } @@ -634,7 +637,7 @@ void MainWindow::OpenXML() &selectedFilter); if (!selectedFile.isEmpty()) { - mUI.mResults->Clear(); + mUI.mResults->Clear(true); mUI.mResults->ReadErrorsXml(selectedFile); } } diff --git a/gui/resultsview.cpp b/gui/resultsview.cpp index dbf9e2a98..7a52ba192 100644 --- a/gui/resultsview.cpp +++ b/gui/resultsview.cpp @@ -67,11 +67,15 @@ ResultsView::~ResultsView() //dtor } -void ResultsView::Clear() +void ResultsView::Clear(bool results) { - mUI.mTree->Clear(); + if (results) { + mUI.mTree->Clear(); + mErrorsFound = false; + } + mUI.mDetails->setText(""); - mErrorsFound = false; + mStatistics->Clear(); //Clear the progressbar @@ -83,14 +87,13 @@ void ResultsView::Clear() void ResultsView::Clear(const QString &filename) { mUI.mTree->Clear(filename); - mUI.mDetails->setText(""); - mErrorsFound = false; - mStatistics->Clear(); - // Clear the progressbar - mUI.mProgress->setMaximum(PROGRESS_MAX); - mUI.mProgress->setValue(0); - mUI.mProgress->setFormat("%p%"); + /** + * @todo Optimize this.. It is inefficient to check this every time. + */ + // If the results list got empty.. + if (!mUI.mTree->HasResults()) + mErrorsFound = false; } void ResultsView::Progress(int value, const QString& description) diff --git a/gui/resultsview.h b/gui/resultsview.h index 29aa1c03f..f243f5aaa 100644 --- a/gui/resultsview.h +++ b/gui/resultsview.h @@ -59,13 +59,13 @@ public: void ShowResults(ShowTypes::ShowType type, bool show); /** - * @brief Clear results - * - */ - void Clear(); + * @brief Clear results and statistics and reset progressinfo. + * @param results Remove all the results from view? + */ + void Clear(bool results); /** - * @brief Clear results for a specific file + * @brief Remove a file from the results. */ void Clear(const QString &filename);