diff --git a/gui/aboutdialog.cpp b/gui/aboutdialog.cpp index 388724a1e..4ced0614a 100644 --- a/gui/aboutdialog.cpp +++ b/gui/aboutdialog.cpp @@ -18,22 +18,30 @@ #include "aboutdialog.h" +#include "ui_about.h" + #include #include AboutDialog::AboutDialog(const QString &version, const QString &extraVersion, QWidget *parent) : QDialog(parent) + , mUI(new Ui::About) { - mUI.setupUi(this); + mUI->setupUi(this); QString fmtVersion(version); if (!extraVersion.isEmpty()) { fmtVersion += " (" + extraVersion + ")"; } - mUI.mVersion->setText(mUI.mVersion->text().arg(fmtVersion)); + mUI->mVersion->setText(mUI->mVersion->text().arg(fmtVersion)); QString date = __DATE__; - mUI.mCopyright->setText(mUI.mCopyright->text().arg(date.right(4))); + mUI->mCopyright->setText(mUI->mCopyright->text().arg(date.right(4))); QString url = "https://cppcheck.sourceforge.io/"; - mUI.mHomepage->setText(mUI.mHomepage->text().arg(url)); - connect(mUI.mButtons, &QDialogButtonBox::accepted, this, &AboutDialog::accept); + mUI->mHomepage->setText(mUI->mHomepage->text().arg(url)); + connect(mUI->mButtons, &QDialogButtonBox::accepted, this, &AboutDialog::accept); +} + +AboutDialog::~AboutDialog() +{ + delete mUI; } diff --git a/gui/aboutdialog.h b/gui/aboutdialog.h index d15d4c9fc..f16d3987a 100644 --- a/gui/aboutdialog.h +++ b/gui/aboutdialog.h @@ -19,12 +19,13 @@ #ifndef ABOUT_DIALOG_H #define ABOUT_DIALOG_H -#include "ui_about.h" - #include #include class QWidget; +namespace Ui { + class About; +} /// @addtogroup GUI /// @{ @@ -40,8 +41,10 @@ public: const QString &extraVersion, QWidget *parent = nullptr); + ~AboutDialog() override; + private: - Ui::About mUI; + Ui::About* mUI; }; /// @} #endif // ABOUT_DIALOG_H diff --git a/gui/applicationdialog.cpp b/gui/applicationdialog.cpp index e97e71fc5..fe48dd828 100644 --- a/gui/applicationdialog.cpp +++ b/gui/applicationdialog.cpp @@ -21,6 +21,8 @@ #include "application.h" #include "common.h" +#include "ui_applicationdialog.h" + #include #include #include @@ -31,16 +33,17 @@ ApplicationDialog::ApplicationDialog(const QString &title, Application &app, QWidget *parent) : QDialog(parent), + mUI(new Ui::ApplicationDialog), mApplication(app) { - mUI.setupUi(this); + mUI->setupUi(this); - connect(mUI.mButtonBrowse, &QPushButton::clicked, this, &ApplicationDialog::browse); - connect(mUI.mButtons, &QDialogButtonBox::accepted, this, &ApplicationDialog::ok); - connect(mUI.mButtons, &QDialogButtonBox::rejected, this, &ApplicationDialog::reject); - mUI.mPath->setText(app.getPath()); - mUI.mName->setText(app.getName()); - mUI.mParameters->setText(app.getParameters()); + connect(mUI->mButtonBrowse, &QPushButton::clicked, this, &ApplicationDialog::browse); + connect(mUI->mButtons, &QDialogButtonBox::accepted, this, &ApplicationDialog::ok); + connect(mUI->mButtons, &QDialogButtonBox::rejected, this, &ApplicationDialog::reject); + mUI->mPath->setText(app.getPath()); + mUI->mName->setText(app.getName()); + mUI->mParameters->setText(app.getParameters()); setWindowTitle(title); adjustSize(); } @@ -48,7 +51,7 @@ ApplicationDialog::ApplicationDialog(const QString &title, ApplicationDialog::~ApplicationDialog() { - //dtor + delete mUI; } void ApplicationDialog::browse() @@ -67,13 +70,13 @@ void ApplicationDialog::browse() if (!selectedFile.isEmpty()) { setPath(SETTINGS_LAST_APP_PATH, selectedFile); QString path(QDir::toNativeSeparators(selectedFile)); - mUI.mPath->setText(path); + mUI->mPath->setText(path); } } void ApplicationDialog::ok() { - if (mUI.mName->text().isEmpty() || mUI.mPath->text().isEmpty()) { + if (mUI->mName->text().isEmpty() || mUI->mPath->text().isEmpty()) { QMessageBox msg(QMessageBox::Warning, tr("Cppcheck"), tr("You must specify a name, a path and optionally parameters for the application!"), @@ -85,9 +88,9 @@ void ApplicationDialog::ok() reject(); } else { // Convert possible native (Windows) path to internal presentation format - mApplication.setName(mUI.mName->text()); - mApplication.setPath(QDir::fromNativeSeparators(mUI.mPath->text())); - mApplication.setParameters(mUI.mParameters->text()); + mApplication.setName(mUI->mName->text()); + mApplication.setPath(QDir::fromNativeSeparators(mUI->mPath->text())); + mApplication.setParameters(mUI->mParameters->text()); accept(); } diff --git a/gui/applicationdialog.h b/gui/applicationdialog.h index e6d55018e..3c6fd873f 100644 --- a/gui/applicationdialog.h +++ b/gui/applicationdialog.h @@ -19,13 +19,14 @@ #ifndef APPLICATIONDIALOG_H #define APPLICATIONDIALOG_H -#include "ui_application.h" - #include #include class QWidget; class Application; +namespace Ui { + class ApplicationDialog; +} /// @addtogroup GUI /// @{ @@ -67,7 +68,7 @@ protected: * @brief UI from the Qt designer * */ - Ui::ApplicationDialog mUI; + Ui::ApplicationDialog* mUI; private: diff --git a/gui/application.ui b/gui/applicationdialog.ui similarity index 100% rename from gui/application.ui rename to gui/applicationdialog.ui diff --git a/gui/cppcheck_de.ts b/gui/cppcheck_de.ts index c5534112b..735bbfd48 100644 --- a/gui/cppcheck_de.ts +++ b/gui/cppcheck_de.ts @@ -62,12 +62,12 @@ der GNU General Public License Version 3 lizenziert ApplicationDialog - + Add an application Anwendung hinzufügen - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -93,42 +93,42 @@ Parameter: -l(line) (file) - + &Name: &Name: - + &Executable: &Ausführbare Datei: - + &Parameters: &Parameter: - + Browse Suchen - + Executable files (*.exe);;All files(*.*) Ausführbare Dateien (*.exe);;Alle Dateien(*.*) - + Select viewer application Anzeigeanwendung auswählen - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! Sie müssen einen Namen, einen Pfad und ggf. Parameter für die Anwendung angeben! @@ -136,18 +136,18 @@ Parameter: -l(line) (file) FileViewDialog - + Could not find the file: %1 Konnte die Datei nicht finden: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 Konnte die Datei nicht lesen: %1 @@ -467,18 +467,18 @@ Parameter: -l(line) (file) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -639,8 +639,8 @@ Parameter: -l(line) (file) Zeige &versteckte - - + + Information Information @@ -991,18 +991,18 @@ Parameter: -l(line) (file) &Hilfe - - + + Quick Filter: Schnellfilter: - + Select configuration Konfiguration wählen - + Found project file: %1 Do you want to load this project file instead? @@ -1011,65 +1011,65 @@ Do you want to load this project file instead? Möchten Sie stattdessen diese öffnen? - + File not found Datei nicht gefunden - + Bad XML Fehlerhaftes XML - + Missing attribute Fehlendes Attribut - + Bad attribute value Falscher Attributwert - + Duplicate platform type Plattformtyp doppelt - + Platform type redefined Plattformtyp neu definiert - + Failed to load the selected library '%1'. %2 Laden der ausgewählten Bibliothek '%1' schlug fehl. %2 - + License Lizenz - + Authors Autoren - + Save the report file Speichert die Berichtdatei - - + + XML files (*.xml) XML-Dateien (*.xml) - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -1078,39 +1078,39 @@ This is probably because the settings were changed between the Cppcheck versions Dies wurde vermutlich durch einen Wechsel der Cppcheck-Version hervorgerufen. Bitte prüfen (und korrigieren) Sie die Einstellungen, andernfalls könnte die Editor-Anwendung nicht korrekt starten. - + You must close the project file before selecting new files or directories! Sie müssen die Projektdatei schließen, bevor Sie neue Dateien oder Verzeichnisse auswählen! - + The library '%1' contains unknown elements: %2 Die Bibliothek '%1' enthält unbekannte Elemente: %2 - + Unsupported format Nicht unterstütztes Format - + Unknown element Unbekanntes Element - + Unknown issue Unbekannter Fehler - + Error Fehler - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. Laden von %1 fehlgeschlagen. Ihre Cppcheck-Installation ist defekt. Sie können --data-dir=<Verzeichnis> als Kommandozeilenparameter verwenden, um anzugeben, wo die Datei sich befindet. Bitte beachten Sie, dass --data-dir in Installationsroutinen genutzt werden soll, und die GUI bei dessen Nutzung nicht startet, sondern die Einstellungen konfiguriert. @@ -1123,17 +1123,17 @@ Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file Berichtdatei öffnen - + Text files (*.txt) Textdateien (*.txt) - + CSV files (*.csv) CSV-Dateien (*.csv) @@ -1142,65 +1142,65 @@ Opening a new XML file will clear current results.Do you want to proceed?Cppcheck - %1 - + Project files (*.cppcheck);;All files(*.*) Projektdateien (*.cppcheck);;Alle Dateien(*.*) - + Select Project File Projektdatei auswählen - - - - + + + + Project: Projekt: - + No suitable files found to analyze! Keine passenden Dateien für Analyse gefunden! - + C/C++ Source C/C++-Quellcode - + Compile database Compilerdatenbank - + Visual Studio Visual Studio - + Borland C++ Builder 6 Borland C++-Builder 6 - + Select files to analyze Dateien für Analyse auswählen - + Select directory to analyze Verzeichnis für Analyse auswählen - + Select the configuration that will be analyzed Zu analysierende Konfiguration auswählen - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? @@ -1209,7 +1209,7 @@ Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1220,7 +1220,7 @@ Eine neue XML-Datei zu öffnen wird die aktuellen Ergebnisse löschen Möchten sie fortfahren? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? @@ -1229,42 +1229,42 @@ Do you want to stop the analysis and exit Cppcheck? Wollen sie die Analyse abbrechen und Cppcheck beenden? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML-Dateien (*.xml);;Textdateien (*.txt);;CSV-Dateien (*.csv) - + Build dir '%1' does not exist, create it? Erstellungsverzeichnis '%1' existiert nicht. Erstellen? - + To check the project using addons, you need a build directory. - + Failed to import '%1', analysis is stopped Import von '%1' fehlgeschlagen; Analyse wurde abgebrochen. - + Project files (*.cppcheck) Projektdateien (*.cppcheck) - + Select Project Filename Projektnamen auswählen - + No project file loaded Keine Projektdatei geladen - + The project file %1 @@ -1386,27 +1386,27 @@ Options: ProjectFile - + Project File Projektdatei - + Paths and Defines Pfade und Definitionen - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Importiere Projekt (Visual Studio / Compile-Datenbank / Borland C++-Builder 6) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Definitionen müssen mit einem Semikolon getrennt werden. Beispiel: DEF1;DEF2=5;DEF3=int - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. Hinweis: Legen Sie eigene .cfg-Dateien in den Ordner der Projektdatei. Dann sollten sie oben sichtbar werden. @@ -1415,94 +1415,94 @@ Options: Addons und Werkzeuge - + MISRA C 2012 MISRA C 2012 - + MISRA rule texts MISRA-Regeltexte - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> <html><head/><body><p>Text aus Anhang A &quot;Summary of guidelines&quot; aus der MISRA-C-2012-PDF in eine Textdatei einfügen.</p></body></html> - + ... ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> <html><head/><body><p>Sie haben die Auswahl:</p><p> * Alle Debug- und Release-Konfigurationen analysieren</p><p> * Nur die erste passende Debug-Konfiguration analysieren</p><p><br/></p></body></html> - - + + Browse... Durchsuchen... - + Analyze all Visual Studio configurations Alle Visual-Studio-Konfigurationen analysieren - + Selected VS Configurations - + Paths: Pfade: - - + + Add... Hinzufügen... - - - + + + Edit Bearbeiten - - - - + + + + Remove Entfernen - + Undefines: Un-Definitionen: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 Un-Definitionen müssen Semikolon-getrennt sein. Beispiel: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: Includepfade: - + Up Auf - + Down Ab @@ -1511,38 +1511,38 @@ Options: Prüfung - + Platform Plattform - - + + Analysis Analyse - + This is a workfolder that Cppcheck will use for various purposes. - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. @@ -1551,38 +1551,38 @@ Options: Prüfe Code in Headern (langsamere Analyse, mehr Ergebnisse) - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) Prüfe Code in ungenutzten Templates (langsamere und weniger genaue Analyse) - + Max CTU depth Maximale CTU-Tiefe - + Max recursion in template instantiation - + Warning options Warnoptionen - + Root path: Wurzelverzeichnis: - + Filepaths in warnings will be relative to this path - + Warning tags (separated by semicolon) Warnungs-Tags (Semikolon-getrennt) @@ -1595,32 +1595,32 @@ Options: Hinweis: Addons setzen voraus, dass <a href="https://www.python.org/">Python</a> installiert ist. - + External tools Externe Werkzeuge - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) Cppcheck-Arbeitsverzeichnis (Vollständige Programmanalyse, inkrementelle Analyse, Statistiken, etc.) - + Types and Functions - + Libraries Bibliotheken - + Parser - + Cppcheck (built in) @@ -1629,93 +1629,93 @@ Options: Clang - + Check that each class has a safe public interface - + Limit analysis - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + Suppressions Fehlerunterdrückungen - + Add Hinzufügen - - + + Addons Add-Ons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 Y2038 - + Thread safety Threadsicherheit - + Coding standards Programmierstandards - + CERT CERT - + Clang analyzer Clang-Analyzer - + Clang-tidy Clang-Tidy - + Defines: Definitionen: @@ -1723,82 +1723,82 @@ Options: ProjectFileDialog - + Project file: %1 Projektdatei: %1 - + Select Cppcheck build dir Wähle Cppcheck-Erstellungsverzeichnis - + Select include directory Wähle Include-Verzeichnisse - + Select a directory to check Wähle zu prüfendes Verzeichnis - + (no rule texts file) (keine Regeltexte) - + Clang-tidy (not found) Clang-tidy (nicht gefunden) - + Visual Studio Visual Studio - + Compile database Compilerdatenbank - + Borland C++ Builder 6 Borland C++-Builder 6 - + Import Project Projekt importieren - + Select directory to ignore Wähle zu ignorierendes Verzeichnis - + Source files - + All files - + Exclude file - + Select MISRA rule texts file Wähle MISRA-Regeltext-Datei - + MISRA rule texts file (%1) MISRA-Regeltext-Datei @@ -1850,7 +1850,7 @@ Options: - + (Not found) (nicht gefunden) @@ -2213,76 +2213,76 @@ Bitte überprüfen Sie ob der Pfad und die Parameter der Anwendung richtig einge ResultsView - + Print Report Bericht drucken - + No errors found, nothing to print. Keine Funde, nichts zu drucken. - + %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 Arten von Fehlern angezeigt werden sollen. - - + + Failed to read the report. Lesen des Berichts fehlgeschlagen. - + XML format version 1 is no longer supported. XML-Format-Version 1 wird nicht länger unterstützt. - + First included by Zuerst inkludiert von - + Id Id - + Bug hunting analysis is incomplete - + Clear Log Protokoll leeren - + Copy this Log entry Diesen Protokolleintrag kopieren - + Copy complete Log Gesamtes Protokoll kopieren @@ -2291,8 +2291,8 @@ Legen Sie unter dem Menü Ansicht fest, welche Arten von Fehlern angezeigt werde Keine Fehler gefunden, nichts zu speichern. - + Failed to save the report. Der Bericht konnte nicht speichern werden. @@ -2561,47 +2561,47 @@ Legen Sie unter dem Menü Ansicht fest, welche Arten von Fehlern angezeigt werde SettingsDialog - + N/A kA - + The executable file "%1" is not available - + Add a new application Neue Anwendung hinzufügen - + Modify an application Anwendung ändern - + [Default] [Standard] - + [Default] [Standard] - + Select python binary Python-Binärdatei auswählen - + Select MISRA File Wähle MISRA-Datei - + Select clang path Clang-Verzeichnis auswählen @@ -2609,253 +2609,253 @@ Legen Sie unter dem Menü Ansicht fest, welche Arten von Fehlern angezeigt werde StatsDialog - - - - + + + + Statistics Statistik - - + + Project Projekt - + Project: Projekt: - + Paths: Pfade: - + Include paths: Include-Pfade: - + Defines: Definitionen: - + Undefines: Un-Definitionen: - - + + Previous Scan Vorherige Prüfung - + Path Selected: Ausgewählte Pfade: - + Number of Files Scanned: Anzahl der geprüften Dateien: - + Scan Duration: Prüfungsdauer: - + Errors: Fehler: - + Warnings: Warnungen: - + Stylistic warnings: Stilwarnungen: - + Portability warnings: Portabilitätswarnungen: - + Performance issues: Performance-Probleme: - + Information messages: Informationsmeldungen: - + History Verlauf - + File: Datei: - + Copy to Clipboard In die Zwischenablage kopieren - + Pdf Export PDF-Export - + 1 day 1 Tag - + %1 days %1 Tage - + 1 hour 1 Stunde - + %1 hours %1 Stunden - + 1 minute 1 Minute - + %1 minutes %1 Minuten - + 1 second 1 Sekunde - + %1 seconds %1 Sekunden - + 0.%1 seconds 0,%1 Sekunden - + and und - + Export PDF Exportiere PDF - + Project Settings Projekteinstellungen - + Paths Pfade - + Include paths Include-Pfade - + Defines Definitionen - + Undefines Un-Definitionen - + Path selected Gewählte Pfade - + Number of files scanned Anzahl geprüfter Dateien - + Scan duration Prüfungsdauer - - + + Errors Fehler - + File: Datei: - + No cppcheck build dir Kein Cppcheck-Analyseverzeichnis - - + + Warnings Warnungen - - + + Style warnings Stilwarnungen - - + + Portability warnings Portabilitätswarnungen - - + + Performance warnings Performance-Warnungen - - + + Information messages Informationsmeldungen diff --git a/gui/cppcheck_es.ts b/gui/cppcheck_es.ts index 2e6eb14e7..abb0ac9af 100644 --- a/gui/cppcheck_es.ts +++ b/gui/cppcheck_es.ts @@ -56,12 +56,12 @@ of the GNU General Public License version 3 ApplicationDialog - + Add an application Añade una aplicación - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -76,42 +76,42 @@ Parameters: -l(line) (file) - + &Name: &Nombre: - + &Executable: &Ejecutable: - + &Parameters: &Parámetros: - + Browse Buscar - + Executable files (*.exe);;All files(*.*) Archivos ejecutables (*.exe);;Todos los archivos(*.*) - + Select viewer application Selecciona la aplicación para visualizar - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! ¡Debes especificar el nombre, la ruta y opcionalmente los parámetros para la aplicación! @@ -119,18 +119,18 @@ Parameters: -l(line) (file) FileViewDialog - + Could not find the file: %1 No se ha encontrado el fichero: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 No se ha podido leer el fichero: %1 @@ -469,18 +469,18 @@ Parameters: -l(line) (file) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -659,8 +659,8 @@ Parameters: -l(line) (file) Mostrar S&cratchpad... - - + + Information Información @@ -1062,7 +1062,7 @@ Parameters: -l(line) (file) Mostrar &ocultos - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -1073,7 +1073,7 @@ This is probably because the settings were changed between the Cppcheck versions ¡No se han encontrado ficheros para comprobar! - + You must close the project file before selecting new files or directories! ¡Tienes que cerrar el proyecto antes de seleccionar nuevos ficheros o carpetas! @@ -1082,49 +1082,49 @@ This is probably because the settings were changed between the Cppcheck versions Selecciona una carpeta para comprobar - + Select configuration - + File not found Archivo no encontrado - + Bad XML XML malformado - + Missing attribute Falta el atributo - + Bad attribute value - + Unsupported format Formato no soportado - + Failed to load the selected library '%1'. %2 - - + + XML files (*.xml) Archivos XML (*.xml) - + Open the report file Abrir informe @@ -1137,12 +1137,12 @@ Do you want to stop the checking and exit Cppcheck? ¿Quieres parar la comprobación y salir del Cppcheck? - + License Licencia - + Authors Autores @@ -1151,13 +1151,13 @@ Do you want to stop the checking and exit Cppcheck? Archivos XML versión 2 (*.xml);;Archivos XML versión 1 (*.xml);;Archivos de texto (*.txt);;Archivos CSV (*.csv) - + Save the report file Guardar informe - - + + Quick Filter: Filtro rápido: @@ -1166,7 +1166,7 @@ Do you want to stop the checking and exit Cppcheck? Selecciona los archivos a comprobar - + Found project file: %1 Do you want to load this project file instead? @@ -1183,39 +1183,39 @@ Do you want to proceed checking without using any of these project files? - + The library '%1' contains unknown elements: %2 La biblioteca '%1' contiene elementos deconocidos: %2 - + Duplicate platform type - + Platform type redefined - + Unknown element - + Unknown issue - + Error Error - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. @@ -1236,12 +1236,12 @@ Abrir un nuevo fichero XML eliminará los resultados actuales. ¿Desea continuar Archivos XML versión 2 (*.xml) - + Text files (*.txt) Ficheros de texto (*.txt) - + CSV files (*.csv) Ficheros CVS (*.cvs) @@ -1250,72 +1250,72 @@ Abrir un nuevo fichero XML eliminará los resultados actuales. ¿Desea continuar Cppcheck - %1 - + Project files (*.cppcheck);;All files(*.*) Ficheros de proyecto (*.cppcheck;;Todos los ficheros (*.*) - + Select Project File Selecciona el archivo de proyecto - - - - + + + + Project: Proyecto: - + No suitable files found to analyze! - + C/C++ Source - + Compile database - + Visual Studio - + Borland C++ Builder 6 - + Select files to analyze - + Select directory to analyze - + Select the configuration that will be analyzed - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1323,49 +1323,49 @@ Do you want to proceed? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Build dir '%1' does not exist, create it? - + To check the project using addons, you need a build directory. - + Failed to import '%1', analysis is stopped - + Project files (*.cppcheck) - + Select Project Filename Selecciona el nombre del proyecto - + No project file loaded No hay ningún proyecto cargado - + The project file %1 @@ -1505,7 +1505,7 @@ Options: ProjectFile - + Project File Archivo de proyecto @@ -1514,18 +1514,18 @@ Options: Proyecto - + Paths and Defines - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' @@ -1540,161 +1540,161 @@ Options: Bibliotecas: - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. Nota: Ponga sus propios archivos .cfg en la misma carpeta que el proyecto. Debería verlos arriba. - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + MISRA C 2012 - + MISRA rule texts - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> - + ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> - - + + Browse... - + Analyze all Visual Studio configurations - + Selected VS Configurations - + Paths: Rutas: - - + + Add... Añadir... - - - + + + Edit Editar - - - - + + + + Remove Eliminar - + Undefines: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: - + Types and Functions - - + + Analysis - + This is a workfolder that Cppcheck will use for various purposes. - + Parser - + Cppcheck (built in) - + Check that each class has a safe public interface - + Limit analysis - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) - + Max CTU depth - + External tools @@ -1707,77 +1707,77 @@ Options: Incluir los directorios: - + Up Subir - + Down Bajar - + Platform - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + Max recursion in template instantiation - + Warning options - + Root path: - + Filepaths in warnings will be relative to this path - + Warning tags (separated by semicolon) - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) - + Libraries @@ -1786,7 +1786,7 @@ Options: Excluir - + Suppressions Supresiones @@ -1795,53 +1795,53 @@ Options: Lista de supresiones: - + Add Añadir - - + + Addons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 - + Thread safety - + Coding standards - + CERT - + Clang analyzer - + Clang-tidy - + Defines: Definiciones: @@ -1849,72 +1849,72 @@ Options: ProjectFileDialog - + Project file: %1 Archivo de proyecto: %1 - + Select Cppcheck build dir - + Select include directory Selecciona una carpeta para incluir - + Select a directory to check Selecciona la carpeta a comprobar - + (no rule texts file) - + Clang-tidy (not found) - + Visual Studio - + Compile database - + Borland C++ Builder 6 - + Import Project - + Select directory to ignore Selecciona la carpeta a ignorar - + Source files - + All files - + Exclude file @@ -1923,12 +1923,12 @@ Options: Añadir supresión - + Select MISRA rule texts file - + MISRA rule texts file (%1) @@ -1980,7 +1980,7 @@ Options: - + (Not found) @@ -2419,52 +2419,52 @@ Por favor selecciona la carpeta donde se encuentra. No se han encontrado errores, nada que guardar. - + Failed to save the report. Error al guardar el informe. - + Print Report Imprimir informe - + No errors found, nothing to print. No se encontraron errores, nada que imprimir. - + %p% (%1 of %2 files checked) %p% (%1 of %2 archivos comprobados) - - + + 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, abra el menú Ver. - - + + Failed to read the report. Error al leer el informe. - + XML format version 1 is no longer supported. @@ -2477,32 +2477,32 @@ Para cambiar el tipo de comportamiento, abra el menú Ver. Mensaje - + First included by - + Id Id - + Bug hunting analysis is incomplete - + Clear Log - + Copy this Log entry - + Copy complete Log @@ -2753,47 +2753,47 @@ Para cambiar el tipo de comportamiento, abra el menú Ver. SettingsDialog - + N/A N/A - + The executable file "%1" is not available - + Add a new application Añadir una nueva aplicación - + Modify an application Modificar una aplicación - + [Default] - + [Default] [Predeterminada] - + Select python binary - + Select MISRA File - + Select clang path @@ -2805,253 +2805,253 @@ Para cambiar el tipo de comportamiento, abra el menú Ver. StatsDialog - - - - + + + + Statistics Estadísticas - - + + Project Proyecto - + Project: Proyecto: - + Paths: Rutas: - + Include paths: Incluye las rutas: - + Defines: Definiciones: - + Undefines: - - + + Previous Scan Análisis anterior - + Path Selected: Ruta seleccionada: - + Number of Files Scanned: Número de archivos analizados: - + Scan Duration: Duración del análisis: - + Errors: Errores: - + Warnings: Advertencias: - + Stylistic warnings: Advertencias de estilo: - + Portability warnings: Advertencias de portabilidad: - + Performance issues: Problemas de rendimiento: - + Information messages: Mensajes de información: - + History - + File: - + Copy to Clipboard Copiar al portapapeles - + Pdf Export - + 1 day 1 día - + %1 days %1 días - + 1 hour 1 hora - + %1 hours %1 horas - + 1 minute 1 minuto - + %1 minutes %1 minutos - + 1 second 1 segundo - + %1 seconds %1 segundos - + 0.%1 seconds 0.%1 segundos - + and y - + Export PDF - + Project Settings Preferencias del proyecto - + Paths Rutas - + Include paths Incluye las rutas - + Defines Definiciones - + Undefines - + Path selected Ruta seleccionada - + Number of files scanned Número de archivos analizados - + Scan duration Duración del análisis - - + + Errors Errores - + File: - + No cppcheck build dir - - + + Warnings Advertencias - - + + Style warnings Advertencias de estilo - - + + Portability warnings Advertencias de portabilidad - - + + Performance warnings Advertencias de rendimiento - - + + Information messages Mensajes de información diff --git a/gui/cppcheck_fi.ts b/gui/cppcheck_fi.ts index 6aa591e05..d1de49fc0 100644 --- a/gui/cppcheck_fi.ts +++ b/gui/cppcheck_fi.ts @@ -57,12 +57,12 @@ Public lisenssin version 3 alaisuuteen ApplicationDialog - + Add an application Lisää uusi ohjelma - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -77,42 +77,42 @@ Parameters: -l(line) (file) - + &Name: - + &Executable: - + &Parameters: - + Browse Selaa - + Executable files (*.exe);;All files(*.*) Suoritettavat tiedostot (*.exe);;Kaikki tiedostot(*.*) - + Select viewer application Valitse ohjelma jolla avata virhetiedosto - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! @@ -120,20 +120,20 @@ Parameters: -l(line) (file) FileViewDialog - + Could not find the file: %1 Could not find the file: Tiedostoa %1 ei löytynyt - - + + Cppcheck Cppcheck - + Could not read the file: %1 Tiedoston %1 lukeminen epäonnistui @@ -452,18 +452,18 @@ Parameters: -l(line) (file) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -636,8 +636,8 @@ Parameters: -l(line) (file) - - + + Information @@ -997,56 +997,56 @@ Parameters: -l(line) (file) Tarkistettavaksi sopivia tiedostoja ei löytynyt! - - + + Quick Filter: - + Select configuration - + Found project file: %1 Do you want to load this project file instead? - + File not found - + Bad XML - + Missing attribute - + Bad attribute value - + Failed to load the selected library '%1'. %2 - + License Lisenssi - + Authors Tekijät @@ -1056,25 +1056,25 @@ Do you want to load this project file instead? XML-tiedostot (*.xml);;Tekstitiedostot (*.txt);;CSV-tiedostot (*.csv) - + Save the report file Tallenna raportti - - + + XML files (*.xml) XML-tiedostot (*xml) - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. - + You must close the project file before selecting new files or directories! @@ -1083,58 +1083,58 @@ This is probably because the settings were changed between the Cppcheck versions Valitse tarkistettavat tiedostot - + The library '%1' contains unknown elements: %2 - + Unsupported format - + Duplicate platform type - + Platform type redefined - + Unknown element - + Unknown issue - + Error - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. - + Open the report file - + Text files (*.txt) Tekstitiedostot (*.txt) - + CSV files (*.csv) @@ -1143,72 +1143,72 @@ This is probably because the settings were changed between the Cppcheck versions Cppcheck - %1 - + Project files (*.cppcheck);;All files(*.*) - + Select Project File - - - - + + + + Project: - + No suitable files found to analyze! - + C/C++ Source - + Compile database - + Visual Studio - + Borland C++ Builder 6 - + Select files to analyze - + Select directory to analyze - + Select the configuration that will be analyzed - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1216,49 +1216,49 @@ Do you want to proceed? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Build dir '%1' does not exist, create it? - + To check the project using addons, you need a build directory. - + Failed to import '%1', analysis is stopped - + Project files (*.cppcheck) - + Select Project Filename - + No project file loaded - + The project file %1 @@ -1380,314 +1380,314 @@ Options: ProjectFile - + Project File - + Paths and Defines - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. - + MISRA C 2012 - + MISRA rule texts - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> - + ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> - - + + Browse... - + Analyze all Visual Studio configurations - + Selected VS Configurations - + Paths: - - + + Add... - - - + + + Edit - - - - + + + + Remove - + Undefines: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: - + Up - + Down - + Platform - - + + Analysis - + This is a workfolder that Cppcheck will use for various purposes. - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) - + Max CTU depth - + Max recursion in template instantiation - + Warning options - + Root path: - + Filepaths in warnings will be relative to this path - + Warning tags (separated by semicolon) - + External tools - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) - + Types and Functions - + Libraries - + Parser - + Cppcheck (built in) - + Check that each class has a safe public interface - + Limit analysis - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + Suppressions - + Add - - + + Addons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 - + Thread safety - + Coding standards - + CERT - + Clang analyzer - + Clang-tidy - + Defines: @@ -1695,82 +1695,82 @@ Options: ProjectFileDialog - + Project file: %1 - + Select Cppcheck build dir - + Select include directory - + Select a directory to check - + (no rule texts file) - + Clang-tidy (not found) - + Visual Studio - + Compile database - + Borland C++ Builder 6 - + Import Project - + Select directory to ignore - + Source files - + All files - + Exclude file - + Select MISRA rule texts file - + MISRA rule texts file (%1) @@ -1805,7 +1805,7 @@ Options: - + (Not found) @@ -2174,76 +2174,76 @@ Tarkista että ohjelman polku ja parametrit ovat oikeat. ResultsView - + Print Report - + No errors found, nothing to print. - + %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. - + XML format version 1 is no longer supported. - + First included by - + Id - + Bug hunting analysis is incomplete - + Clear Log - + Copy this Log entry - + Copy complete Log @@ -2252,8 +2252,8 @@ Määrittääksesi minkä tyyppisiä virheitä näytetään, avaa näkymä valik Virheitä ei löytynyt, ei mitään tallennettavaa. - + Failed to save the report. Raportin tallentaminen epäonnistui. @@ -2523,47 +2523,47 @@ Määrittääksesi minkä tyyppisiä virheitä näytetään, avaa näkymä valik SettingsDialog - + N/A - + The executable file "%1" is not available - + Add a new application Lisää uusi ohjelma - + Modify an application Muokkaa ohjelmaa - + [Default] - + [Default] - + Select python binary - + Select MISRA File - + Select clang path @@ -2571,253 +2571,253 @@ Määrittääksesi minkä tyyppisiä virheitä näytetään, avaa näkymä valik StatsDialog - - - - + + + + Statistics - - + + Project - + Project: - + Paths: - + Include paths: - + Defines: - + Undefines: - - + + Previous Scan - + Path Selected: - + Number of Files Scanned: - + Scan Duration: - + Errors: - + Warnings: - + Stylistic warnings: - + Portability warnings: - + Performance issues: - + Information messages: - + History - + File: - + Copy to Clipboard - + Pdf Export - + 1 day - + %1 days - + 1 hour - + %1 hours - + 1 minute - + %1 minutes - + 1 second - + %1 seconds - + 0.%1 seconds - + and - + Export PDF - + Project Settings - + Paths - + Include paths - + Defines - + Undefines - + Path selected - + Number of files scanned - + Scan duration - - + + Errors - + File: - + No cppcheck build dir - - + + Warnings - - + + Style warnings - - + + Portability warnings - - + + Performance warnings - - + + Information messages diff --git a/gui/cppcheck_fr.ts b/gui/cppcheck_fr.ts index 444cb147d..34382dca6 100644 --- a/gui/cppcheck_fr.ts +++ b/gui/cppcheck_fr.ts @@ -57,42 +57,42 @@ General Public License version 3 ApplicationDialog - + Add an application Ajouter une application - + Browse Parcourir - + Executable files (*.exe);;All files(*.*) Fichier exécutable (*.exe);;Tous les fichiers(*.*) - + Select viewer application Sélection de l'application - + Cppcheck - + &Executable: &Exécutable : - + &Parameters: &Paramètres : - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -117,12 +117,12 @@ Exécutable : kate Paramètres : -l(ligne) (fichier) - + &Name: &Nom : - + You must specify a name, a path and optionally parameters for the application! Vous devez spécifier un nom, un chemin, et eventuellement des paramètres en option à l'application ! @@ -130,18 +130,18 @@ Paramètres : -l(ligne) (fichier) FileViewDialog - + Could not find the file: %1 Ne trouve pas le fichier : %1 - - + + Cppcheck - + Could not read the file: %1 Ne peut pas lire le fichier : %1 @@ -451,18 +451,18 @@ Paramètres : -l(ligne) (fichier) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck @@ -618,33 +618,33 @@ Paramètres : -l(ligne) (fichier) Sélectionner le répertoire à vérifier - + License Licence - + Authors Auteurs - + Save the report file Sauvegarder le rapport - - + + XML files (*.xml) Fichiers XML (*.xml) - + Text files (*.txt) Fichiers Texte (*.txt) - + CSV files (*.csv) Fichiers CSV (*.csv) @@ -781,8 +781,8 @@ Paramètres : -l(ligne) (fichier) - - + + Information Information @@ -801,12 +801,12 @@ Paramètres : -l(ligne) (fichier) Afficher les problèmes de portabilité - + You must close the project file before selecting new files or directories! Vous devez d'abord fermer le projet avant de choisir des fichiers/répertoires - + Open the report file Ouvrir le rapport @@ -819,32 +819,32 @@ Do you want to stop the checking and exit Cppcheck? Voulez-vous arrêter la vérification et quitter CppCheck ? - + Project files (*.cppcheck);;All files(*.*) - + Select Project File - + To check the project using addons, you need a build directory. - + Select Project Filename - + No project file loaded - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -861,28 +861,28 @@ This is probably because the settings were changed between the Cppcheck versions - - + + Quick Filter: Filtre rapide : - + Found project file: %1 Do you want to load this project file instead? - - - - + + + + Project: Projet : - + The project file %1 @@ -945,56 +945,56 @@ L'ouverture d'un nouveau fichier XML effacera les resultats. Voulez-vo - + Error Erreur - + File not found Fichier introuvable - + Bad XML Mauvais fichier XML - + Missing attribute Attribut manquant - + Bad attribute value Mauvaise valeur d'attribut - + Failed to load the selected library '%1'. %2 Echec lors du chargement de la bibliothèque '%1'. %2 - + Unsupported format Format non supporté - + The library '%1' contains unknown elements: %2 La bibliothèque '%1' contient des éléments inconnus: %2 - + Duplicate platform type - + Platform type redefined @@ -1036,17 +1036,17 @@ L'ouverture d'un nouveau fichier XML effacera les resultats. Voulez-vo &Revérifier tous les fichiers - + Unknown element - + Unknown issue - + Select configuration @@ -1069,12 +1069,12 @@ Options: - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. - + Build dir '%1' does not exist, create it? @@ -1102,39 +1102,39 @@ Options: - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + No suitable files found to analyze! - + Select files to analyze - + Select directory to analyze - + Select the configuration that will be analyzed - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? @@ -1281,12 +1281,12 @@ Do you want to stop the analysis and exit Cppcheck? - + Failed to import '%1', analysis is stopped - + Project files (*.cppcheck) @@ -1311,27 +1311,27 @@ Do you want to stop the analysis and exit Cppcheck? - + C/C++ Source - + Compile database - + Visual Studio - + Borland C++ Builder 6 - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1419,17 +1419,17 @@ Do you want to proceed? ProjectFile - + Project File Fichier Projet - + Paths: Chemins : - + Defines: @@ -1438,23 +1438,23 @@ Do you want to proceed? Projet - - + + Add... Ajouter... - - - + + + Edit Editer - - - - + + + + Remove Supprimer @@ -1471,12 +1471,12 @@ Do you want to proceed? Répertoire racine - + Up Monter - + Down Descendre @@ -1489,7 +1489,7 @@ Do you want to proceed? Bibliothèques - + Suppressions Suppressions @@ -1498,261 +1498,261 @@ Do you want to proceed? Liste de suppressions - + Add Ajouter - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. - + ... - + Include Paths: - + Paths and Defines - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> - + Analyze all Visual Studio configurations - + Root path: - + Warning tags (separated by semicolon) - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) - + Selected VS Configurations - + Types and Functions - + Libraries - + Parser - + Cppcheck (built in) - + Check that each class has a safe public interface - + Limit analysis - - + + Addons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 - + Thread safety - + Coding standards - + CERT - + Clang analyzer - + Clang-tidy - - + + Browse... - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int - + Platform - + This is a workfolder that Cppcheck will use for various purposes. - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + Max recursion in template instantiation - + Warning options - + Filepaths in warnings will be relative to this path - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + MISRA C 2012 - + MISRA rule texts - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> - + External tools - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) - + Undefines: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 - - + + Analysis - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) - + Max CTU depth @@ -1760,82 +1760,82 @@ Do you want to proceed? ProjectFileDialog - + Project file: %1 Fichier projet : %1 - + Select include directory Selectionner un répertoire à inclure - + Select directory to ignore Selectionner un répertoire à ignorer - + Select a directory to check Selectionner un répertoire à vérifier - + Select Cppcheck build dir - + Import Project - + Clang-tidy (not found) - + (no rule texts file) - + Source files - + All files - + Exclude file - + Select MISRA rule texts file - + MISRA rule texts file (%1) - + Visual Studio - + Compile database - + Borland C++ Builder 6 @@ -1887,7 +1887,7 @@ Do you want to proceed? - + (Not found) @@ -2275,25 +2275,25 @@ Please select the default editor application in preferences/Applications.Résultats - - + + Cppcheck - + No errors found. Pas d'erreurs trouvées. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. Des erreurs ont été trouvées mais sont configurées pour rester cachées. Pour configurer les erreurs affichées, ouvrez le menu d'affichage. - + Bug hunting analysis is incomplete @@ -2302,14 +2302,14 @@ Pour configurer les erreurs affichées, ouvrez le menu d'affichage.Pas d'erreurs trouvées, rien à sauvegarder. - + Failed to save the report. Erreur lors de la sauvegarde du rapport. - - + + Failed to read the report. Erreur lors de la lecture du rapport @@ -2322,32 +2322,32 @@ Pour configurer les erreurs affichées, ouvrez le menu d'affichage.Message - + %p% (%1 of %2 files checked) %p% (%1 fichiers sur %2 vérifiés) - + Id Id - + Print Report Imprimer le rapport - + No errors found, nothing to print. Aucune erreur trouvée. Il n'y a rien à imprimer - + First included by - + XML format version 1 is no longer supported. @@ -2389,17 +2389,17 @@ Pour configurer les erreurs affichées, ouvrez le menu d'affichage. - + Clear Log - + Copy this Log entry - + Copy complete Log @@ -2638,17 +2638,17 @@ Pour configurer les erreurs affichées, ouvrez le menu d'affichage. SettingsDialog - + Add a new application Ajouter une nouvelle application - + Modify an application Modifier une application - + N/A @@ -2657,32 +2657,32 @@ Pour configurer les erreurs affichées, ouvrez le menu d'affichage.Selectionner un répertoire à inclure - + [Default] - + [Default] - + The executable file "%1" is not available - + Select python binary - + Select clang path - + Select MISRA File @@ -2690,253 +2690,253 @@ Pour configurer les erreurs affichées, ouvrez le menu d'affichage. StatsDialog - - - - + + + + Statistics Statistiques - - + + Project Projet - + Project: Projet : - + Paths: Chemins : - + Include paths: Inclure les chemins : - + Defines: - - + + Previous Scan Analyse précédente - + Path Selected: Chemin sélectionné : - + Number of Files Scanned: Nombre de fichiers analysés : - + Scan Duration: Durée de l'analyse : - + Errors: Erreurs : - + Warnings: Avertissements - + Stylistic warnings: Avertissements de style - + Portability warnings: Avertissements de portabilité - + Performance issues: Problème de performance - + Information messages: Messages d'information : - + Copy to Clipboard Copier vers le presse-papier - + 1 day - + %1 days - + 1 hour - + %1 hours - + 1 minute - + %1 minutes - + 1 second - + %1 seconds - + 0.%1 seconds - + and - + Project Settings - + Paths Chemins - + Include paths - + Defines - + Path selected - + Number of files scanned - + Scan duration - - + + Errors Erreurs - - + + Warnings Avertissements - - + + Style warnings Avertissement de style - - + + Portability warnings - - + + Performance warnings Avertissements de performance - - + + Information messages - + Pdf Export - + Export PDF - + History - + File: - + File: - + No cppcheck build dir - + Undefines: - + Undefines diff --git a/gui/cppcheck_it.ts b/gui/cppcheck_it.ts index 2ead49418..d09ec5792 100644 --- a/gui/cppcheck_it.ts +++ b/gui/cppcheck_it.ts @@ -57,12 +57,12 @@ della GNU General Public License versione 3 ApplicationDialog - + Add an application Aggiungi un'applicazione - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -88,42 +88,42 @@ Parametri: -l(line) (file) - + &Name: &Nome: - + &Executable: &Eseguibile: - + &Parameters: &Parametri: - + Browse Esplora - + Executable files (*.exe);;All files(*.*) File di esecuzione (*.exe);;Tutti i file(*.*) - + Select viewer application Seleziona l'applicazione di lettura - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! Devi specificare un nome, un percorso ed, opzionalmente, i parametri per l'applicazione! @@ -131,18 +131,18 @@ Parametri: -l(line) (file) FileViewDialog - + Could not find the file: %1 File non trovato: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 Non è stato possibile leggere il file: %1 @@ -481,18 +481,18 @@ Parametri: -l(line) (file) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -681,8 +681,8 @@ Parametri: -l(line) (file) Mostra &i nascosti - - + + Information Informazione @@ -1078,18 +1078,18 @@ Parametri: -l(line) (file) Nessun file trovato idoneo alla scansione! - - + + Quick Filter: Rapido filtro: - + Select configuration - + Found project file: %1 Do you want to load this project file instead? @@ -1106,43 +1106,43 @@ Do you want to proceed checking without using any of these project files? - + File not found - + Bad XML - + Missing attribute - + Bad attribute value - + Unsupported format - + Failed to load the selected library '%1'. %2 - + License Licenza - + Authors Autori @@ -1151,18 +1151,18 @@ Vuoi procedere alla scansione senza usare qualcuno di questi file di progetto?File XML Versione 2 (*.xml);;File XML Versione 1 (*.xml);;File di testo (*.txt);;File CSV (*.csv) - + Save the report file Salva il file di rapporto - - + + XML files (*.xml) File XML (*.xml) - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -1171,7 +1171,7 @@ This is probably because the settings were changed between the Cppcheck versions Probabilmente ciò è avvenuto perché le impostazioni sono state modificate tra le versioni di Cppcheck. Per favore controlla (e sistema) le impostazioni delle applicazioni editor, altrimenti il programma editor può non partire correttamente. - + You must close the project file before selecting new files or directories! Devi chiudere il file di progetto prima di selezionare nuovi file o cartelle! @@ -1180,38 +1180,38 @@ Probabilmente ciò è avvenuto perché le impostazioni sono state modificate tra Seleziona i file da scansionare - + The library '%1' contains unknown elements: %2 - + Duplicate platform type - + Platform type redefined - + Unknown element - + Unknown issue - + Error - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. @@ -1224,7 +1224,7 @@ Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file Apri il file di rapporto @@ -1245,12 +1245,12 @@ Vuoi fermare la scansione ed uscire da Cppcheck? Files XML versione 2 (*.xml) - + Text files (*.txt) File di testo (*.txt) - + CSV files (*.csv) Files CSV (*.csv) @@ -1271,72 +1271,72 @@ The user interface language has been reset to English. Open the Preferences-dial L'interfaccia utente è stata risettata in Inglese. Apri la finestra di dialogo Preferenze per selezionare una qualunque lingua a disposizione. - + Project files (*.cppcheck);;All files(*.*) Files di progetto (*.cppcheck);;Tutti i files(*.*) - + Select Project File Seleziona il file di progetto - - - - + + + + Project: Progetto: - + No suitable files found to analyze! - + C/C++ Source - + Compile database - + Visual Studio - + Borland C++ Builder 6 - + Select files to analyze - + Select directory to analyze - + Select the configuration that will be analyzed - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1344,49 +1344,49 @@ Do you want to proceed? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Build dir '%1' does not exist, create it? - + To check the project using addons, you need a build directory. - + Failed to import '%1', analysis is stopped - + Project files (*.cppcheck) - + Select Project Filename Seleziona il nome del file di progetto - + No project file loaded Nessun file di progetto caricato - + The project file %1 @@ -1526,7 +1526,7 @@ Options: ProjectFile - + Project File File di progetto @@ -1535,18 +1535,18 @@ Options: Progetto - + Paths and Defines - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' @@ -1557,161 +1557,161 @@ Options: Root: - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + MISRA C 2012 - + MISRA rule texts - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> - + ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> - - + + Browse... - + Analyze all Visual Studio configurations - + Selected VS Configurations - + Paths: Percorsi: - - + + Add... Aggiungi... - - - + + + Edit Modifica - - - - + + + + Remove Rimuovi - + Undefines: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: - + Types and Functions - - + + Analysis - + This is a workfolder that Cppcheck will use for various purposes. - + Parser - + Cppcheck (built in) - + Check that each class has a safe public interface - + Limit analysis - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) - + Max CTU depth - + External tools @@ -1724,77 +1724,77 @@ Options: Cartelle di inclusione: - + Up Su - + Down Giù - + Platform - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + Max recursion in template instantiation - + Warning options - + Root path: - + Filepaths in warnings will be relative to this path - + Warning tags (separated by semicolon) - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) - + Libraries @@ -1803,58 +1803,58 @@ Options: Escludi - + Suppressions - + Add - - + + Addons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 - + Thread safety - + Coding standards - + CERT - + Clang analyzer - + Clang-tidy - + Defines: Definizioni: @@ -1862,82 +1862,82 @@ Options: ProjectFileDialog - + Project file: %1 File di progetto: %1 - + Select Cppcheck build dir - + Select include directory Seleziona la cartella da includere - + Select a directory to check Seleziona una cartella da scansionare - + (no rule texts file) - + Clang-tidy (not found) - + Visual Studio - + Compile database - + Borland C++ Builder 6 - + Import Project - + Select directory to ignore Seleziona la cartella da ignorare - + Source files - + All files - + Exclude file - + Select MISRA rule texts file - + MISRA rule texts file (%1) @@ -1977,7 +1977,7 @@ Options: - + (Not found) @@ -2369,46 +2369,46 @@ Per favore selezioa la cartella dove il file è posizionato. ResultsView - + Print Report - + No errors found, nothing to print. - + %p% (%1 of %2 files checked) %p% (%1 su %2 file scansionati) - - + + Cppcheck Cppcheck - + No errors found. Nessun errore trovato. - + Errors were found, but they are configured to be hidden. To toggle what kind of errors are shown, open view menu. Sono stati trovati errori, ma sono stati configurati per essere nascosti. Per vedere il tipo di errori che sono mostrati, apri il menu Visualizza. - - + + Failed to read the report. Apertura del report fallito. - + XML format version 1 is no longer supported. @@ -2421,32 +2421,32 @@ Per vedere il tipo di errori che sono mostrati, apri il menu Visualizza.Messaggio - + First included by - + Id Id - + Bug hunting analysis is incomplete - + Clear Log - + Copy this Log entry - + Copy complete Log @@ -2455,8 +2455,8 @@ Per vedere il tipo di errori che sono mostrati, apri il menu Visualizza.Nessun errore trovato, nulla da salvare. - + Failed to save the report. Salvataggio del report fallito. @@ -2749,47 +2749,47 @@ Per vedere il tipo di errori che sono mostrati, apri il menu Visualizza. SettingsDialog - + N/A N/A - + The executable file "%1" is not available - + Add a new application Aggiungi una nuova applicazione - + Modify an application Modifica un'applicazione - + [Default] - + [Default] [Predefinito] - + Select python binary - + Select MISRA File - + Select clang path @@ -2801,253 +2801,253 @@ Per vedere il tipo di errori che sono mostrati, apri il menu Visualizza. StatsDialog - - - - + + + + Statistics Statistiche - - + + Project Progetto - + Project: Progetto: - + Paths: Percorsi: - + Include paths: Percorsi di inclusione: - + Defines: Definizioni: - + Undefines: - - + + Previous Scan Precedente Scansione - + Path Selected: Selezionato percorso: - + Number of Files Scanned: Numero di Files Scansionati: - + Scan Duration: Durata della scansione: - + Errors: Errori: - + Warnings: Avvisi: - + Stylistic warnings: Avvisi sullo stile: - + Portability warnings: Avvisi sulla portabilità: - + Performance issues: Casi sulla performance: - + Information messages: Messaggi di informazione: - + History - + File: - + Copy to Clipboard Copia negli Appunti - + Pdf Export - + 1 day 1 giorno - + %1 days %1 giorni - + 1 hour 1 ora - + %1 hours %1 ore - + 1 minute 1 minuto - + %1 minutes %1 minuti - + 1 second 1 secondo - + %1 seconds %1 secondi - + 0.%1 seconds 0,%1 secondi - + and e - + Export PDF - + Project Settings Impostazioni progetto - + Paths Percorsi - + Include paths Percorsi di inclusione - + Defines Definizioni - + Undefines - + Path selected Selezionato percorso - + Number of files scanned Numero di file scansionati - + Scan duration Durata della scansione - - + + Errors Errori - + File: - + No cppcheck build dir - - + + Warnings Avvisi - - + + Style warnings Stilwarnungen - - + + Portability warnings Avvisi sulla portabilità - - + + Performance warnings Avvisi sulle performance - - + + Information messages Messaggi di informazione diff --git a/gui/cppcheck_ja.ts b/gui/cppcheck_ja.ts index 0a743cf6c..09627c43d 100644 --- a/gui/cppcheck_ja.ts +++ b/gui/cppcheck_ja.ts @@ -62,12 +62,12 @@ of the GNU General Public License version 3 ApplicationDialog - + Add an application アプリケーションの追加 - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -93,42 +93,42 @@ Executable: kate Parameters: -l(line) (file) - + &Name: 表示名(&N): - + &Executable: 実行ファイルのパス(&E): - + &Parameters: パラメータ(&P): - + Browse 参照 - + Executable files (*.exe);;All files(*.*) 実行ファイル (*.exe);;すべてのファイル(*.*) - + Select viewer application 表示アプリケーションの選択 - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! アプリケーションの表示名と実行ファイルのパスと(オプションの)引数を指定してください! @@ -136,18 +136,18 @@ Parameters: -l(line) (file) FileViewDialog - + Could not find the file: %1 ファイル:%1 が見つかりません - - + + Cppcheck Cppcheck - + Could not read the file: %1 ファイル:%1 が読み込めません @@ -501,18 +501,18 @@ Parameters: -l(line) (file) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -696,8 +696,8 @@ Parameters: -l(line) (file) スクラッチパッドを表示 - - + + Information 情報 @@ -1103,7 +1103,7 @@ Parameters: -l(line) (file) C++20 - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -1116,7 +1116,7 @@ Cppcheckの古いバージョンの設定には互換性がありません。エ 解析可能なファイルではありません - + You must close the project file before selecting new files or directories! 新しいファイル/ディレクトリをチェックするには現在のプロジェクトを閉じてください! @@ -1129,8 +1129,8 @@ Cppcheckの古いバージョンの設定には互換性がありません。エ チェック対象のディレクトリを選択 - - + + Quick Filter: クイックフィルタ: @@ -1143,12 +1143,12 @@ Cppcheckの古いバージョンの設定には互換性がありません。エ C/C++ ソース (%1) - + Select configuration コンフィグレーションの選択 - + Found project file: %1 Do you want to load this project file instead? @@ -1166,66 +1166,66 @@ Do you want to proceed checking without using any of these project files? - + The library '%1' contains unknown elements: %2 このライブラリ '%1' には次の不明な要素が含まれています。 %2 - + File not found ファイルがありません - + Bad XML 不正なXML - + Missing attribute 属性がありません - + Bad attribute value 不正な属性があります - + Unsupported format サポートされていないフォーマット - + Duplicate platform type プラットフォームの種類が重複しています - + Platform type redefined プラットフォームの種類が再定義されました - + Unknown element 不明な要素 - + Unknown issue 不明な課題 - + Failed to load the selected library '%1'. %2 選択したライブラリの読み込みに失敗しました '%1' %2 - + Error エラー @@ -1234,7 +1234,7 @@ Do you want to proceed checking without using any of these project files?%1の読み込みに失敗しました。CppCheckのインストールに失敗しています。コマンドライン引数に --data-dir=<directory> を指定して、このファイルの場所を指定してください。 - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. %1のロードに失敗しました。あなたの Cppcheck は正しくインストールされていません。あなたは --data-dir=<directory> コマンドラインオプションでロードするファイルの場所を指定できます。ただし、この --data-dir はインストールスクリプトによってサポートされており、GUI版ではサポートされていません。全ての設定は調整済みでなければなりません。 @@ -1247,13 +1247,13 @@ Opening a new XML file will clear current results.Do you want to proceed? - - + + XML files (*.xml) XML ファイル (*.xml) - + Open the report file レポートを開く @@ -1266,12 +1266,12 @@ Do you want to stop the checking and exit Cppcheck? 解析を停止してCppcheckを終了しますか?. - + License ライセンス - + Authors 作者 @@ -1281,7 +1281,7 @@ Do you want to stop the checking and exit Cppcheck? XML ファイル (*.xml);;テキストファイル (*.txt);;CSV形式ファイル (*.csv) - + Save the report file レポートを保存 @@ -1294,12 +1294,12 @@ Do you want to stop the checking and exit Cppcheck? XMLファイルのバージョン2 - + Text files (*.txt) テキストファイル (*.txt) - + CSV files (*.csv) CSV形式ファイル (*.csv) @@ -1308,65 +1308,65 @@ Do you want to stop the checking and exit Cppcheck? Cppcheck - %1 - + Project files (*.cppcheck);;All files(*.*) プロジェクトファイル (*.cppcheck);;すべてのファイル(*.*) - + Select Project File プロジェクトファイルを選択 - - - - + + + + Project: プロジェクト: - + No suitable files found to analyze! チェック対象のファイルがみつかりません! - + C/C++ Source C/C++のソースコード - + Compile database コンパイルデータベース - + Visual Studio Visual Studio - + Borland C++ Builder 6 Borland C++ Builder 6 - + Select files to analyze チェック対象のファイルを選択 - + Select directory to analyze チェックするディレクトリを選択してください - + Select the configuration that will be analyzed チェックの設定を選択 - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? @@ -1375,7 +1375,7 @@ Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1385,7 +1385,7 @@ Do you want to proceed? 新しくXMLファイルを開くと現在の結果が削除されます。実行しますか? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? @@ -1394,42 +1394,42 @@ Do you want to stop the analysis and exit Cppcheck? チェックを中断して、Cppcheckを終了しますか? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML ファイル (*.xml);;テキストファイル (*.txt);;CSVファイル (*.csv) - + Build dir '%1' does not exist, create it? ビルドディレクトリ'%1'がありません。作成しますか? - + To check the project using addons, you need a build directory. アドオンを使用してプロジェクトをチェックするためには、ビルドディレクトリが必要です。 - + Failed to import '%1', analysis is stopped '%1'のインポートに失敗しました。(チェック中断) - + Project files (*.cppcheck) プロジェクトファイル (*.cppcheck) - + Select Project Filename プロジェクトファイル名を選択 - + No project file loaded プロジェクトファイルが読み込まれていません - + The project file %1 @@ -1575,7 +1575,7 @@ Options: ProjectFile - + Project File プロジェクトファイル @@ -1584,18 +1584,18 @@ Options: プロジェクト - + Paths and Defines パスと定義 - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) プロジェクトのインポート(Visual studio / compile database Borland C++ Builder 6)) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' 定義(Define)はセミコロン';'で区切る必要があります。 例: DEF1;DEF2=5;DEF3=int @@ -1610,7 +1610,7 @@ Options: ライブラリ - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. カスタマイズした cfgファイルを同じフォルダにプロジェクトファイルとして保存してください。ここに表示できるようになります。 @@ -1619,135 +1619,135 @@ Options: 除外するパス - + MISRA C 2012 MISRA C 2012 - + MISRA rule texts MISRA ルールテキスト - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> <html><head/><body><p>MISRA C 2012 pdfのAppendix A &quot;Summary of guidelines&quot; からテキストをコピーペーストしてください。</p></body></html> - + ... ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> <html><head/><body><p>選択済み:</p><p> * 全Debug と Release設定をチェックする</p><p> * 最初にマッチした Debug 設定のみチェックする</p><p><br/></p></body></html> - - + + Browse... 参照... - + Analyze all Visual Studio configurations Visual Studioの全ての設定をチェックする - + Selected VS Configurations 選択したVS設定 - + Paths: パス: - - + + Add... 追加... - - - + + + Edit 編集 - - - - + + + + Remove 取り除く - + Undefines: 定義取り消し(Undefines): - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 定義の取り消しはセミコロンで区切ります。例: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: インクルードパス: - + Types and Functions 型と関数 - - + + Analysis チェック - + This is a workfolder that Cppcheck will use for various purposes. Cppcheckがさまざまな目的で使用するワークディレクトリ。 - + Parser パーサー - + Cppcheck (built in) Cppcheckビルトイン - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) ヘッダファイルのコードもチェック (通常はONにしてください、制限するときのみOFF) - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. タグが追加された場合、警告上で右クリックしてそれらのタグの中の一つを設定できます。警告を分類できます。 - + Exclude source files 除外するソースファイル - + Exclude folder... フォルダで除外... - + Exclude file... ファイルで除外... @@ -1764,12 +1764,12 @@ Options: バグハント -- 全てのバグを検出。ノイズになりがち。 - + Check that each class has a safe public interface クラスが安全で公開されたインターフェースをもっているか確認 - + Limit analysis 解析の制限 @@ -1778,13 +1778,13 @@ Options: ヘッダファイルのコードもチェック(解析に時間がかかりますが結果は増えます) - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) 未使用テンプレートのコードもチェック (解析に時間がかかり、また正確性は低い) - + Max CTU depth CTUの最大深さ @@ -1797,7 +1797,7 @@ Options: 注意: アドオンには<a href="https://www.python.org/">Python</a> が必要です。 - + External tools 外部ツール @@ -1810,12 +1810,12 @@ Options: インクルードディレクトリ: - + Up - + Down @@ -1824,62 +1824,62 @@ Options: チェック - + Platform プラットフォーム - + Clang (experimental) Clang (実験的) - + Normal analysis -- Avoid false positives. 通常解析--偽陽性を避ける。 - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. バグハンティング-- 不必要な指摘を含む。これはノイズが多くても全てのバグを検出する目的で使用します。 - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. 可能な限りクラスが柔軟であり堅牢であることを望む場合、公開されたインターフェースが非常に堅牢です。Cppcheckは引数があらゆる値をとりうると仮定します。 - + Max recursion in template instantiation テンプレートインスタンス化の最大再帰回数 - + Warning options 警告オプション - + Root path: ルートパス: - + Filepaths in warnings will be relative to this path 警告中のファイルパスはこのパスからの相対パスになります - + Warning tags (separated by semicolon) 警告タグ(セミコロン区切り) - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) Cppcheck ビルドディレクトリ (全プログラムチェック, 差分チェック, 統計等) - + Libraries ライブラリ @@ -1888,7 +1888,7 @@ Options: 除外する - + Suppressions 指摘の抑制 @@ -1897,7 +1897,7 @@ Options: 抑制リスト - + Add 追加 @@ -1906,33 +1906,33 @@ Options: アドオンとツール - - + + Addons アドオン - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. 注意: アドオンには<a href="https://www.python.org/">Python</a>が必要です。 - + Y2038 Y2038 - + Thread safety スレッドセーフ - + Coding standards コーディング標準 - + CERT CERT @@ -1945,17 +1945,17 @@ Options: 複数ツールの併用はよい結果を生みます。 - + Clang analyzer Clang Analyzer - + Clang-tidy Clang-tidy - + Defines: 定義(Defines): @@ -1963,12 +1963,12 @@ Options: ProjectFileDialog - + Project file: %1 プロジェクトファイル:%1 - + Select Cppcheck build dir Cppcheckビルドディレクトリ @@ -1977,62 +1977,62 @@ Options: Visual Studio (*.sln *.vcxproj);;コンパイルデータベース (compile_commands.json) - + Select include directory includeディレクトリを選択 - + Select a directory to check チェックするディレクトリを選択してください - + (no rule texts file) (ルールテキストファイルがない) - + Clang-tidy (not found) Clang-tidy (みつかりません) - + Visual Studio Visual Studio - + Compile database コンパイルデータベース - + Borland C++ Builder 6 Borland C++ Builder 6 - + Import Project プロジェクトのインポート - + Select directory to ignore 除外するディレクトリを選択してください - + Source files ソースファイル - + All files 全ファイル - + Exclude file 除外ファイル @@ -2045,12 +2045,12 @@ Options: 抑制するエラーID(error id)を選択してください - + Select MISRA rule texts file MISRAルールテキストファイルを選択 - + MISRA rule texts file (%1) MISRAルールテキストファイル (%1) @@ -2102,7 +2102,7 @@ Options: 行 %1: 必須の属性 '%2' が '%3'にない - + (Not found) (見つかりません) @@ -2545,51 +2545,51 @@ Please select the directory where file is located. 警告/エラーが見つからなかったため、保存しません。 - + Failed to save the report. レポートの保存に失敗しました。 - + Print Report レポートの印刷 - + No errors found, nothing to print. 指摘がないため、印刷するものがありません。 - + %p% (%1 of %2 files checked) %p% (%1 / %2 :ファイル数) - - + + 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. レポートの読み込みに失敗. - + XML format version 1 is no longer supported. XML フォーマットバージョン 1 はもうサポートされていません。 @@ -2602,32 +2602,32 @@ To toggle what kind of errors are shown, open view menu. メッセージ - + First included by は次のものが最初にインクルードしました - + Id ID - + Bug hunting analysis is incomplete バグハントの解析は不完全です - + Clear Log ログの消去 - + Copy this Log entry このログ項目をコピー - + Copy complete Log ログ全体をコピー @@ -2875,47 +2875,47 @@ To toggle what kind of errors are shown, open view menu. SettingsDialog - + N/A N/A - + The executable file "%1" is not available 実行ファイル "%1" が利用できません - + Add a new application 新しいアプリケーションの追加 - + Modify an application アプリケーションの変更 - + [Default] [デフォルト] - + [Default] [デフォルト] - + Select python binary pythonの場所の選択 - + Select MISRA File MISRAファイルの選択 - + Select clang path clangのパスの選択 @@ -2927,253 +2927,253 @@ To toggle what kind of errors are shown, open view menu. StatsDialog - - - - + + + + Statistics 統計情報 - - + + Project プロジェクト - + Project: プロジェクト: - + Paths: パス: - + Include paths: インクルードパス: - + Defines: 定義(define): - + Undefines: 定義取り消し(undef): - - + + Previous Scan 前回の解析 - + Path Selected: ディレクトリ選択: - + Number of Files Scanned: 解析済みファイル数: - + Scan Duration: 解析にかかった時間: - + Errors: エラー: - + Warnings: 警告: - + Stylistic warnings: スタイル警告: - + Portability warnings: 移植可能性の警告: - + Performance issues: パフォーマンス警告: - + Information messages: 情報メッセージ: - + History ヒストリー - + File: ファイル: - + Copy to Clipboard クリップボードにコピー - + Pdf Export PDF エクスポート - + 1 day 一日 - + %1 days %1日 - + 1 hour 一時間 - + %1 hours %1時間 - + 1 minute 一分 - + %1 minutes %1分 - + 1 second 一秒 - + %1 seconds %1秒 - + 0.%1 seconds 0.%1秒 - + and - + Export PDF PDF エクスポート - + Project Settings プロジェクトの設定 - + Paths パス - + Include paths インクルードパス - + Defines 定義(define) - + Undefines 定義取り消し(Undef) - + Path selected 選択されたパス - + Number of files scanned スキャンしたファイルの数 - + Scan duration スキャン期間 - - + + Errors エラー - + File: ファイル: - + No cppcheck build dir cppcheckビルドディレクトリがありません - - + + Warnings 警告 - - + + Style warnings スタイル警告 - - + + Portability warnings 移植可能性警告 - - + + Performance warnings パフォーマンス警告 - - + + Information messages 情報メッセージ diff --git a/gui/cppcheck_ko.ts b/gui/cppcheck_ko.ts index fd4eb7d34..68e37d5c7 100644 --- a/gui/cppcheck_ko.ts +++ b/gui/cppcheck_ko.ts @@ -57,12 +57,12 @@ of the GNU General Public License version 3 ApplicationDialog - + Add an application 응용 프로그램 추가 - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -87,37 +87,37 @@ Kate로 파일을 열고, 해당 행으로 이동하는 예제: 인자: -l(line) (file) - + &Name: 이름(&N): - + &Executable: 실행 파일(&E): - + &Parameters: 명령행 인자(&P): - + Browse 찾기 - + Executable files (*.exe);;All files(*.*) 실행 파일(*.exe);;모든 파일(*.*) - + Select viewer application 뷰어 프로그램 선택 - + Cppcheck Cppcheck @@ -126,7 +126,7 @@ Kate로 파일을 열고, 해당 행으로 이동하는 예제: 응용 프로그램의 이름, 경로 및 인자를 명시해야 합니다! - + You must specify a name, a path and optionally parameters for the application! @@ -134,18 +134,18 @@ Kate로 파일을 열고, 해당 행으로 이동하는 예제: FileViewDialog - + Could not find the file: %1 파일 찾기 실패: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 파일 읽기 실패: %1 @@ -482,18 +482,18 @@ Kate로 파일을 열고, 해당 행으로 이동하는 예제: - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -778,8 +778,8 @@ Kate로 파일을 열고, 해당 행으로 이동하는 예제: 숨기기 보기(&H) - - + + Information 정보 @@ -849,13 +849,13 @@ Kate로 파일을 열고, 해당 행으로 이동하는 예제: Posix - - + + Quick Filter: 빠른 필터: - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -868,7 +868,7 @@ Cppcheck 버전간 설정 방법 차이때문인 것으로 보입니다. 편집 검사할 수 있는 파일이 없습니다! - + You must close the project file before selecting new files or directories! 새로운 파일이나 디렉토리를 선택하기 전에 프로젝트 파일을 닫으세요! @@ -877,7 +877,7 @@ Cppcheck 버전간 설정 방법 차이때문인 것으로 보입니다. 편집 검사할 디렉토리 선택 - + Found project file: %1 Do you want to load this project file instead? @@ -894,13 +894,13 @@ Do you want to proceed checking without using any of these project files? - - + + XML files (*.xml) XML 파일 (*.xml) - + Open the report file 보고서 파일 열기 @@ -913,12 +913,12 @@ Do you want to stop the checking and exit Cppcheck? 검사를 중지하고 Cppcheck을 종료하시겠습니까? - + License 저작권 - + Authors 제작자 @@ -927,7 +927,7 @@ Do you want to stop the checking and exit Cppcheck? XML 파일 버전 2 (*.xml);;XML 파일 버전 1 (*.xml);;텍스트 파일 (*.txt);;CSV 파일 (*.csv) - + Save the report file 보고서 파일 저장 @@ -940,12 +940,12 @@ Do you want to stop the checking and exit Cppcheck? XML 파일 버전 2 (*.xml) - + Text files (*.txt) 텍스트 파일 (*.txt) - + CSV files (*.csv) CSV 파일 (*.csv) @@ -966,40 +966,40 @@ The user interface language has been reset to English. Open the Preferences-dial 언어가 영어로 초기화 됐습니다. 설정창을 열어서 설정 가능한 언어를 선택하세요. - + Project files (*.cppcheck);;All files(*.*) 프로젝트 파일 (*.cppcheck);;모든 파일(*.*) - + Select Project File 프로젝트 파일 선택 - - - - + + + + Project: 프로젝트: - + To check the project using addons, you need a build directory. - + Select Project Filename 프로젝트 파일이름 선택 - + No project file loaded 프로젝트 파일 불러오기 실패 - + The project file %1 @@ -1042,54 +1042,54 @@ Do you want to remove the file from the recently used projects -list? C++03 - + Error - + File not found - + Bad XML - + Missing attribute - + Bad attribute value - + Failed to load the selected library '%1'. %2 - + Unsupported format - + The library '%1' contains unknown elements: %2 - + Duplicate platform type - + Platform type redefined @@ -1119,17 +1119,17 @@ Do you want to remove the file from the recently used projects -list? - + Unknown element - + Unknown issue - + Select configuration @@ -1152,12 +1152,12 @@ Options: - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. - + Build dir '%1' does not exist, create it? @@ -1185,39 +1185,39 @@ Options: - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + No suitable files found to analyze! - + Select files to analyze - + Select directory to analyze - + Select the configuration that will be analyzed - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? @@ -1364,12 +1364,12 @@ Do you want to stop the analysis and exit Cppcheck? C++14 - + Failed to import '%1', analysis is stopped - + Project files (*.cppcheck) @@ -1394,27 +1394,27 @@ Do you want to stop the analysis and exit Cppcheck? C++20 - + C/C++ Source - + Compile database - + Visual Studio - + Borland C++ Builder 6 - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1510,7 +1510,7 @@ Do you want to proceed? ProjectFile - + Project File 프로젝트 파일 @@ -1519,7 +1519,7 @@ Do you want to proceed? 프로젝트 - + Defines: Defines: @@ -1528,28 +1528,28 @@ Do you want to proceed? Root: - + Paths: 경로: - - + + Add... 추가... - - - + + + Edit 편집 - - - - + + + + Remove 제거 @@ -1562,12 +1562,12 @@ Do you want to proceed? Include 디렉토리: - + Up 위로 - + Down 아래로 @@ -1576,266 +1576,266 @@ Do you want to proceed? Exclude - + Suppressions - + Add - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. - + ... - + Include Paths: - + Paths and Defines - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> - + Analyze all Visual Studio configurations - + Root path: - + Warning tags (separated by semicolon) - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) - + Selected VS Configurations - + Types and Functions - + Libraries - + Parser - + Cppcheck (built in) - + Check that each class has a safe public interface - + Limit analysis - - + + Addons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 - + Thread safety - + Coding standards - + CERT - + Clang analyzer - + Clang-tidy - - + + Browse... - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int - + Platform - + This is a workfolder that Cppcheck will use for various purposes. - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + Max recursion in template instantiation - + Warning options - + Filepaths in warnings will be relative to this path - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + MISRA C 2012 - + MISRA rule texts - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> - + External tools - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) - + Undefines: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 - - + + Analysis - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) - + Max CTU depth @@ -1843,82 +1843,82 @@ Do you want to proceed? ProjectFileDialog - + Project file: %1 프로젝트 파일: %1 - + Select include directory Include 디렉토리 선택 - + Select a directory to check 검사할 디렉토리 선택 - + Select directory to ignore 무시할 디렉토리 선택 - + Select Cppcheck build dir - + Import Project - + Clang-tidy (not found) - + (no rule texts file) - + Source files - + All files - + Exclude file - + Select MISRA rule texts file - + MISRA rule texts file (%1) - + Visual Studio - + Compile database - + Borland C++ Builder 6 @@ -1958,7 +1958,7 @@ Do you want to proceed? - + (Not found) @@ -2354,42 +2354,42 @@ Please select the directory where file is located. 에러가 발견되지 않았고, 저장할 내용이 없습니다. - + Failed to save the report. 결과 저장 실패. - + %p% (%1 of %2 files checked) %p% (%2 중 %1 파일 검사됨) - - + + 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. 결과 불러오기 실패. - + Bug hunting analysis is incomplete @@ -2402,27 +2402,27 @@ To toggle what kind of errors are shown, open view menu. 내용 - + Id - + Print Report - + No errors found, nothing to print. - + First included by - + XML format version 1 is no longer supported. @@ -2464,17 +2464,17 @@ To toggle what kind of errors are shown, open view menu. - + Clear Log - + Copy this Log entry - + Copy complete Log @@ -2725,27 +2725,27 @@ To toggle what kind of errors are shown, open view menu. SettingsDialog - + N/A N/A - + The executable file "%1" is not available - + Add a new application 새 응용 프로그램 추가 - + Modify an application 응용 프로그램 편집 - + [Default] [기본] @@ -2754,22 +2754,22 @@ To toggle what kind of errors are shown, open view menu. Include 디렉토리 선택 - + [Default] - + Select python binary - + Select clang path - + Select MISRA File @@ -2777,253 +2777,253 @@ To toggle what kind of errors are shown, open view menu. StatsDialog - - - - + + + + Statistics 통계 - - + + Project 프로젝트 - + Project: 프로젝트: - + Paths: 경로: - + Include paths: Include 경로: - + Defines: Defines: - - + + Previous Scan 직전 검사 - + Path Selected: 선택된 경로: - + Number of Files Scanned: 검사된 파일 수: - + Scan Duration: 검사 시간: - + Errors: 에러: - + Warnings: 경고: - + Stylistic warnings: 스타일 경고: - + Portability warnings: 이식성 경고: - + Performance issues: 성능 경고: - + Information messages: 정보 메시지: - + Copy to Clipboard 클립보드에 복사 - + 1 day 1일 - + %1 days %1일 - + 1 hour 1시간 - + %1 hours %1시간 - + 1 minute 1분 - + %1 minutes %1분 - + 1 second 1초 - + %1 seconds %1초 - + 0.%1 seconds 0.%1초 - + and - + Project Settings 프로젝트 설정 - + Paths 경로 - + Include paths Include 경로 - + Defines Defines - + Path selected 선택된 경로 - + Number of files scanned 검사된 파일 수 - + Scan duration 검사 시간 - - + + Errors 에러 - - + + Warnings 경고 - - + + Style warnings 스타일 경고 - - + + Portability warnings 이식성 경고 - - + + Performance warnings 성능 경고 - - + + Information messages 정보 메시지 - + Pdf Export - + Export PDF - + History - + File: - + File: - + No cppcheck build dir - + Undefines: - + Undefines diff --git a/gui/cppcheck_nl.ts b/gui/cppcheck_nl.ts index 251e9f7e1..ce20c75ef 100644 --- a/gui/cppcheck_nl.ts +++ b/gui/cppcheck_nl.ts @@ -57,12 +57,12 @@ van de GNU General Public License versie 3 ApplicationDialog - + Add an application Voeg een nieuwe applicatie toe - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -87,42 +87,42 @@ Uitvoerbaar: KonOs2 Parameters: -l(lijn) (bestand) - + &Name: &Naam: - + &Executable: &Uitvoerbaar: - + &Parameters: - + Browse Bladeren - + Executable files (*.exe);;All files(*.*) Uitvoerbare bestanden (*.exe);;Alle bestanden(*.*) - + Select viewer application Selecteer applicatie - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! Geef een naam op, een pad en eventueel parameters voor de toepassing! @@ -130,20 +130,20 @@ Parameters: -l(lijn) (bestand) FileViewDialog - + Could not find the file: %1 Could not find the file: Kon het bestand niet vinden: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 Kon het bestand niet lezen: %1 @@ -482,18 +482,18 @@ Parameters: -l(lijn) (bestand) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -682,8 +682,8 @@ Parameters: -l(lijn) (bestand) Toon &verborgen - - + + Information Informatie @@ -1051,18 +1051,18 @@ Parameters: -l(lijn) (bestand) Geen geschikte bestanden gevonden om te controleren! - - + + Quick Filter: Snel Filter: - + Select configuration - + Found project file: %1 Do you want to load this project file instead? @@ -1077,38 +1077,38 @@ Do you want to proceed checking without using any of these project files? - + File not found - + Bad XML - + Missing attribute - + Bad attribute value - + Failed to load the selected library '%1'. %2 - + License Licentie - + Authors Auteurs @@ -1118,18 +1118,18 @@ Wil je verder wilt gaan zonder controle van deze project bestanden?XML bestanden (*.xml);;Tekst bestanden (*.txt);;CSV bestanden (*.csv) - + Save the report file Rapport opslaan - - + + XML files (*.xml) XML bestanden (*.xml) - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -1138,7 +1138,7 @@ This is probably because the settings were changed between the Cppcheck versions Dit is waarschijnlijk omdat de instellingen zijn gewijzigd tussen de versies van cppcheck. Controleer (en maak) de bewerker instellingen, anders zal de bewerker niet correct starten. - + You must close the project file before selecting new files or directories! Je moet project bestanden sluiten voordat je nieuwe bestanden of mappen selekteerd! @@ -1147,43 +1147,43 @@ Dit is waarschijnlijk omdat de instellingen zijn gewijzigd tussen de versies van Selecteer bestanden om te controleren - + The library '%1' contains unknown elements: %2 - + Unsupported format - + Duplicate platform type - + Platform type redefined - + Unknown element - + Unknown issue - + Error - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. @@ -1196,7 +1196,7 @@ Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file Open het rapport bestand @@ -1217,12 +1217,12 @@ Wil je het controleren stoppen en Cppcheck sluiten? XML files version 2 (*.xml) - + Text files (*.txt) Tekst bestanden (*.txt) - + CSV files (*.csv) CSV bestanden (*.csv) @@ -1231,72 +1231,72 @@ Wil je het controleren stoppen en Cppcheck sluiten? Cppcheck - %1 - + Project files (*.cppcheck);;All files(*.*) Project bestanden (*.cppcheck);;Alle bestanden(*.*) - + Select Project File Selecteer project bestand - - - - + + + + Project: Project: - + No suitable files found to analyze! - + C/C++ Source - + Compile database - + Visual Studio - + Borland C++ Builder 6 - + Select files to analyze - + Select directory to analyze - + Select the configuration that will be analyzed - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1304,49 +1304,49 @@ Do you want to proceed? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Build dir '%1' does not exist, create it? - + To check the project using addons, you need a build directory. - + Failed to import '%1', analysis is stopped - + Project files (*.cppcheck) - + Select Project Filename Selecteer project bestandsnaam - + No project file loaded Geen project bestand geladen - + The project file %1 @@ -1508,7 +1508,7 @@ Options: ProjectFile - + Project File Project Bestand @@ -1517,18 +1517,18 @@ Options: Project - + Paths and Defines - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' @@ -1539,161 +1539,161 @@ Options: Hoofdmap: - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + MISRA C 2012 - + MISRA rule texts - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> - + ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> - - + + Browse... - + Analyze all Visual Studio configurations - + Selected VS Configurations - + Paths: Paden: - - + + Add... Toevoegen... - - - + + + Edit Bewerk - - - - + + + + Remove Verwijder - + Undefines: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: - + Types and Functions - - + + Analysis - + This is a workfolder that Cppcheck will use for various purposes. - + Parser - + Cppcheck (built in) - + Check that each class has a safe public interface - + Limit analysis - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) - + Max CTU depth - + External tools @@ -1706,77 +1706,77 @@ Options: Include mappen: - + Up Omhoog - + Down Omlaag - + Platform - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + Max recursion in template instantiation - + Warning options - + Root path: - + Filepaths in warnings will be relative to this path - + Warning tags (separated by semicolon) - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) - + Libraries @@ -1785,58 +1785,58 @@ Options: Exclusief - + Suppressions - + Add - - + + Addons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 - + Thread safety - + Coding standards - + CERT - + Clang analyzer - + Clang-tidy - + Defines: Omschrijft: @@ -1844,82 +1844,82 @@ Options: ProjectFileDialog - + Project file: %1 Project Bestand %1 - + Select Cppcheck build dir - + Select include directory Selecteer include map - + Select a directory to check Selecteer een map om te controleren - + (no rule texts file) - + Clang-tidy (not found) - + Visual Studio - + Compile database - + Borland C++ Builder 6 - + Import Project - + Select directory to ignore Selecteer een map om te negeren - + Source files - + All files - + Exclude file - + Select MISRA rule texts file - + MISRA rule texts file (%1) @@ -1969,7 +1969,7 @@ Options: - + (Not found) @@ -2360,46 +2360,46 @@ Selecteer de map waarin het bestand zich bevindt. ResultsView - + Print Report - + No errors found, nothing to print. - + %p% (%1 of %2 files checked) %p% (%1 van %2 bestanden gecontroleerd) - - + + 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. Kon rapport niet lezen. - + XML format version 1 is no longer supported. @@ -2412,32 +2412,32 @@ Gebruik het uitzicht menu om te selecteren welke fouten getoond worden.Bericht - + First included by - + Id Id - + Bug hunting analysis is incomplete - + Clear Log - + Copy this Log entry - + Copy complete Log @@ -2446,8 +2446,8 @@ Gebruik het uitzicht menu om te selecteren welke fouten getoond worden.Geen fouten gevonden; geen data om op te slaan. - + Failed to save the report. Kon het rapport niet opslaan. @@ -2741,47 +2741,47 @@ Gebruik het uitzicht menu om te selecteren welke fouten getoond worden. SettingsDialog - + N/A - + The executable file "%1" is not available - + Add a new application Nieuwe applicatie toevoegen - + Modify an application Applicatie wijzigen - + [Default] - + [Default] [Standaard] - + Select python binary - + Select MISRA File - + Select clang path @@ -2793,253 +2793,253 @@ Gebruik het uitzicht menu om te selecteren welke fouten getoond worden. StatsDialog - - - - + + + + Statistics Statistieken - - + + Project Project - + Project: Project: - + Paths: Paden: - + Include paths: Bevat paden: - + Defines: Omschrijft: - + Undefines: - - + + Previous Scan Vorige scan - + Path Selected: Pad Geselekteerd: - + Number of Files Scanned: Aantal bestanden gescanned: - + Scan Duration: Scan tijd: - + Errors: Fouten: - + Warnings: Waarschuwingen: - + Stylistic warnings: Stilistisch waarschuwingen: - + Portability warnings: Portabiliteit waarschuwingen: - + Performance issues: Presentatie problemen: - + Information messages: Informatie bericht: - + History - + File: - + Copy to Clipboard Kopieer naar Clipbord - + Pdf Export - + 1 day 1 dag - + %1 days %1 dagen - + 1 hour 1 uur - + %1 hours %1 uren - + 1 minute 1 minuut - + %1 minutes %1 minuten - + 1 second 1 seconde - + %1 seconds %1 secondes - + 0.%1 seconds 0.%1 secondes - + and en - + Export PDF - + Project Settings Project instellingen - + Paths Paden - + Include paths Bevat paden - + Defines Omschrijft - + Undefines - + Path selected Pad Geselekteerd - + Number of files scanned Aantal bestanden gescanned - + Scan duration Scan tijd - - + + Errors Fouten - + File: - + No cppcheck build dir - - + + Warnings Waarschuwingen - - + + Style warnings Stijl waarschuwingen - - + + Portability warnings Portabiliteit waarschuwingen - - + + Performance warnings Presentatie waarschuwingen - - + + Information messages Informatie bericht diff --git a/gui/cppcheck_ru.ts b/gui/cppcheck_ru.ts index 42552c55c..4c1cca3e4 100644 --- a/gui/cppcheck_ru.ts +++ b/gui/cppcheck_ru.ts @@ -62,12 +62,12 @@ of the GNU General Public License version 3 ApplicationDialog - + Add an application Добавление приложения - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -92,42 +92,42 @@ Parameters: -l(line) (file) Параметры: -l(line) (file) - + &Name: &Название: - + &Executable: &Программа: - + &Parameters: &Параметры: - + Browse Просмотреть - + Executable files (*.exe);;All files(*.*) Выполняемые файлы (*.exe);;Все файлы(*.*) - + Select viewer application Выберите приложение - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! Вы должны задать название и путь к приложению! @@ -135,20 +135,20 @@ Parameters: -l(line) (file) FileViewDialog - + Could not find the file: %1 Could not find the file: Невозможно найти файл: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 Невозможно прочитать файл: %1 @@ -487,18 +487,18 @@ Parameters: -l(line) (file) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -692,8 +692,8 @@ Parameters: -l(line) (file) Показать скрытые - - + + Information Информационные сообщения @@ -1105,18 +1105,18 @@ Parameters: -l(line) (file) Не найдено подходящих файлов для проверки! - - + + Quick Filter: Быстрый фильтр: - + Select configuration Выбор конфигурации - + Found project file: %1 Do you want to load this project file instead? @@ -1132,32 +1132,32 @@ Do you want to proceed checking without using any of these project files? - + File not found Файл не найден - + Bad XML Некорректный XML - + Missing attribute Пропущен атрибут - + Bad attribute value Некорректное значение атрибута - + Unsupported format Неподдерживаемый формат - + Failed to load the selected library '%1'. %2 Не удалось загрузить выбранную библиотеку '%1'. @@ -1168,12 +1168,12 @@ Do you want to proceed checking without using any of these project files?Не удалось загрузить %1. Установленный Cppcheck поврежден. Вы можете использовать ключ --data-dir=<directory> в командной строке, чтобы указать, где расположен этот файл. - + License Лицензия - + Authors Авторы @@ -1183,18 +1183,18 @@ Do you want to proceed checking without using any of these project files?XML файлы версии 2 (*.xml);;XML файлы версии 1 (*.xml);;Текстовые файлы (*.txt);;CSV файлы (*.csv) - + Save the report file Сохранить файл с отчетом - - + + XML files (*.xml) XML-файлы (*.xml) - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -1203,7 +1203,7 @@ This is probably because the settings were changed between the Cppcheck versions Возможно, это связано с изменениями в версии программы. Пожалуйста, проверьте (и исправьте) настройки приложения. - + You must close the project file before selecting new files or directories! Вы должны закрыть проект перед выбором новых файлов или каталогов! @@ -1212,39 +1212,39 @@ This is probably because the settings were changed between the Cppcheck versions Выберите файлы для проверки - + The library '%1' contains unknown elements: %2 Библиотека '%1' содержит неизвестные элементы: %2 - + Duplicate platform type Дубликат типа платформы - + Platform type redefined Переобъявление типа платформы - + Unknown element Неизвестный элемент - + Unknown issue Неизвестная проблема - + Error Ошибка - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. Невозможно загрузить %1. Cppcheck установлен некорректно. Вы можете использовать --data-dir=<directory> в командной строке для указания расположения файлов конфигурации. Обратите внимание, что --data-dir предназначен для использования сценариями установки. При включении данной опции, графический интерфейс пользователя не запускается. @@ -1257,7 +1257,7 @@ Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file Открыть файл с отчетом @@ -1278,12 +1278,12 @@ Do you want to stop the checking and exit Cppcheck? XML файлы версии 2 (*.xml) - + Text files (*.txt) Текстовые файлы (*.txt) - + CSV files (*.csv) CSV файлы(*.csv) @@ -1304,65 +1304,65 @@ The user interface language has been reset to English. Open the Preferences-dial The user interface language has been reset to English. Open the Preferences-dialog to select any of the available languages. - + Project files (*.cppcheck);;All files(*.*) Файлы проекта (*.cppcheck);;Все файлы(*.*) - + Select Project File Выберите файл проекта - - - - + + + + Project: Проект: - + No suitable files found to analyze! Не найдено подходящих файлов для анализа - + C/C++ Source Исходный код C/C++ - + Compile database - + Visual Studio Visual Studio - + Borland C++ Builder 6 Borland C++ Builder 6 - + Select files to analyze Выбор файлов для анализа - + Select directory to analyze Выбор каталога для анализа - + Select the configuration that will be analyzed Выбор используемой конфигурации - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? @@ -1371,7 +1371,7 @@ Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1382,7 +1382,7 @@ Do you want to proceed? Вы хотите продолжить? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? @@ -1391,42 +1391,42 @@ Do you want to stop the analysis and exit Cppcheck? Вы хотите остановить анализ и выйти из Cppcheck? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML файлы (*.xml);;Текстовые файлы (*.txt);;CSV файлы (*.csv) - + Build dir '%1' does not exist, create it? Директория для сборки '%1' не существует, создать? - + To check the project using addons, you need a build directory. - + Failed to import '%1', analysis is stopped Невозможно импортировать '%1', анализ остановлен - + Project files (*.cppcheck) Файлы проекта (*.cppcheck) - + Select Project Filename Выберите имя файла для проекта - + No project file loaded Файл с проектом не загружен - + The project file %1 @@ -1602,7 +1602,7 @@ Options: ProjectFile - + Project File Файл проекта @@ -1611,18 +1611,18 @@ Options: Проект - + Paths and Defines Каталоги и определения - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) Импорт проекта (Visual studio / compile database/ Borland C++ Builder 6) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' Defines должны быть разделены точкой с запятой ';' @@ -1637,170 +1637,170 @@ Options: Библиотеки: - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. Положите свои .cfg-файлы в один каталог с файлом проекта. Вы увидите их сверху. - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + Max recursion in template instantiation - + Filepaths in warnings will be relative to this path - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + MISRA C 2012 MISRA C 2012 - + MISRA rule texts Файл с текстами правил MISRA - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> <html><head/><body><p>Скопируйте текст из Appendix A &quot;Summary of guidelines&quot; из фала правил MISRA C 2012 pdf в текстовый файл.</p></body></html> - + ... ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> <html><head/><body><p>Выберите:</p><p> * Анализ всех конфигураций Debug и Release</p><p> * Анализ только первой подходящей конфигурации Debug</p><p><br/></p></body></html> - - + + Browse... Обзор... - + Analyze all Visual Studio configurations Анализировать все конфигурации Visual Studio - + Selected VS Configurations - + Paths: Пути: - - + + Add... Добавить... - - - + + + Edit Изменить - - - - + + + + Remove Удалить - + Undefines: Удаленные макроопределения: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 Удаленные макроопределения должны быть разделены точкой с запятой, например: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: Пути заголовочных файлов: - + Types and Functions - - + + Analysis Анализ - + This is a workfolder that Cppcheck will use for various purposes. - + Parser - + Cppcheck (built in) @@ -1809,12 +1809,12 @@ Options: Clang - + Check that each class has a safe public interface - + Limit analysis @@ -1823,13 +1823,13 @@ Options: Проверить код в заголовочных файлах - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) Проверить код в неиспользуемых шаблонах - + Max CTU depth Максимальная глубина CTU @@ -1838,7 +1838,7 @@ Options: Исключить исходные файлы в путях - + External tools Внешние инструменты @@ -1851,12 +1851,12 @@ Options: Пути для поиска заголовочных файлов: - + Up Вверх - + Down Вниз @@ -1865,32 +1865,32 @@ Options: Проверка - + Platform Платформа - + Warning options Опции предупреждений - + Root path: Корневой каталог: - + Warning tags (separated by semicolon) Теги предупреждений (через ';') - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) Каталог сборки Cppcheck - + Libraries Библиотеки @@ -1899,12 +1899,12 @@ Options: Исключенные пути - + Suppressions Подавления - + Add Добавить @@ -1913,48 +1913,48 @@ Options: Дополнения - - + + Addons Дополнения - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 - + Thread safety - + Coding standards Стандарты кодирования - + CERT CERT - + Clang analyzer - + Clang-tidy - + Defines: Объявленные макроопределения: @@ -1962,82 +1962,82 @@ Options: ProjectFileDialog - + Project file: %1 Файл проекта: %1 - + Select Cppcheck build dir Выбрать директорию сборки Cppcheck - + Select include directory Выберите директорию для поиска заголовочных файлов - + Select a directory to check Выберите директорию для проверки - + (no rule texts file) (файл с текстами правил недоступен) - + Clang-tidy (not found) Clang-tidy (не найден) - + Visual Studio Visual Studio - + Compile database - + Borland C++ Builder 6 Borland C++ Builder 6 - + Import Project Импорт проекта - + Select directory to ignore Выберите директорию, которую надо проигнорировать - + Source files - + All files - + Exclude file - + Select MISRA rule texts file Выбрать файл текстов правил MISRA - + MISRA rule texts file (%1) Файл текстов правил MISRA (%1) @@ -2091,7 +2091,7 @@ Options: - + (Not found) (Недоступно) @@ -2481,46 +2481,46 @@ Please select the directory where file is located. ResultsView - + Print Report Распечатать отчет - + No errors found, nothing to print. Ошибок не найдено, нечего распечатывать. - + %p% (%1 of %2 files checked) %p% (%1 из %2 файлов проверено) - - + + 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. Не удалось прочитать отчет. - + XML format version 1 is no longer supported. XML формат версии 1 больше не поддерживается. @@ -2533,32 +2533,32 @@ To toggle what kind of errors are shown, open view menu. Сообщение - + First included by Только первый включенный - + Id Id - + Bug hunting analysis is incomplete - + Clear Log Очистить лог - + Copy this Log entry Скопировать данную запись - + Copy complete Log Скопировать полный лог @@ -2567,8 +2567,8 @@ To toggle what kind of errors are shown, open view menu. Ошибки не найдены, нечего сохранять. - + Failed to save the report. Не удалось сохранить отчет. @@ -2862,47 +2862,47 @@ To toggle what kind of errors are shown, open view menu. SettingsDialog - + N/A Нет данных - + The executable file "%1" is not available - + Add a new application Добавить новое приложение - + Modify an application Изменить приложение - + [Default] [По умолчанию] - + [Default] [По умолчанию] - + Select python binary Выберите исполняемый файл python - + Select MISRA File Выберите файл текстов правил MISRA - + Select clang path Выберите исполняемый файл clang @@ -2914,253 +2914,253 @@ To toggle what kind of errors are shown, open view menu. StatsDialog - - - - + + + + Statistics Статистика - - + + Project Проект - + Project: Проект: - + Paths: Пути: - + Include paths: Включенные пути: - + Defines: Объявленные макроопределения: - + Undefines: Удаленные макроопределения: - - + + Previous Scan Последнее сканирование - + Path Selected: Выбранный путь: - + Number of Files Scanned: Количество просканированных файлов: - + Scan Duration: Продолжительность сканирования: - + Errors: Ошибки: - + Warnings: Предупреждения: - + Stylistic warnings: Стилистические предупреждения: - + Portability warnings: Предупреждения переносимости: - + Performance issues: Проблемы с производительностью: - + Information messages: Информационные сообщения: - + History История - + File: Файл: - + Copy to Clipboard Скопировать в буфер обмена - + Pdf Export Экспорт PDF - + 1 day 1 день - + %1 days %1 дней - + 1 hour 1 час - + %1 hours %1 часов - + 1 minute 1 минута - + %1 minutes %1 минут - + 1 second 1 секунда - + %1 seconds %1 секунд - + 0.%1 seconds 0.1%1 секунд - + and и - + Export PDF Экспорт PDF - + Project Settings Настройки проекта - + Paths Пути - + Include paths Включенные пути - + Defines Объявленные макроопределения: - + Undefines Удаленные макроопределения: - + Path selected Выбранные пути - + Number of files scanned Количество просканированных файлов - + Scan duration Продолжительность сканирования - - + + Errors Ошибки - + File: Файл: - + No cppcheck build dir Не задана директория сборки - - + + Warnings Предупреждения - - + + Style warnings Стилистические предупреждения - - + + Portability warnings Предупреждения переносимости - - + + Performance warnings Предупреждения производительности - - + + Information messages Информационные сообщения diff --git a/gui/cppcheck_sr.ts b/gui/cppcheck_sr.ts index d62c9c01e..ed99b118d 100644 --- a/gui/cppcheck_sr.ts +++ b/gui/cppcheck_sr.ts @@ -57,12 +57,12 @@ of the GNU General Public License version 3 ApplicationDialog - + Add an application Add a new application - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -77,42 +77,42 @@ Parameters: -l(line) (file) - + &Name: - + &Executable: - + &Parameters: - + Browse Browse - + Executable files (*.exe);;All files(*.*) Executable files (*.exe);;All files(*.*) - + Select viewer application Select viewer application - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! @@ -120,18 +120,18 @@ Parameters: -l(line) (file) FileViewDialog - + Could not find the file: %1 Could not find the file: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 Could not read the file: %1 @@ -450,18 +450,18 @@ Parameters: -l(line) (file) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -634,8 +634,8 @@ Parameters: -l(line) (file) - - + + Information @@ -1023,56 +1023,56 @@ Parameters: -l(line) (file) No suitable files found to check! - - + + Quick Filter: - + Select configuration - + Found project file: %1 Do you want to load this project file instead? - + File not found - + Bad XML - + Missing attribute - + Bad attribute value - + Failed to load the selected library '%1'. %2 - + License License - + Authors Authors @@ -1081,25 +1081,25 @@ Do you want to load this project file instead? XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Save the report file Save the report file - - + + XML files (*.xml) XML files (*.xml) - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. - + You must close the project file before selecting new files or directories! @@ -1108,58 +1108,58 @@ This is probably because the settings were changed between the Cppcheck versions Select files to check - + The library '%1' contains unknown elements: %2 - + Unsupported format - + Duplicate platform type - + Platform type redefined - + Unknown element - + Unknown issue - + Error - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. - + Open the report file - + Text files (*.txt) Text files (*.txt) - + CSV files (*.csv) @@ -1168,72 +1168,72 @@ This is probably because the settings were changed between the Cppcheck versions Cppcheck - %1 - + Project files (*.cppcheck);;All files(*.*) - + Select Project File - - - - + + + + Project: - + No suitable files found to analyze! - + C/C++ Source - + Compile database - + Visual Studio - + Borland C++ Builder 6 - + Select files to analyze - + Select directory to analyze - + Select the configuration that will be analyzed - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1241,49 +1241,49 @@ Do you want to proceed? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Build dir '%1' does not exist, create it? - + To check the project using addons, you need a build directory. - + Failed to import '%1', analysis is stopped - + Project files (*.cppcheck) - + Select Project Filename - + No project file loaded - + The project file %1 @@ -1405,314 +1405,314 @@ Options: ProjectFile - + Project File - + Paths and Defines - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. - + MISRA C 2012 - + MISRA rule texts - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> - + ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> - - + + Browse... - + Analyze all Visual Studio configurations - + Selected VS Configurations - + Paths: - - + + Add... - - - + + + Edit - - - - + + + + Remove - + Undefines: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: - + Up - + Down - + Platform - - + + Analysis - + This is a workfolder that Cppcheck will use for various purposes. - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) - + Max CTU depth - + Max recursion in template instantiation - + Warning options - + Root path: - + Filepaths in warnings will be relative to this path - + Warning tags (separated by semicolon) - + External tools - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) - + Types and Functions - + Libraries - + Parser - + Cppcheck (built in) - + Check that each class has a safe public interface - + Limit analysis - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + Suppressions - + Add - - + + Addons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 - + Thread safety - + Coding standards - + CERT - + Clang analyzer - + Clang-tidy - + Defines: @@ -1720,82 +1720,82 @@ Options: ProjectFileDialog - + Project file: %1 - + Select Cppcheck build dir - + Select include directory - + Select a directory to check - + (no rule texts file) - + Clang-tidy (not found) - + Visual Studio - + Compile database - + Borland C++ Builder 6 - + Import Project - + Select directory to ignore - + Source files - + All files - + Exclude file - + Select MISRA rule texts file - + MISRA rule texts file (%1) @@ -1828,7 +1828,7 @@ Options: - + (Not found) @@ -2196,76 +2196,76 @@ Please check the application path and parameters are correct. ResultsView - + Print Report - + No errors found, nothing to print. - + %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. - + XML format version 1 is no longer supported. - + First included by - + Id - + Bug hunting analysis is incomplete - + Clear Log - + Copy this Log entry - + Copy complete Log @@ -2274,8 +2274,8 @@ To toggle what kind of errors are shown, open view menu. No errors found, nothing to save. - + Failed to save the report. Failed to save the report. @@ -2544,47 +2544,47 @@ To toggle what kind of errors are shown, open view menu. SettingsDialog - + N/A - + The executable file "%1" is not available - + Add a new application Add a new application - + Modify an application Modify an application - + [Default] - + [Default] - + Select python binary - + Select MISRA File - + Select clang path @@ -2592,253 +2592,253 @@ To toggle what kind of errors are shown, open view menu. StatsDialog - - - - + + + + Statistics - - + + Project - + Project: - + Paths: - + Include paths: - + Defines: - + Undefines: - - + + Previous Scan - + Path Selected: - + Number of Files Scanned: - + Scan Duration: - + Errors: - + Warnings: - + Stylistic warnings: - + Portability warnings: - + Performance issues: - + Information messages: - + History - + File: - + Copy to Clipboard - + Pdf Export - + 1 day - + %1 days - + 1 hour - + %1 hours - + 1 minute - + %1 minutes - + 1 second - + %1 seconds - + 0.%1 seconds - + and - + Export PDF - + Project Settings - + Paths - + Include paths - + Defines - + Undefines - + Path selected - + Number of files scanned - + Scan duration - - + + Errors - + File: - + No cppcheck build dir - - + + Warnings - - + + Style warnings - - + + Portability warnings - - + + Performance warnings - - + + Information messages diff --git a/gui/cppcheck_sv.ts b/gui/cppcheck_sv.ts index 172d06f1c..a7fdbb167 100644 --- a/gui/cppcheck_sv.ts +++ b/gui/cppcheck_sv.ts @@ -57,12 +57,12 @@ of the GNU General Public License version 3 ApplicationDialog - + Add an application Lägg till program - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -87,42 +87,42 @@ Körbar fil: kate Parametrar: -l(line) (file) - + &Name: Namn: - + &Executable: Körbar fil: - + &Parameters: Parametrar: - + Browse Bläddra - + Executable files (*.exe);;All files(*.*) Exekverbara filer (*.exe);;Alla filer(*.*) - + Select viewer application Välj program - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! Du måste ange namn, sökväg samt eventuellt parametrar för applikationen! @@ -134,20 +134,20 @@ Parametrar: -l(line) (file) FileViewDialog - + Could not find the file: %1 Could not find the file: Kunde inte hitta filen: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 Kunde inte läsa filen: %1 @@ -504,18 +504,18 @@ Exempel: - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -709,8 +709,8 @@ Exempel: Visa dolda - - + + Information Information @@ -1123,8 +1123,8 @@ Exempel: Inga lämpliga filer hittades! - - + + Quick Filter: Snabbfilter: @@ -1133,7 +1133,7 @@ Exempel: C/C++ källkod, Compile database, Visual Studio (%1 %2 *.sln *.vcxproj) - + Select configuration Välj konfiguration @@ -1142,7 +1142,7 @@ Exempel: Välj konfiguration som kommer analyseras - + Found project file: %1 Do you want to load this project file instead? @@ -1159,44 +1159,44 @@ Do you want to proceed checking without using any of these project files? - + File not found Filen hittades ej - + Bad XML Ogiltig XML - + Missing attribute Attribut finns ej - + Bad attribute value Ogiltigt attribut värde - + Unsupported format Format stöds ej - + Failed to load the selected library '%1'. %2 Misslyckades att ladda valda library '%1'. %2 - + License Licens - + Authors Utvecklare @@ -1206,18 +1206,18 @@ Vill du fortsätta analysen utan att använda någon av dessa projektfiler?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) - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -1226,7 +1226,7 @@ This is probably because the settings were changed between the Cppcheck versions En trolig orsak är att inställningarna ändrats för olika Cppcheck versioner. Kontrollera programinställningarna. - + You must close the project file before selecting new files or directories! Du måste stänga projektfilen innan nya filer eller sökvägar kan väljas! @@ -1235,39 +1235,39 @@ En trolig orsak är att inställningarna ändrats för olika Cppcheck versioner. Välj filer att kontrollera - + The library '%1' contains unknown elements: %2 Library filen '%1' har element som ej hanteras: %2 - + Duplicate platform type Dubbel plattformstyp - + Platform type redefined Plattformstyp definieras igen - + Unknown element Element hanteras ej - + Unknown issue Något problem - + Error Fel - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. Misslyckades att ladda %1. Din Cppcheck installation är ej komplett. Du kan använda --data-dir<directory> på kommandoraden för att specificera var denna fil finns. Det är meningen att --data-dir kommandot skall köras under installationen,så GUIt kommer ej visas när --data-dir används allt som händer är att en inställning görs. @@ -1280,7 +1280,7 @@ Opening a new XML file will clear current results.Do you want to proceed? - + Open the report file Öppna rapportfilen @@ -1309,12 +1309,12 @@ Vill du stoppa analysen och avsluta Cppcheck? XML filer version 2 (*.xml) - + Text files (*.txt) Text filer (*.txt) - + CSV files (*.csv) CSV filer (*.csv) @@ -1335,65 +1335,65 @@ 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: - + No suitable files found to analyze! Inga filer hittades att analysera! - + C/C++ Source - + Compile database - + Visual Studio Visual Studio - + Borland C++ Builder 6 - + Select files to analyze Välj filer att analysera - + Select directory to analyze Välj mapp att analysera - + Select the configuration that will be analyzed Välj konfiguration som kommer analyseras - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? @@ -1402,7 +1402,7 @@ Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1410,7 +1410,7 @@ Do you want to proceed? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? @@ -1419,42 +1419,42 @@ Do you want to stop the analysis and exit Cppcheck? Vill du stoppa analysen och avsluta Cppcheck? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML filer (*.xml);;Text filer (*.txt);;CSV filer (*.csv) - + Build dir '%1' does not exist, create it? Build dir '%1' existerar ej, skapa den? - + To check the project using addons, you need a build directory. - + Failed to import '%1', analysis is stopped Misslyckades att importera '%1', analysen stoppas - + Project files (*.cppcheck) Projekt filer (*.cppcheck) - + Select Project Filename Välj Projektfil - + No project file loaded Inget projekt laddat - + The project file %1 @@ -1631,7 +1631,7 @@ Options: ProjectFile - + Project File Projektfil @@ -1650,7 +1650,7 @@ Omodifierade filer analyseras mycket fortare, Cppcheck hoppar över analysen och Cppcheck build dir (whole program analys, snabbare analys för omodifierade filer) - + Paths and Defines Sökvägar och defines @@ -1660,13 +1660,13 @@ Omodifierade filer analyseras mycket fortare, Cppcheck hoppar över analysen och Sökvägar och defines importeras. - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) Importera Projekt (Visual Studio / compile database) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' Defines separeras med semicolon ';' @@ -1681,7 +1681,7 @@ Sökvägar och defines importeras. Libraries: - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. Obs: Lägg dina egna .cfg filer i samma folder som projekt filen. De skall isåfall visas ovan. @@ -1690,149 +1690,149 @@ Sökvägar och defines importeras. Visual Studio - + ... ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> <html><head/><body><p>Du har ett val:</p><p> * Analysera alla Debug och Release konfigurationer</p><p> * Analysera bara den första matchande Debug konfigurationen</p><p><br/></p></body></html> - - + + Browse... - + Analyze all Visual Studio configurations Analysera alla Visual Studio konfigurationer - + Selected VS Configurations - + Paths: Sökvägar: - - + + Add... Lägg till... - - - + + + Edit Redigera - - - - + + + + Remove Ta bort - + Undefines: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 - + Include Paths: Include sökvägar: - + This is a workfolder that Cppcheck will use for various purposes. - + Clang (experimental) - + Normal analysis -- Avoid false positives. - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) - + Max recursion in template instantiation - + Filepaths in warnings will be relative to this path - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. - + Exclude source files - + Exclude folder... - + Exclude file... - + MISRA C 2012 - + MISRA rule texts - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> - + External tools @@ -1845,33 +1845,33 @@ Sökvägar och defines importeras. Include sökvägar - + Up Upp - + Down Ned - + Platform - - + + Analysis - + Parser - + Cppcheck (built in) @@ -1880,53 +1880,53 @@ Sökvägar och defines importeras. Clang - + Check that each class has a safe public interface - + Limit analysis - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) - + Max CTU depth - + Warning options - + Root path: Bas sökväg: - + Warning tags (separated by semicolon) Varnings taggar (separerade med semikolon) - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) Cppcheck build dir (whole program analys, incremental analys, statistik, etc) - + Types and Functions - + Libraries Libraries @@ -1935,7 +1935,7 @@ Sökvägar och defines importeras. Exkludera - + Suppressions Suppressions @@ -1944,38 +1944,38 @@ Sökvägar och defines importeras. Suppression-list: - + Add Lägg till - - + + Addons Addons - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. - + Y2038 Y2038 - + Thread safety Tråd säkerhet - + Coding standards Kodstandarder - + CERT CERT @@ -1988,17 +1988,17 @@ Sökvägar och defines importeras. Best practice är att använda flera verktyg - + Clang analyzer Clang analyzer - + Clang-tidy Clang-tidy - + Defines: Defines: @@ -2006,22 +2006,22 @@ Sökvägar och defines importeras. ProjectFileDialog - + Project file: %1 Projektfil: %1 - + (no rule texts file) - + Clang-tidy (not found) - + Select Cppcheck build dir Välj Cppcheck build dir @@ -2030,57 +2030,57 @@ Sökvägar och defines importeras. Visual Studio (*.sln *.vcxproj);;Compile database (compile_commands.json) - + Select include directory Välj include sökväg - + Source files - + All files - + Exclude file - + Select MISRA rule texts file - + MISRA rule texts file (%1) - + Select a directory to check Välj mapp att analysera - + Visual Studio Visual Studio - + Compile database - + Borland C++ Builder 6 - + Import Project Importera Projekt @@ -2089,7 +2089,7 @@ Sökvägar och defines importeras. Visual Studio (*.sln *.vcxproj);;Compile database (compile_database.json) - + Select directory to ignore Välj sökväg att ignorera @@ -2151,7 +2151,7 @@ Sökvägar och defines importeras. - + (Not found) @@ -2544,46 +2544,46 @@ Välj mappen där filen finns. ResultsView - + Print Report Skriv ut rapport - + No errors found, nothing to print. Inga fel hittades, inget att skriva ut. - + %p% (%1 of %2 files checked) %p% (%1 av %2 filer analyserade) - - + + 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. - + XML format version 1 is no longer supported. XML format version 1 stöds ej längre. @@ -2596,32 +2596,32 @@ För att ställa in vilka fel som skall visas använd visa menyn. Meddelande - + First included by Först inkluderad av - + Id Id - + Bug hunting analysis is incomplete - + Clear Log - + Copy this Log entry - + Copy complete Log @@ -2630,8 +2630,8 @@ För att ställa in vilka fel som skall visas använd visa menyn. Inga fel hittades, ingenting att spara. - + Failed to save the report. Misslyckades med att spara rapporten. @@ -2925,47 +2925,47 @@ För att ställa in vilka fel som skall visas använd visa menyn. SettingsDialog - + N/A Ej tillgängligt - + The executable file "%1" is not available - + Add a new application Lägg till program - + Modify an application Ändra program - + [Default] [Vald] - + [Default] [Förvald] - + Select python binary Välj python binär - + Select MISRA File - + Select clang path Välj Clang sökväg @@ -2977,253 +2977,253 @@ För att ställa in vilka fel som skall visas använd visa menyn. StatsDialog - - - - + + + + Statistics Statistik - - + + Project Projekt - + Project: Projekt: - + Paths: Sökvägar: - + Include paths: Include sökvägar: - + Defines: Defines: - + Undefines: - - + + Previous Scan Föregående analys - + Path Selected: Vald sökväg: - + Number of Files Scanned: Antal analyserade filer: - + Scan Duration: Analys tid: - + Errors: Fel: - + Warnings: Varningar: - + Stylistic warnings: Stil varningar: - + Portability warnings: Portabilitets varningar: - + Performance issues: Prestanda varningar: - + Information messages: Informations meddelanden: - + History Historik - + File: Fil: - + Copy to Clipboard Kopiera - + Pdf Export Pdf Export - + 1 day 1 dag - + %1 days %1 dagar - + 1 hour 1 timme - + %1 hours %1 timmar - + 1 minute 1 minut - + %1 minutes %1 minuter - + 1 second 1 sekund - + %1 seconds %1 sekunder - + 0.%1 seconds 0.%1 sekunder - + and och - + Export PDF Exportera PDF - + Project Settings Projekt inställningar - + Paths Sökvägar - + Include paths Include sökvägar - + Defines Definitioner - + Undefines - + Path selected Vald sökväg - + Number of files scanned Antal analyserade filer - + Scan duration Tid - - + + Errors Fel - + File: Fil: - + No cppcheck build dir Ingen Cppcheck build dir - - + + Warnings Varningar - - + + Style warnings Stil varningar - - + + Portability warnings Portabilitetsvarningar - - + + Performance warnings Prestanda varningar - - + + Information messages Informationsmeddelanden diff --git a/gui/cppcheck_zh_CN.ts b/gui/cppcheck_zh_CN.ts index 94eed7400..dd4f75e55 100644 --- a/gui/cppcheck_zh_CN.ts +++ b/gui/cppcheck_zh_CN.ts @@ -62,12 +62,12 @@ of the GNU General Public License version 3 ApplicationDialog - + Add an application 添加应用程序 - + Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application. The following texts in parameters are replaced with appropriate values when application is executed: @@ -92,42 +92,42 @@ Parameters: -l(line) (file) 参数: -l(line) (file) - + &Name: 名称(&N): - + &Executable: 可执行文件(&E): - + &Parameters: 参数(&P): - + Browse 浏览 - + Executable files (*.exe);;All files(*.*) 可执行文件(*.exe);;所有文件(*.*) - + Select viewer application 选择查看应用程序 - + Cppcheck Cppcheck - + You must specify a name, a path and optionally parameters for the application! 你必须为应用程序指定名称、路径以及可选参数! @@ -135,18 +135,18 @@ Parameters: -l(line) (file) FileViewDialog - + Could not find the file: %1 无法找到文件: %1 - - + + Cppcheck Cppcheck - + Could not read the file: %1 无法读取文件: %1 @@ -495,18 +495,18 @@ Parameters: -l(line) (file) - - - - - - - - - - - - + + + + + + + + + + + + Cppcheck Cppcheck @@ -685,8 +685,8 @@ Parameters: -l(line) (file) 显示便条(&C)... - - + + Information 信息 @@ -1084,7 +1084,7 @@ Parameters: -l(line) (file) C++20 - + There was a problem with loading the editor application settings. This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly. @@ -1097,7 +1097,7 @@ This is probably because the settings were changed between the Cppcheck versions 未发现适合检查的文件! - + You must close the project file before selecting new files or directories! 在选择新的文件或目录之前,你必须先关闭此项目文件! @@ -1106,8 +1106,8 @@ This is probably because the settings were changed between the Cppcheck versions 选择目录来检查 - - + + Quick Filter: 快速滤器: @@ -1116,12 +1116,12 @@ This is probably because the settings were changed between the Cppcheck versions 选择要检查的文件 - + Select configuration 选择配置 - + Found project file: %1 Do you want to load this project file instead? @@ -1138,71 +1138,71 @@ Do you want to proceed checking without using any of these project files? - + The library '%1' contains unknown elements: %2 库 '%1' 包含未知元素: %2 - + File not found 文件未找到 - + Bad XML 无效的 XML - + Missing attribute 缺失属性 - + Bad attribute value 无效的属性值 - + Unsupported format 不支持的格式 - + Duplicate platform type 重复的平台类型 - + Platform type redefined 平台类型重定义 - + Unknown element 位置元素 - + Unknown issue 未知问题 - + Failed to load the selected library '%1'. %2 选择的库 '%1' 加载失败。 %2 - + Error 错误 - + Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured. 加载 %1 失败。您的 Cppcheck 安装已损坏。您可以在命令行添加 --data-dir=<目录> 参数来指定文件位置。请注意,'--data-dir' 参数应当由安装脚本使用,因此,当使用此参数时,GUI不会启动,所发生的一切只是配置了设置。 @@ -1215,13 +1215,13 @@ Opening a new XML file will clear current results.Do you want to proceed? - - + + XML files (*.xml) XML 文件(*.xml) - + Open the report file 打开报告文件 @@ -1234,12 +1234,12 @@ Do you want to stop the checking and exit Cppcheck? 你是否需要停止检查并退出 Cppcheck? - + License 许可证 - + Authors 作者 @@ -1249,7 +1249,7 @@ Do you want to stop the checking and exit Cppcheck? XML 文件版本 2 (*.xml);;XML 文件版本 1 (*.xml);; 文本文件(*.txt);; CSV 文件(*.csv) - + Save the report file 保存报告文件 @@ -1262,12 +1262,12 @@ Do you want to stop the checking and exit Cppcheck? XML 文件版本 2 (*.xml) - + Text files (*.txt) 文本文件(*.txt) - + CSV files (*.csv) CSV 文件(*.csv) @@ -1288,65 +1288,65 @@ The user interface language has been reset to English. Open the Preferences-dial 用户界面语言已被重置为英语。打开“首选项”对话框,选择任何可用的语言。 - + Project files (*.cppcheck);;All files(*.*) 项目文件(*.cppcheck);;所有文件(*.*) - + Select Project File 选择项目文件 - - - - + + + + Project: 项目: - + No suitable files found to analyze! 没有找到合适的文件来分析! - + C/C++ Source C/C++ 源码 - + Compile database Compile database - + Visual Studio Visual Studio - + Borland C++ Builder 6 Borland C++ Builder 6 - + Select files to analyze 选择要分析的文件 - + Select directory to analyze 选择要分析的目录 - + Select the configuration that will be analyzed 选择要分析的配置 - + Found project files from the directory. Do you want to proceed analysis without using any of these project files? @@ -1355,7 +1355,7 @@ Do you want to proceed analysis without using any of these project files? - + Current results will be cleared. Opening a new XML file will clear current results. @@ -1366,7 +1366,7 @@ Do you want to proceed? 你想继续吗? - + Analyzer is running. Do you want to stop the analysis and exit Cppcheck? @@ -1375,42 +1375,42 @@ Do you want to stop the analysis and exit Cppcheck? 您想停止分析并退出 Cppcheck 吗? - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML 文件 (*.xml);;文本文件 (*.txt);;CSV 文件 (*.csv) - + Build dir '%1' does not exist, create it? 构建文件夹 '%1' 不能存在,创建它吗? - + To check the project using addons, you need a build directory. 要使用插件检查项目,您需要一个构建目录。 - + Failed to import '%1', analysis is stopped 导入 '%1' 失败,分析已停止 - + Project files (*.cppcheck) 项目文件 (*.cppcheck) - + Select Project Filename 选择项目文件名 - + No project file loaded 项目文件未加载 - + The project file %1 @@ -1562,7 +1562,7 @@ Options: ProjectFile - + Project File 项目文件 @@ -1571,18 +1571,18 @@ Options: 项目 - + Paths and Defines 路径和定义 - + Import Project (Visual studio / compile database/ Borland C++ Builder 6) Import Project (Visual studio / compile database) 导入项目 (Visual studio / compile database/ Borland C++ Builder 6) - + Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int Defines must be separated by a semicolon ';' 定义必须用分号分隔。例如:DEF1;DEF2=5;DEF3=int @@ -1593,161 +1593,161 @@ Options: 根目录: - + Note: Put your own custom .cfg files in the same folder as the project file. You should see them above. 注意:把你自己的 .cfg 文件放在和项目文件相同的文件夹中。你应该在上面看到它们。 - + If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings. 如果添加了标记,您将能够右键单击警告并设置其中一个标记。您可以手动对警告进行分类。 - + Exclude source files 排除源文件 - + Exclude folder... 排除文件夹... - + Exclude file... 排除文件... - + MISRA C 2012 MISRA C 2012 - + MISRA rule texts MISRA 规则文本 - + <html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html> <html><head/><body><p>从 MISRA C 2012 PDF 的附录 A &quot;指南摘要&quot; 复制/粘贴文本到一个文本文件。</p></body></html> - + ... ... - + <html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html> <html><head/><body><p>您有一个选择:</p><p> * 分析所有的 Debug 和 Release 配置</p><p> * 只分析第一个匹配的 Debug 配置</p><p><br/></p></body></html> - - + + Browse... 浏览... - + Analyze all Visual Studio configurations 分析全部 Visual Studio 配置 - + Selected VS Configurations 已选择的 VS 配置 - + Paths: 路径: - - + + Add... 添加... - - - + + + Edit 编辑 - - - - + + + + Remove 移除 - + Undefines: 未定义: - + Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3 未定义必须用分号分隔。例如:UNDEF1;UNDEF2;UNDEF3 - + Include Paths: 包含目录: - + Types and Functions 类型和函数 - - + + Analysis 分析 - + This is a workfolder that Cppcheck will use for various purposes. 这是一个 Cppcheck 将用于各种目的的工作文件夹。 - + Parser 解析器 - + Cppcheck (built in) Cppcheck (内建) - + Check that each class has a safe public interface 检查每个类是否有一个安全的公共接口 - + Limit analysis 极限分析 - + Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates) Check code in unused templates (slower and less accurate analysis) 检查未使用模板中的代码(正常情况下应该是打开,但理论上可以忽略未使用模板中的警告) - + Max CTU depth 最大 CTU 深度 - + External tools 外部工具 @@ -1760,77 +1760,77 @@ Options: Include 目录: - + Up 向上 - + Down 向下 - + Platform 平台 - + Clang (experimental) Clang (实验性的) - + Normal analysis -- Avoid false positives. 常规分析 -- 避免误报。 - + Bug hunting -- Generates mostly noise. The goal is to be "soundy" and detect most bugs. 错误搜寻 -- 生成几乎所有提示。其目的是为了检测出大多数错误并使代码更加 "牢固"。 - + If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value. 如果你想要设计你的类尽可能的灵活和健壮,那么公共接口必须非常健壮。Cppcheck 将假设参数可以取 *任何* 值。 - + Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF) 检查头文件中的代码(通常应该是打开的。如果您想要一个有限的快速分析,那么关掉它)) - + Max recursion in template instantiation 模板实例化中的最大递归 - + Warning options 警告选项 - + Root path: 根路径: - + Filepaths in warnings will be relative to this path 警告中的文件路径将相对于此路径 - + Warning tags (separated by semicolon) 警告标志(用分号隔开) - + Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc) Cppcheck 构建目录 (整个程序分析、增量分析、统计数据等) - + Libraries @@ -1839,58 +1839,58 @@ Options: 排除 - + Suppressions 抑制 - + Add 添加 - - + + Addons 插件 - + Note: Addons require <a href="https://www.python.org/">Python</a> being installed. 注意:插件需要安装 <a href="https://www.python.org/">Python</a>。 - + Y2038 Y2038 - + Thread safety 线程安全 - + Coding standards 编码标准 - + CERT CERT - + Clang analyzer Clang analyzer - + Clang-tidy Clang-tidy - + Defines: 定义: @@ -1898,82 +1898,82 @@ Options: ProjectFileDialog - + Project file: %1 项目文件: %1 - + Select Cppcheck build dir 选择 Cppcheck 构建目录 - + Select include directory 选择 Include 目录 - + Select a directory to check 选择一个检查目录 - + (no rule texts file) (无规则文本文件) - + Clang-tidy (not found) Clang-tidy (未找到) - + Visual Studio Visual Studio - + Compile database Compile database - + Borland C++ Builder 6 Borland C++ Builder 6 - + Import Project 导入项目 - + Select directory to ignore 选择忽略的目录 - + Source files 源文件 - + All files 全部文件 - + Exclude file 排除文件 - + Select MISRA rule texts file 选择 MISRA 规则文本文件 - + MISRA rule texts file (%1) MISRA 规则文本文件 (%1) @@ -2013,7 +2013,7 @@ Options: 第%1行:在 "%3" 中缺失的必选属性 "%2" - + (Not found) (未找到) @@ -2452,52 +2452,52 @@ Please select the directory where file is located. 未发现错误,没有结果可保存。 - + Failed to save the report. 保存报告失败。 - + Print Report 打印报告 - + No errors found, nothing to print. 没有错误发现,没有可打印内容。 - + %p% (%1 of %2 files checked) %p% (%2 个文件已检查 %1 个) - - + + 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. 读取报告失败。 - + XML format version 1 is no longer supported. 不再支持 XML 格式版本 1。 @@ -2510,32 +2510,32 @@ To toggle what kind of errors are shown, open view menu. 消息 - + First included by 首次包含于 - + Id Id - + Bug hunting analysis is incomplete 错误搜寻分析未完成 - + Clear Log 清空日志 - + Copy this Log entry 复制此日志条目 - + Copy complete Log 复制完整日志 @@ -2787,47 +2787,47 @@ To toggle what kind of errors are shown, open view menu. SettingsDialog - + N/A N/A - + The executable file "%1" is not available 可执行文件 "%1" 不可用 - + Add a new application 添加一个新的应用程序 - + Modify an application 修改一个应用程序 - + [Default] [默认] - + [Default] [默认] - + Select python binary 选择 python 二进制 - + Select MISRA File 选择 MISRA 文件 - + Select clang path 选择 clang 路径 @@ -2839,253 +2839,253 @@ To toggle what kind of errors are shown, open view menu. StatsDialog - - - - + + + + Statistics 统计 - - + + Project 项目 - + Project: 项目: - + Paths: 路径: - + Include paths: 包含路径: - + Defines: 定义: - + Undefines: 未定义: - - + + Previous Scan 上一次扫描 - + Path Selected: 选中的路径: - + Number of Files Scanned: 扫描的文件数: - + Scan Duration: 扫描时间: - + Errors: 错误: - + Warnings: 警告: - + Stylistic warnings: Stylistic 警告: - + Portability warnings: 可移植性警告: - + Performance issues: 性能警告: - + Information messages: 信息: - + History 历史 - + File: 文件: - + Copy to Clipboard 复制到剪贴板 - + Pdf Export 导出 PDF - + 1 day 1 天 - + %1 days %1 天 - + 1 hour 1 小时 - + %1 hours %1 小时 - + 1 minute 1 分钟 - + %1 minutes %1 分钟 - + 1 second 1 秒 - + %1 seconds %1 秒 - + 0.%1 seconds 0.%1 秒 - + and - + Export PDF 导出 PDF - + Project Settings 项目设置 - + Paths 路径 - + Include paths 包含路径 - + Defines 定义 - + Undefines 未定义 - + Path selected 选中的路径 - + Number of files scanned 扫描的文件数 - + Scan duration 扫描时间 - - + + Errors 错误 - + File: 文件: - + No cppcheck build dir 没有 cppcheck 构建目录 - - + + Warnings 警告 - - + + Style warnings 风格警告 - - + + Portability warnings 移植可能性警告 - - + + Performance warnings 性能警告 - - + + Information messages 信息 diff --git a/gui/file.ui b/gui/fileview.ui similarity index 100% rename from gui/file.ui rename to gui/fileview.ui diff --git a/gui/fileviewdialog.cpp b/gui/fileviewdialog.cpp index adeb11f8f..d80b8dfab 100644 --- a/gui/fileviewdialog.cpp +++ b/gui/fileviewdialog.cpp @@ -23,17 +23,25 @@ #include #include +#include "ui_fileview.h" + FileViewDialog::FileViewDialog(const QString &file, const QString &title, QWidget *parent) : QDialog(parent) + , mUI(new Ui::Fileview) { - mUI.setupUi(this); + mUI->setupUi(this); setWindowTitle(title); - connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(accept())); - loadTextFile(file, mUI.mText); + connect(mUI->mButtons, SIGNAL(accepted()), this, SLOT(accept())); + loadTextFile(file, mUI->mText); +} + +FileViewDialog::~FileViewDialog() +{ + delete mUI; } void FileViewDialog::loadTextFile(const QString &filename, QTextEdit *edit) diff --git a/gui/fileviewdialog.h b/gui/fileviewdialog.h index 6d468399c..7c5d48f91 100644 --- a/gui/fileviewdialog.h +++ b/gui/fileviewdialog.h @@ -19,13 +19,14 @@ #ifndef FILEVIEW_DIALOG_H #define FILEVIEW_DIALOG_H -#include "ui_file.h" - #include #include class QWidget; class QTextEdit; +namespace Ui { + class Fileview; +} /// @addtogroup GUI /// @{ @@ -44,6 +45,7 @@ public: const QString &title, QWidget *parent = nullptr); + ~FileViewDialog() override; protected: @@ -55,7 +57,7 @@ protected: */ void loadTextFile(const QString &filename, QTextEdit *edit); - Ui::Fileview mUI; + Ui::Fileview* mUI; }; /// @} #endif // FILEVIEW_DIALOG_H diff --git a/gui/gui.pro b/gui/gui.pro index 51d2cac1b..f04127f6d 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -70,16 +70,16 @@ win32 { RESOURCES = gui.qrc FORMS = about.ui \ - application.ui \ - file.ui \ + applicationdialog.ui \ + fileview.ui \ functioncontractdialog.ui \ helpdialog.ui \ mainwindow.ui \ - projectfiledialog.ui \ + projectfile.ui \ resultsview.ui \ scratchpad.ui \ settings.ui \ - stats.ui \ + statsdialog.ui \ librarydialog.ui \ libraryaddfunctiondialog.ui \ libraryeditargdialog.ui \ diff --git a/gui/helpdialog.cpp b/gui/helpdialog.cpp index 110d4769c..6a657dd95 100644 --- a/gui/helpdialog.cpp +++ b/gui/helpdialog.cpp @@ -18,10 +18,10 @@ #include "helpdialog.h" -#include "ui_helpdialog.h" - #include "common.h" +#include "ui_helpdialog.h" + #include #include #include diff --git a/gui/librarydialog.cpp b/gui/librarydialog.cpp index a6c60494b..a0d0c9f4a 100644 --- a/gui/librarydialog.cpp +++ b/gui/librarydialog.cpp @@ -18,13 +18,13 @@ #include "librarydialog.h" -#include "ui_librarydialog.h" - #include "common.h" #include "libraryaddfunctiondialog.h" #include "libraryeditargdialog.h" #include "path.h" +#include "ui_librarydialog.h" + #include #include #include diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index a70df30f0..2915d9982 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -39,9 +39,12 @@ #include "translationhandler.h" #include "variablecontractsdialog.h" +#include "ui_mainwindow.h" + #include #include #include +#include #include #include #include @@ -58,6 +61,7 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : mSettings(settings), mApplications(new ApplicationList(this)), mTranslation(th), + mUI(new Ui::MainWindow), mScratchPad(nullptr), mProjectFile(nullptr), mPlatformActions(new QActionGroup(this)), @@ -67,9 +71,9 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : mExiting(false), mIsLogfileLoaded(false) { - mUI.setupUi(this); + mUI->setupUi(this); mThread = new ThreadHandler(this); - mUI.mResults->initialize(mSettings, mApplications, mThread); + mUI->mResults->initialize(mSettings, mApplications, mThread); // Filter timer to delay filtering results slightly while typing mFilterTimer = new QTimer(this); @@ -78,82 +82,82 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : connect(mFilterTimer, &QTimer::timeout, this, &MainWindow::filterResults); // "Filter" toolbar - mLineEditFilter = new QLineEdit(mUI.mToolBarFilter); + mLineEditFilter = new QLineEdit(mUI->mToolBarFilter); mLineEditFilter->setPlaceholderText(tr("Quick Filter:")); mLineEditFilter->setClearButtonEnabled(true); - mUI.mToolBarFilter->addWidget(mLineEditFilter); + mUI->mToolBarFilter->addWidget(mLineEditFilter); connect(mLineEditFilter, SIGNAL(textChanged(const QString&)), mFilterTimer, SLOT(start())); connect(mLineEditFilter, &QLineEdit::returnPressed, this, &MainWindow::filterResults); - connect(mUI.mActionPrint, SIGNAL(triggered()), mUI.mResults, SLOT(print())); - connect(mUI.mActionPrintPreview, SIGNAL(triggered()), mUI.mResults, SLOT(printPreview())); - connect(mUI.mActionQuit, &QAction::triggered, this, &MainWindow::close); - connect(mUI.mActionAnalyzeFiles, &QAction::triggered, this, &MainWindow::analyzeFiles); - connect(mUI.mActionAnalyzeDirectory, &QAction::triggered, this, &MainWindow::analyzeDirectory); - connect(mUI.mActionSettings, &QAction::triggered, this, &MainWindow::programSettings); - connect(mUI.mActionClearResults, &QAction::triggered, this, &MainWindow::clearResults); - connect(mUI.mActionOpenXML, &QAction::triggered, this, &MainWindow::openResults); + connect(mUI->mActionPrint, SIGNAL(triggered()), mUI->mResults, SLOT(print())); + connect(mUI->mActionPrintPreview, SIGNAL(triggered()), mUI->mResults, SLOT(printPreview())); + connect(mUI->mActionQuit, &QAction::triggered, this, &MainWindow::close); + connect(mUI->mActionAnalyzeFiles, &QAction::triggered, this, &MainWindow::analyzeFiles); + connect(mUI->mActionAnalyzeDirectory, &QAction::triggered, this, &MainWindow::analyzeDirectory); + connect(mUI->mActionSettings, &QAction::triggered, this, &MainWindow::programSettings); + connect(mUI->mActionClearResults, &QAction::triggered, this, &MainWindow::clearResults); + connect(mUI->mActionOpenXML, &QAction::triggered, this, &MainWindow::openResults); - connect(mUI.mActionShowStyle, &QAction::toggled, this, &MainWindow::showStyle); - connect(mUI.mActionShowErrors, &QAction::toggled, this, &MainWindow::showErrors); - connect(mUI.mActionShowWarnings, &QAction::toggled, this, &MainWindow::showWarnings); - connect(mUI.mActionShowPortability, &QAction::toggled, this, &MainWindow::showPortability); - connect(mUI.mActionShowPerformance, &QAction::toggled, this, &MainWindow::showPerformance); - connect(mUI.mActionShowInformation, &QAction::toggled, this, &MainWindow::showInformation); - connect(mUI.mActionShowCppcheck, &QAction::toggled, mUI.mResults, &ResultsView::showCppcheckResults); - connect(mUI.mActionShowClang, &QAction::toggled, mUI.mResults, &ResultsView::showClangResults); - connect(mUI.mActionCheckAll, &QAction::triggered, this, &MainWindow::checkAll); - connect(mUI.mActionUncheckAll, &QAction::triggered, this, &MainWindow::uncheckAll); - connect(mUI.mActionCollapseAll, &QAction::triggered, mUI.mResults, &ResultsView::collapseAllResults); - connect(mUI.mActionExpandAll, &QAction::triggered, mUI.mResults, &ResultsView::expandAllResults); - connect(mUI.mActionShowHidden, &QAction::triggered, mUI.mResults, &ResultsView::showHiddenResults); - connect(mUI.mActionViewStats, &QAction::triggered, this, &MainWindow::showStatistics); - connect(mUI.mActionLibraryEditor, &QAction::triggered, this, &MainWindow::showLibraryEditor); + connect(mUI->mActionShowStyle, &QAction::toggled, this, &MainWindow::showStyle); + connect(mUI->mActionShowErrors, &QAction::toggled, this, &MainWindow::showErrors); + connect(mUI->mActionShowWarnings, &QAction::toggled, this, &MainWindow::showWarnings); + connect(mUI->mActionShowPortability, &QAction::toggled, this, &MainWindow::showPortability); + connect(mUI->mActionShowPerformance, &QAction::toggled, this, &MainWindow::showPerformance); + connect(mUI->mActionShowInformation, &QAction::toggled, this, &MainWindow::showInformation); + connect(mUI->mActionShowCppcheck, &QAction::toggled, mUI->mResults, &ResultsView::showCppcheckResults); + connect(mUI->mActionShowClang, &QAction::toggled, mUI->mResults, &ResultsView::showClangResults); + connect(mUI->mActionCheckAll, &QAction::triggered, this, &MainWindow::checkAll); + connect(mUI->mActionUncheckAll, &QAction::triggered, this, &MainWindow::uncheckAll); + connect(mUI->mActionCollapseAll, &QAction::triggered, mUI->mResults, &ResultsView::collapseAllResults); + connect(mUI->mActionExpandAll, &QAction::triggered, mUI->mResults, &ResultsView::expandAllResults); + connect(mUI->mActionShowHidden, &QAction::triggered, mUI->mResults, &ResultsView::showHiddenResults); + connect(mUI->mActionViewStats, &QAction::triggered, this, &MainWindow::showStatistics); + connect(mUI->mActionLibraryEditor, &QAction::triggered, this, &MainWindow::showLibraryEditor); - connect(mUI.mActionReanalyzeModified, &QAction::triggered, this, &MainWindow::reAnalyzeModified); - connect(mUI.mActionReanalyzeAll, &QAction::triggered, this, &MainWindow::reAnalyzeAll); - connect(mUI.mActionCheckLibrary, &QAction::triggered, this, &MainWindow::checkLibrary); - connect(mUI.mActionCheckConfiguration, &QAction::triggered, this, &MainWindow::checkConfiguration); + connect(mUI->mActionReanalyzeModified, &QAction::triggered, this, &MainWindow::reAnalyzeModified); + connect(mUI->mActionReanalyzeAll, &QAction::triggered, this, &MainWindow::reAnalyzeAll); + connect(mUI->mActionCheckLibrary, &QAction::triggered, this, &MainWindow::checkLibrary); + connect(mUI->mActionCheckConfiguration, &QAction::triggered, this, &MainWindow::checkConfiguration); - connect(mUI.mActionStop, &QAction::triggered, this, &MainWindow::stopAnalysis); - connect(mUI.mActionSave, &QAction::triggered, this, &MainWindow::save); + connect(mUI->mActionStop, &QAction::triggered, this, &MainWindow::stopAnalysis); + connect(mUI->mActionSave, &QAction::triggered, this, &MainWindow::save); // About menu - connect(mUI.mActionAbout, &QAction::triggered, this, &MainWindow::about); - connect(mUI.mActionLicense, &QAction::triggered, this, &MainWindow::showLicense); + connect(mUI->mActionAbout, &QAction::triggered, this, &MainWindow::about); + connect(mUI->mActionLicense, &QAction::triggered, this, &MainWindow::showLicense); // View > Toolbar menu - connect(mUI.mActionToolBarMain, SIGNAL(toggled(bool)), this, SLOT(toggleMainToolBar())); - connect(mUI.mActionToolBarView, SIGNAL(toggled(bool)), this, SLOT(toggleViewToolBar())); - connect(mUI.mActionToolBarFilter, SIGNAL(toggled(bool)), this, SLOT(toggleFilterToolBar())); + connect(mUI->mActionToolBarMain, SIGNAL(toggled(bool)), this, SLOT(toggleMainToolBar())); + connect(mUI->mActionToolBarView, SIGNAL(toggled(bool)), this, SLOT(toggleViewToolBar())); + connect(mUI->mActionToolBarFilter, SIGNAL(toggled(bool)), this, SLOT(toggleFilterToolBar())); - connect(mUI.mActionAuthors, &QAction::triggered, this, &MainWindow::showAuthors); + connect(mUI->mActionAuthors, &QAction::triggered, this, &MainWindow::showAuthors); connect(mThread, &ThreadHandler::done, this, &MainWindow::analysisDone); - connect(mThread, &ThreadHandler::log, mUI.mResults, &ResultsView::log); - connect(mThread, &ThreadHandler::debugError, mUI.mResults, &ResultsView::debugError); - connect(mThread, &ThreadHandler::bughuntingReportLine, mUI.mResults, &ResultsView::bughuntingReportLine); - connect(mUI.mResults, &ResultsView::gotResults, this, &MainWindow::resultsAdded); - connect(mUI.mResults, &ResultsView::resultsHidden, mUI.mActionShowHidden, &QAction::setEnabled); - connect(mUI.mResults, &ResultsView::checkSelected, this, &MainWindow::performSelectedFilesCheck); - connect(mUI.mResults, &ResultsView::suppressIds, this, &MainWindow::suppressIds); - connect(mUI.mResults, &ResultsView::editFunctionContract, this, &MainWindow::editFunctionContract); - connect(mUI.mResults, &ResultsView::editVariableContract, this, &MainWindow::editVariableContract); - connect(mUI.mResults, &ResultsView::deleteFunctionContract, this, &MainWindow::deleteFunctionContract); - connect(mUI.mResults, &ResultsView::deleteVariableContract, this, &MainWindow::deleteVariableContract); - connect(mUI.mMenuView, &QMenu::aboutToShow, this, &MainWindow::aboutToShowViewMenu); + connect(mThread, &ThreadHandler::log, mUI->mResults, &ResultsView::log); + connect(mThread, &ThreadHandler::debugError, mUI->mResults, &ResultsView::debugError); + connect(mThread, &ThreadHandler::bughuntingReportLine, mUI->mResults, &ResultsView::bughuntingReportLine); + connect(mUI->mResults, &ResultsView::gotResults, this, &MainWindow::resultsAdded); + connect(mUI->mResults, &ResultsView::resultsHidden, mUI->mActionShowHidden, &QAction::setEnabled); + connect(mUI->mResults, &ResultsView::checkSelected, this, &MainWindow::performSelectedFilesCheck); + connect(mUI->mResults, &ResultsView::suppressIds, this, &MainWindow::suppressIds); + connect(mUI->mResults, &ResultsView::editFunctionContract, this, &MainWindow::editFunctionContract); + connect(mUI->mResults, &ResultsView::editVariableContract, this, &MainWindow::editVariableContract); + connect(mUI->mResults, &ResultsView::deleteFunctionContract, this, &MainWindow::deleteFunctionContract); + connect(mUI->mResults, &ResultsView::deleteVariableContract, this, &MainWindow::deleteVariableContract); + connect(mUI->mMenuView, &QMenu::aboutToShow, this, &MainWindow::aboutToShowViewMenu); // File menu - connect(mUI.mActionNewProjectFile, &QAction::triggered, this, &MainWindow::newProjectFile); - connect(mUI.mActionOpenProjectFile, &QAction::triggered, this, &MainWindow::openProjectFile); - connect(mUI.mActionShowScratchpad, &QAction::triggered, this, &MainWindow::showScratchpad); - connect(mUI.mActionCloseProjectFile, &QAction::triggered, this, &MainWindow::closeProjectFile); - connect(mUI.mActionEditProjectFile, &QAction::triggered, this, &MainWindow::editProjectFile); + connect(mUI->mActionNewProjectFile, &QAction::triggered, this, &MainWindow::newProjectFile); + connect(mUI->mActionOpenProjectFile, &QAction::triggered, this, &MainWindow::openProjectFile); + connect(mUI->mActionShowScratchpad, &QAction::triggered, this, &MainWindow::showScratchpad); + connect(mUI->mActionCloseProjectFile, &QAction::triggered, this, &MainWindow::closeProjectFile); + connect(mUI->mActionEditProjectFile, &QAction::triggered, this, &MainWindow::editProjectFile); - connect(mUI.mActionHelpContents, &QAction::triggered, this, &MainWindow::openHelpContents); + connect(mUI->mActionHelpContents, &QAction::triggered, this, &MainWindow::openHelpContents); loadSettings(); - mThread->initialize(mUI.mResults); + mThread->initialize(mUI->mResults); if (mProjectFile) formatAndSetTitle(tr("Project:") + ' ' + mProjectFile->getFilename()); else @@ -161,7 +165,7 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : enableCheckButtons(true); - mUI.mActionPrint->setShortcut(QKeySequence::Print); + mUI->mActionPrint->setShortcut(QKeySequence::Print); enableResultsButtons(); enableProjectOpenActions(true); enableProjectActions(false); @@ -175,7 +179,7 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : this, SLOT(openRecentProject())); } mRecentProjectActs[MaxRecentProjects] = nullptr; // The separator - mUI.mActionProjectMRU->setVisible(false); + mUI->mActionProjectMRU->setVisible(false); updateMRUMenuItems(); QStringList args = QCoreApplication::arguments(); @@ -185,8 +189,8 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : handleCLIParams(args); } - mUI.mActionCloseProjectFile->setEnabled(mProjectFile != nullptr); - mUI.mActionEditProjectFile->setEnabled(mProjectFile != nullptr); + mUI->mActionCloseProjectFile->setEnabled(mProjectFile != nullptr); + mUI->mActionEditProjectFile->setEnabled(mProjectFile != nullptr); for (int i = 0; i < mPlatforms.getCount(); i++) { Platform platform = mPlatforms.mPlatforms[i]; @@ -197,23 +201,23 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : action->setData(platform.mType); action->setCheckable(true); action->setActionGroup(mPlatformActions); - mUI.mMenuAnalyze->insertAction(mUI.mActionPlatforms, action); + mUI->mMenuAnalyze->insertAction(mUI->mActionPlatforms, action); connect(action, SIGNAL(triggered()), this, SLOT(selectPlatform())); } - mUI.mActionC89->setActionGroup(mCStandardActions); - mUI.mActionC99->setActionGroup(mCStandardActions); - mUI.mActionC11->setActionGroup(mCStandardActions); + mUI->mActionC89->setActionGroup(mCStandardActions); + mUI->mActionC99->setActionGroup(mCStandardActions); + mUI->mActionC11->setActionGroup(mCStandardActions); - mUI.mActionCpp03->setActionGroup(mCppStandardActions); - mUI.mActionCpp11->setActionGroup(mCppStandardActions); - mUI.mActionCpp14->setActionGroup(mCppStandardActions); - mUI.mActionCpp17->setActionGroup(mCppStandardActions); - mUI.mActionCpp20->setActionGroup(mCppStandardActions); + mUI->mActionCpp03->setActionGroup(mCppStandardActions); + mUI->mActionCpp11->setActionGroup(mCppStandardActions); + mUI->mActionCpp14->setActionGroup(mCppStandardActions); + mUI->mActionCpp17->setActionGroup(mCppStandardActions); + mUI->mActionCpp20->setActionGroup(mCppStandardActions); - mUI.mActionEnforceC->setActionGroup(mSelectLanguageActions); - mUI.mActionEnforceCpp->setActionGroup(mSelectLanguageActions); - mUI.mActionAutoDetectLanguage->setActionGroup(mSelectLanguageActions); + mUI->mActionEnforceC->setActionGroup(mSelectLanguageActions); + mUI->mActionEnforceCpp->setActionGroup(mSelectLanguageActions); + mUI->mActionAutoDetectLanguage->setActionGroup(mSelectLanguageActions); // For Windows platforms default to Win32 checked platform. // For other platforms default to unspecified/default which means the @@ -231,6 +235,7 @@ MainWindow::~MainWindow() { delete mProjectFile; delete mScratchPad; + delete mUI; } void MainWindow::handleCLIParams(const QStringList ¶ms) @@ -274,48 +279,48 @@ void MainWindow::loadSettings() mSettings->value(SETTINGS_WINDOW_HEIGHT, 600).toInt()); } - ShowTypes *types = mUI.mResults->getShowTypes(); - mUI.mActionShowStyle->setChecked(types->isShown(ShowTypes::ShowStyle)); - mUI.mActionShowErrors->setChecked(types->isShown(ShowTypes::ShowErrors)); - mUI.mActionShowWarnings->setChecked(types->isShown(ShowTypes::ShowWarnings)); - mUI.mActionShowPortability->setChecked(types->isShown(ShowTypes::ShowPortability)); - mUI.mActionShowPerformance->setChecked(types->isShown(ShowTypes::ShowPerformance)); - mUI.mActionShowInformation->setChecked(types->isShown(ShowTypes::ShowInformation)); - mUI.mActionShowCppcheck->setChecked(true); - mUI.mActionShowClang->setChecked(true); + ShowTypes *types = mUI->mResults->getShowTypes(); + mUI->mActionShowStyle->setChecked(types->isShown(ShowTypes::ShowStyle)); + mUI->mActionShowErrors->setChecked(types->isShown(ShowTypes::ShowErrors)); + mUI->mActionShowWarnings->setChecked(types->isShown(ShowTypes::ShowWarnings)); + mUI->mActionShowPortability->setChecked(types->isShown(ShowTypes::ShowPortability)); + mUI->mActionShowPerformance->setChecked(types->isShown(ShowTypes::ShowPerformance)); + mUI->mActionShowInformation->setChecked(types->isShown(ShowTypes::ShowInformation)); + mUI->mActionShowCppcheck->setChecked(true); + mUI->mActionShowClang->setChecked(true); Standards standards; standards.setC(mSettings->value(SETTINGS_STD_C, QString()).toString().toStdString()); - mUI.mActionC89->setChecked(standards.c == Standards::C89); - mUI.mActionC99->setChecked(standards.c == Standards::C99); - mUI.mActionC11->setChecked(standards.c == Standards::C11); + mUI->mActionC89->setChecked(standards.c == Standards::C89); + mUI->mActionC99->setChecked(standards.c == Standards::C99); + mUI->mActionC11->setChecked(standards.c == Standards::C11); standards.setCPP(mSettings->value(SETTINGS_STD_CPP, QString()).toString().toStdString()); - mUI.mActionCpp03->setChecked(standards.cpp == Standards::CPP03); - mUI.mActionCpp11->setChecked(standards.cpp == Standards::CPP11); - mUI.mActionCpp14->setChecked(standards.cpp == Standards::CPP14); - mUI.mActionCpp17->setChecked(standards.cpp == Standards::CPP17); - mUI.mActionCpp20->setChecked(standards.cpp == Standards::CPP20); + mUI->mActionCpp03->setChecked(standards.cpp == Standards::CPP03); + mUI->mActionCpp11->setChecked(standards.cpp == Standards::CPP11); + mUI->mActionCpp14->setChecked(standards.cpp == Standards::CPP14); + mUI->mActionCpp17->setChecked(standards.cpp == Standards::CPP17); + mUI->mActionCpp20->setChecked(standards.cpp == Standards::CPP20); // Main window settings const bool showMainToolbar = mSettings->value(SETTINGS_TOOLBARS_MAIN_SHOW, true).toBool(); - mUI.mActionToolBarMain->setChecked(showMainToolbar); - mUI.mToolBarMain->setVisible(showMainToolbar); + mUI->mActionToolBarMain->setChecked(showMainToolbar); + mUI->mToolBarMain->setVisible(showMainToolbar); const bool showViewToolbar = mSettings->value(SETTINGS_TOOLBARS_VIEW_SHOW, true).toBool(); - mUI.mActionToolBarView->setChecked(showViewToolbar); - mUI.mToolBarView->setVisible(showViewToolbar); + mUI->mActionToolBarView->setChecked(showViewToolbar); + mUI->mToolBarView->setVisible(showViewToolbar); const bool showFilterToolbar = mSettings->value(SETTINGS_TOOLBARS_FILTER_SHOW, true).toBool(); - mUI.mActionToolBarFilter->setChecked(showFilterToolbar); - mUI.mToolBarFilter->setVisible(showFilterToolbar); + mUI->mActionToolBarFilter->setChecked(showFilterToolbar); + mUI->mToolBarFilter->setVisible(showFilterToolbar); Settings::Language enforcedLanguage = (Settings::Language)mSettings->value(SETTINGS_ENFORCED_LANGUAGE, 0).toInt(); if (enforcedLanguage == Settings::CPP) - mUI.mActionEnforceCpp->setChecked(true); + mUI->mActionEnforceCpp->setChecked(true); else if (enforcedLanguage == Settings::C) - mUI.mActionEnforceC->setChecked(true); + mUI->mActionEnforceC->setChecked(true); else - mUI.mActionAutoDetectLanguage->setChecked(true); + mUI->mActionAutoDetectLanguage->setChecked(true); bool succeeded = mApplications->loadSettings(); if (!succeeded) { @@ -356,39 +361,39 @@ void MainWindow::saveSettings() const mSettings->setValue(SETTINGS_WINDOW_MAXIMIZED, isMaximized()); // Show * states - mSettings->setValue(SETTINGS_SHOW_STYLE, mUI.mActionShowStyle->isChecked()); - mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI.mActionShowErrors->isChecked()); - mSettings->setValue(SETTINGS_SHOW_WARNINGS, mUI.mActionShowWarnings->isChecked()); - mSettings->setValue(SETTINGS_SHOW_PORTABILITY, mUI.mActionShowPortability->isChecked()); - mSettings->setValue(SETTINGS_SHOW_PERFORMANCE, mUI.mActionShowPerformance->isChecked()); - mSettings->setValue(SETTINGS_SHOW_INFORMATION, mUI.mActionShowInformation->isChecked()); + mSettings->setValue(SETTINGS_SHOW_STYLE, mUI->mActionShowStyle->isChecked()); + mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI->mActionShowErrors->isChecked()); + mSettings->setValue(SETTINGS_SHOW_WARNINGS, mUI->mActionShowWarnings->isChecked()); + mSettings->setValue(SETTINGS_SHOW_PORTABILITY, mUI->mActionShowPortability->isChecked()); + mSettings->setValue(SETTINGS_SHOW_PERFORMANCE, mUI->mActionShowPerformance->isChecked()); + mSettings->setValue(SETTINGS_SHOW_INFORMATION, mUI->mActionShowInformation->isChecked()); - if (mUI.mActionC89->isChecked()) + if (mUI->mActionC89->isChecked()) mSettings->setValue(SETTINGS_STD_C, "C89"); - if (mUI.mActionC99->isChecked()) + if (mUI->mActionC99->isChecked()) mSettings->setValue(SETTINGS_STD_C, "C99"); - if (mUI.mActionC11->isChecked()) + if (mUI->mActionC11->isChecked()) mSettings->setValue(SETTINGS_STD_C, "C11"); - if (mUI.mActionCpp03->isChecked()) + if (mUI->mActionCpp03->isChecked()) mSettings->setValue(SETTINGS_STD_CPP, "C++03"); - if (mUI.mActionCpp11->isChecked()) + if (mUI->mActionCpp11->isChecked()) mSettings->setValue(SETTINGS_STD_CPP, "C++11"); - if (mUI.mActionCpp14->isChecked()) + if (mUI->mActionCpp14->isChecked()) mSettings->setValue(SETTINGS_STD_CPP, "C++14"); - if (mUI.mActionCpp17->isChecked()) + if (mUI->mActionCpp17->isChecked()) mSettings->setValue(SETTINGS_STD_CPP, "C++17"); - if (mUI.mActionCpp20->isChecked()) + if (mUI->mActionCpp20->isChecked()) mSettings->setValue(SETTINGS_STD_CPP, "C++20"); // Main window settings - mSettings->setValue(SETTINGS_TOOLBARS_MAIN_SHOW, mUI.mToolBarMain->isVisible()); - mSettings->setValue(SETTINGS_TOOLBARS_VIEW_SHOW, mUI.mToolBarView->isVisible()); - mSettings->setValue(SETTINGS_TOOLBARS_FILTER_SHOW, mUI.mToolBarFilter->isVisible()); + mSettings->setValue(SETTINGS_TOOLBARS_MAIN_SHOW, mUI->mToolBarMain->isVisible()); + mSettings->setValue(SETTINGS_TOOLBARS_VIEW_SHOW, mUI->mToolBarView->isVisible()); + mSettings->setValue(SETTINGS_TOOLBARS_FILTER_SHOW, mUI->mToolBarFilter->isVisible()); - if (mUI.mActionEnforceCpp->isChecked()) + if (mUI->mActionEnforceCpp->isChecked()) mSettings->setValue(SETTINGS_ENFORCED_LANGUAGE, Settings::CPP); - else if (mUI.mActionEnforceC->isChecked()) + else if (mUI->mActionEnforceC->isChecked()) mSettings->setValue(SETTINGS_ENFORCED_LANGUAGE, Settings::C); else mSettings->setValue(SETTINGS_ENFORCED_LANGUAGE, Settings::None); @@ -399,7 +404,7 @@ void MainWindow::saveSettings() const mSettings->setValue(SETTINGS_OPEN_PROJECT, mProjectFile ? mProjectFile->getFilename() : QString()); - mUI.mResults->saveSettings(mSettings); + mUI->mResults->saveSettings(mSettings); } void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLibrary, const bool checkConfiguration) @@ -422,10 +427,10 @@ void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLibrary, cons enableProjectActions(false); } - mUI.mResults->clear(true); + mUI->mResults->clear(true); mThread->clearFiles(); - mUI.mResults->checkingStarted(p.fileSettings.size()); + mUI->mResults->checkingStarted(p.fileSettings.size()); QDir inf(mCurrentDirectory); const QString checkPath = inf.canonicalPath(); @@ -433,7 +438,7 @@ void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLibrary, cons checkLockDownUI(); // lock UI while checking - mUI.mResults->setCheckDirectory(checkPath); + mUI->mResults->setCheckDirectory(checkPath); Settings checkSettings = getCppcheckSettings(); checkSettings.force = false; checkSettings.checkLibrary = checkLibrary; @@ -476,7 +481,7 @@ void MainWindow::doAnalyzeFiles(const QStringList &files, const bool checkLibrar } QStringList fileNames = pathList.getFileList(); - mUI.mResults->clear(true); + mUI->mResults->clear(true); mThread->clearFiles(); if (fileNames.isEmpty()) { @@ -489,7 +494,7 @@ void MainWindow::doAnalyzeFiles(const QStringList &files, const bool checkLibrar return; } - mUI.mResults->checkingStarted(fileNames.count()); + mUI->mResults->checkingStarted(fileNames.count()); mThread->setFiles(fileNames); if (mProjectFile && !checkConfiguration) @@ -501,7 +506,7 @@ void MainWindow::doAnalyzeFiles(const QStringList &files, const bool checkLibrar checkLockDownUI(); // lock UI while checking - mUI.mResults->setCheckDirectory(checkPath); + mUI->mResults->setCheckDirectory(checkPath); Settings checkSettings = getCppcheckSettings(); checkSettings.checkLibrary = checkLibrary; checkSettings.checkConfiguration = checkConfiguration; @@ -529,13 +534,13 @@ void MainWindow::analyzeCode(const QString& code, const QString& filename) ThreadResult result; result.setFiles(QStringList(filename)); connect(&result, SIGNAL(progress(int,const QString&)), - mUI.mResults, SLOT(progress(int,const QString&))); + mUI->mResults, SLOT(progress(int,const QString&))); connect(&result, SIGNAL(error(const ErrorItem&)), - mUI.mResults, SLOT(error(const ErrorItem&))); + mUI->mResults, SLOT(error(const ErrorItem&))); connect(&result, SIGNAL(log(const QString&)), - mUI.mResults, SLOT(log(const QString&))); + mUI->mResults, SLOT(log(const QString&))); connect(&result, SIGNAL(debugError(const ErrorItem&)), - mUI.mResults, SLOT(debugError(const ErrorItem&))); + mUI->mResults, SLOT(debugError(const ErrorItem&))); // Create CppCheck instance CppCheck cppcheck(result, true, nullptr); @@ -544,13 +549,13 @@ void MainWindow::analyzeCode(const QString& code, const QString& filename) // Check checkLockDownUI(); clearResults(); - mUI.mResults->checkingStarted(1); + mUI->mResults->checkingStarted(1); cppcheck.check(filename.toStdString(), code.toStdString()); analysisDone(); // Expand results - if (mUI.mResults->hasVisibleResults()) - mUI.mResults->expandAllResults(); + if (mUI->mResults->hasVisibleResults()) + mUI->mResults->expandAllResults(); } QStringList MainWindow::selectFilesToAnalyze(QFileDialog::FileMode mode) @@ -617,7 +622,7 @@ void MainWindow::updateFunctionContractsTab() addedContracts << QString::fromStdString(it.first); } } - mUI.mResults->setAddedFunctionContracts(addedContracts); + mUI->mResults->setAddedFunctionContracts(addedContracts); } void MainWindow::updateVariableContractsTab() @@ -633,7 +638,7 @@ void MainWindow::updateVariableContractsTab() added << line; } } - mUI.mResults->setAddedVariableContracts(added); + mUI->mResults->setAddedVariableContracts(added); } void MainWindow::analyzeFiles() @@ -1016,33 +1021,33 @@ void MainWindow::analysisDone() return; } - mUI.mResults->checkingFinished(); + mUI->mResults->checkingFinished(); enableCheckButtons(true); - mUI.mActionSettings->setEnabled(true); - mUI.mActionOpenXML->setEnabled(true); + mUI->mActionSettings->setEnabled(true); + mUI->mActionOpenXML->setEnabled(true); if (mProjectFile) { enableProjectActions(true); } else if (mIsLogfileLoaded) { - mUI.mActionReanalyzeModified->setEnabled(false); - mUI.mActionReanalyzeAll->setEnabled(false); + mUI->mActionReanalyzeModified->setEnabled(false); + mUI->mActionReanalyzeAll->setEnabled(false); } enableProjectOpenActions(true); mPlatformActions->setEnabled(true); mCStandardActions->setEnabled(true); mCppStandardActions->setEnabled(true); mSelectLanguageActions->setEnabled(true); - mUI.mActionPosix->setEnabled(true); + mUI->mActionPosix->setEnabled(true); if (mScratchPad) mScratchPad->setEnabled(true); - mUI.mActionViewStats->setEnabled(true); + mUI->mActionViewStats->setEnabled(true); if (mProjectFile && !mProjectFile->getBuildDir().isEmpty()) { const QString prjpath = QFileInfo(mProjectFile->getFilename()).absolutePath(); const QString buildDir = prjpath + '/' + mProjectFile->getBuildDir(); if (QDir(buildDir).exists()) { - mUI.mResults->saveStatistics(buildDir + "/statistics.txt"); - mUI.mResults->updateFromOldReport(buildDir + "/lastResults.xml"); - mUI.mResults->save(buildDir + "/lastResults.xml", Report::XMLV2); + mUI->mResults->saveStatistics(buildDir + "/statistics.txt"); + mUI->mResults->updateFromOldReport(buildDir + "/lastResults.xml"); + mUI->mResults->save(buildDir + "/lastResults.xml", Report::XMLV2); } } @@ -1062,15 +1067,15 @@ void MainWindow::analysisDone() void MainWindow::checkLockDownUI() { enableCheckButtons(false); - mUI.mActionSettings->setEnabled(false); - mUI.mActionOpenXML->setEnabled(false); + mUI->mActionSettings->setEnabled(false); + mUI->mActionOpenXML->setEnabled(false); enableProjectActions(false); enableProjectOpenActions(false); mPlatformActions->setEnabled(false); mCStandardActions->setEnabled(false); mCppStandardActions->setEnabled(false); mSelectLanguageActions->setEnabled(false); - mUI.mActionPosix->setEnabled(false); + mUI->mActionPosix->setEnabled(false); if (mScratchPad) mScratchPad->setEnabled(false); @@ -1086,13 +1091,13 @@ void MainWindow::programSettings() if (dialog.exec() == QDialog::Accepted) { dialog.saveSettingValues(); mSettings->sync(); - mUI.mResults->updateSettings(dialog.showFullPath(), - dialog.saveFullPath(), - dialog.saveAllErrors(), - dialog.showNoErrorsMessage(), - dialog.showErrorId(), - dialog.showInconclusive()); - mUI.mResults->updateStyleSetting(mSettings); + mUI->mResults->updateSettings(dialog.showFullPath(), + dialog.saveFullPath(), + dialog.saveAllErrors(), + dialog.showNoErrorsMessage(), + dialog.showErrorId(), + dialog.showInconclusive()); + mUI->mResults->updateStyleSetting(mSettings); const QString newLang = mSettings->value(SETTINGS_LANGUAGE, "en").toString(); setLanguage(newLang); } @@ -1131,18 +1136,18 @@ void MainWindow::reAnalyzeSelected(QStringList files) return; // Clear details, statistics and progress - mUI.mResults->clear(false); + mUI->mResults->clear(false); for (int i = 0; i < files.size(); ++i) - mUI.mResults->clearRecheckFile(files[i]); + mUI->mResults->clearRecheckFile(files[i]); - mCurrentDirectory = mUI.mResults->getCheckDirectory(); + mCurrentDirectory = mUI->mResults->getCheckDirectory(); FileList pathList; pathList.addPathList(files); if (mProjectFile) pathList.addExcludeList(mProjectFile->getExcludedPaths()); QStringList fileNames = pathList.getFileList(); checkLockDownUI(); // lock UI while checking - mUI.mResults->checkingStarted(fileNames.size()); + mUI->mResults->checkingStarted(fileNames.size()); mThread->setCheckFiles(fileNames); // Saving last check start time, otherwise unchecked modified files will not be @@ -1160,14 +1165,14 @@ void MainWindow::reAnalyze(bool all) return; // Clear details, statistics and progress - mUI.mResults->clear(all); + mUI->mResults->clear(all); // Clear results for changed files for (int i = 0; i < files.size(); ++i) - mUI.mResults->clear(files[i]); + mUI->mResults->clear(files[i]); checkLockDownUI(); // lock UI while checking - mUI.mResults->checkingStarted(files.size()); + mUI->mResults->checkingStarted(files.size()); if (mProjectFile) qDebug() << "Rechecking project file" << mProjectFile->getFilename(); @@ -1185,14 +1190,14 @@ void MainWindow::clearResults() dir.remove(f); } } - mUI.mResults->clear(true); - Q_ASSERT(false == mUI.mResults->hasResults()); + mUI->mResults->clear(true); + Q_ASSERT(false == mUI->mResults->hasResults()); enableResultsButtons(); } void MainWindow::openResults() { - if (mUI.mResults->hasResults()) { + if (mUI->mResults->hasResults()) { QMessageBox msgBox(this); msgBox.setWindowTitle(tr("Cppcheck")); const QString msg(tr("Current results will be cleared.\n\n" @@ -1229,10 +1234,10 @@ void MainWindow::loadResults(const QString &selectedFile) if (mProjectFile) closeProjectFile(); mIsLogfileLoaded = true; - mUI.mResults->clear(true); - mUI.mActionReanalyzeModified->setEnabled(false); - mUI.mActionReanalyzeAll->setEnabled(false); - mUI.mResults->readErrorsXml(selectedFile); + mUI->mResults->clear(true); + mUI->mActionReanalyzeModified->setEnabled(false); + mUI->mActionReanalyzeAll->setEnabled(false); + mUI->mResults->readErrorsXml(selectedFile); setPath(SETTINGS_LAST_RESULT_PATH, selectedFile); formatAndSetTitle(selectedFile); } @@ -1240,62 +1245,62 @@ void MainWindow::loadResults(const QString &selectedFile) void MainWindow::loadResults(const QString &selectedFile, const QString &sourceDirectory) { loadResults(selectedFile); - mUI.mResults->setCheckDirectory(sourceDirectory); + mUI->mResults->setCheckDirectory(sourceDirectory); } void MainWindow::enableCheckButtons(bool enable) { - mUI.mActionStop->setEnabled(!enable); - mUI.mActionAnalyzeFiles->setEnabled(enable); + mUI->mActionStop->setEnabled(!enable); + mUI->mActionAnalyzeFiles->setEnabled(enable); if (mProjectFile) { - mUI.mActionReanalyzeModified->setEnabled(false); - mUI.mActionReanalyzeAll->setEnabled(enable); + mUI->mActionReanalyzeModified->setEnabled(false); + mUI->mActionReanalyzeAll->setEnabled(enable); } else if (!enable || mThread->hasPreviousFiles()) { - mUI.mActionReanalyzeModified->setEnabled(enable); - mUI.mActionReanalyzeAll->setEnabled(enable); + mUI->mActionReanalyzeModified->setEnabled(enable); + mUI->mActionReanalyzeAll->setEnabled(enable); } - mUI.mActionAnalyzeDirectory->setEnabled(enable); + mUI->mActionAnalyzeDirectory->setEnabled(enable); } void MainWindow::enableResultsButtons() { - bool enabled = mUI.mResults->hasResults(); - mUI.mActionClearResults->setEnabled(enabled); - mUI.mActionSave->setEnabled(enabled); - mUI.mActionPrint->setEnabled(enabled); - mUI.mActionPrintPreview->setEnabled(enabled); + bool enabled = mUI->mResults->hasResults(); + mUI->mActionClearResults->setEnabled(enabled); + mUI->mActionSave->setEnabled(enabled); + mUI->mActionPrint->setEnabled(enabled); + mUI->mActionPrintPreview->setEnabled(enabled); } void MainWindow::showStyle(bool checked) { - mUI.mResults->showResults(ShowTypes::ShowStyle, checked); + mUI->mResults->showResults(ShowTypes::ShowStyle, checked); } void MainWindow::showErrors(bool checked) { - mUI.mResults->showResults(ShowTypes::ShowErrors, checked); + mUI->mResults->showResults(ShowTypes::ShowErrors, checked); } void MainWindow::showWarnings(bool checked) { - mUI.mResults->showResults(ShowTypes::ShowWarnings, checked); + mUI->mResults->showResults(ShowTypes::ShowWarnings, checked); } void MainWindow::showPortability(bool checked) { - mUI.mResults->showResults(ShowTypes::ShowPortability, checked); + mUI->mResults->showResults(ShowTypes::ShowPortability, checked); } void MainWindow::showPerformance(bool checked) { - mUI.mResults->showResults(ShowTypes::ShowPerformance, checked); + mUI->mResults->showResults(ShowTypes::ShowPerformance, checked); } void MainWindow::showInformation(bool checked) { - mUI.mResults->showResults(ShowTypes::ShowInformation, checked); + mUI->mResults->showResults(ShowTypes::ShowInformation, checked); } void MainWindow::checkAll() @@ -1339,17 +1344,17 @@ void MainWindow::closeEvent(QCloseEvent *event) void MainWindow::toggleAllChecked(bool checked) { - mUI.mActionShowStyle->setChecked(checked); + mUI->mActionShowStyle->setChecked(checked); showStyle(checked); - mUI.mActionShowErrors->setChecked(checked); + mUI->mActionShowErrors->setChecked(checked); showErrors(checked); - mUI.mActionShowWarnings->setChecked(checked); + mUI->mActionShowWarnings->setChecked(checked); showWarnings(checked); - mUI.mActionShowPortability->setChecked(checked); + mUI->mActionShowPortability->setChecked(checked); showPortability(checked); - mUI.mActionShowPerformance->setChecked(checked); + mUI->mActionShowPerformance->setChecked(checked); showPerformance(checked); - mUI.mActionShowInformation->setChecked(checked); + mUI->mActionShowInformation->setChecked(checked); showInformation(checked); } @@ -1411,7 +1416,7 @@ void MainWindow::save() type = Report::CSV; } - mUI.mResults->save(selectedFile, type); + mUI->mResults->save(selectedFile, type); setPath(SETTINGS_LAST_RESULT_PATH, selectedFile); } } @@ -1421,17 +1426,17 @@ void MainWindow::resultsAdded() void MainWindow::toggleMainToolBar() { - mUI.mToolBarMain->setVisible(mUI.mActionToolBarMain->isChecked()); + mUI->mToolBarMain->setVisible(mUI->mActionToolBarMain->isChecked()); } void MainWindow::toggleViewToolBar() { - mUI.mToolBarView->setVisible(mUI.mActionToolBarView->isChecked()); + mUI->mToolBarView->setVisible(mUI->mActionToolBarView->isChecked()); } void MainWindow::toggleFilterToolBar() { - mUI.mToolBarFilter->setVisible(mUI.mActionToolBarFilter->isChecked()); + mUI->mToolBarFilter->setVisible(mUI->mActionToolBarFilter->isChecked()); mLineEditFilter->clear(); // Clearing the filter also disables filtering } @@ -1460,8 +1465,8 @@ void MainWindow::setLanguage(const QString &code) if (mTranslation->setLanguage(code)) { //Translate everything that is visible here - mUI.retranslateUi(this); - mUI.mResults->translate(); + mUI->retranslateUi(this); + mUI->mResults->translate(); mLineEditFilter->setPlaceholderText(QCoreApplication::translate("MainWindow", "Quick Filter:")); if (mProjectFile) formatAndSetTitle(tr("Project:") + ' ' + mProjectFile->getFilename()); @@ -1472,18 +1477,18 @@ void MainWindow::setLanguage(const QString &code) void MainWindow::aboutToShowViewMenu() { - mUI.mActionToolBarMain->setChecked(mUI.mToolBarMain->isVisible()); - mUI.mActionToolBarView->setChecked(mUI.mToolBarView->isVisible()); - mUI.mActionToolBarFilter->setChecked(mUI.mToolBarFilter->isVisible()); + mUI->mActionToolBarMain->setChecked(mUI->mToolBarMain->isVisible()); + mUI->mActionToolBarView->setChecked(mUI->mToolBarView->isVisible()); + mUI->mActionToolBarFilter->setChecked(mUI->mToolBarFilter->isVisible()); } void MainWindow::stopAnalysis() { mThread->stop(); - mUI.mResults->disableProgressbar(); + mUI->mResults->disableProgressbar(); const QString &lastResults = getLastResults(); if (!lastResults.isEmpty()) { - mUI.mResults->updateFromOldReport(lastResults); + mUI->mResults->updateFromOldReport(lastResults); } } @@ -1534,12 +1539,12 @@ void MainWindow::loadProjectFile(const QString &filePath) addProjectMRU(filePath); mIsLogfileLoaded = false; - mUI.mActionCloseProjectFile->setEnabled(true); - mUI.mActionEditProjectFile->setEnabled(true); + mUI->mActionCloseProjectFile->setEnabled(true); + mUI->mActionEditProjectFile->setEnabled(true); delete mProjectFile; mProjectFile = new ProjectFile(filePath, this); mProjectFile->setActiveProject(); - mUI.mResults->showContracts(mProjectFile->bugHunting); + mUI->mResults->showContracts(mProjectFile->bugHunting); updateFunctionContractsTab(); updateVariableContractsTab(); if (!loadLastResults()) @@ -1560,9 +1565,9 @@ bool MainWindow::loadLastResults() return false; if (!QFileInfo(lastResults).exists()) return false; - mUI.mResults->readErrorsXml(lastResults); - mUI.mResults->setCheckDirectory(mSettings->value(SETTINGS_LAST_CHECK_PATH,QString()).toString()); - mUI.mActionViewStats->setEnabled(true); + mUI->mResults->readErrorsXml(lastResults); + mUI->mResults->setCheckDirectory(mSettings->value(SETTINGS_LAST_CHECK_PATH,QString()).toString()); + mUI->mActionViewStats->setEnabled(true); enableResultsButtons(); return true; } @@ -1675,7 +1680,7 @@ void MainWindow::newProjectFile() ProjectFileDialog dlg(mProjectFile, this); if (dlg.exec() == QDialog::Accepted) { addProjectMRU(filepath); - mUI.mResults->showContracts(mProjectFile->bugHunting); + mUI->mResults->showContracts(mProjectFile->bugHunting); analyzeProject(mProjectFile); } else { closeProjectFile(); @@ -1689,9 +1694,9 @@ void MainWindow::closeProjectFile() { delete mProjectFile; mProjectFile = nullptr; - mUI.mResults->clear(true); - mUI.mResults->clearContracts(); - mUI.mResults->showContracts(false); + mUI->mResults->clear(true); + mUI->mResults->clearContracts(); + mUI->mResults->showContracts(false); enableProjectActions(false); enableProjectOpenActions(true); formatAndSetTitle(); @@ -1712,7 +1717,7 @@ void MainWindow::editProjectFile() ProjectFileDialog dlg(mProjectFile, this); if (dlg.exec() == QDialog::Accepted) { mProjectFile->write(); - mUI.mResults->showContracts(mProjectFile->bugHunting); + mUI->mResults->showContracts(mProjectFile->bugHunting); analyzeProject(mProjectFile); } } @@ -1726,7 +1731,7 @@ void MainWindow::showStatistics() statsDialog.setPathSelected(mCurrentDirectory); statsDialog.setNumberOfFilesScanned(mThread->getPreviousFilesCount()); statsDialog.setScanDuration(mThread->getPreviousScanDuration() / 1000.0); - statsDialog.setStatistics(mUI.mResults->getStatistics()); + statsDialog.setStatistics(mUI->mResults->getStatistics()); statsDialog.exec(); } @@ -1739,21 +1744,21 @@ void MainWindow::showLibraryEditor() void MainWindow::filterResults() { - mUI.mResults->filterResults(mLineEditFilter->text()); + mUI->mResults->filterResults(mLineEditFilter->text()); } void MainWindow::enableProjectActions(bool enable) { - mUI.mActionCloseProjectFile->setEnabled(enable); - mUI.mActionEditProjectFile->setEnabled(enable); - mUI.mActionCheckLibrary->setEnabled(enable); - mUI.mActionCheckConfiguration->setEnabled(enable); + mUI->mActionCloseProjectFile->setEnabled(enable); + mUI->mActionEditProjectFile->setEnabled(enable); + mUI->mActionCheckLibrary->setEnabled(enable); + mUI->mActionCheckConfiguration->setEnabled(enable); } void MainWindow::enableProjectOpenActions(bool enable) { - mUI.mActionNewProjectFile->setEnabled(enable); - mUI.mActionOpenProjectFile->setEnabled(enable); + mUI->mActionNewProjectFile->setEnabled(enable); + mUI->mActionOpenProjectFile->setEnabled(enable); } void MainWindow::openRecentProject() @@ -1793,7 +1798,7 @@ void MainWindow::updateMRUMenuItems() { for (QAction* recentProjectAct : mRecentProjectActs) { if (recentProjectAct != nullptr) - mUI.mMenuFile->removeAction(recentProjectAct); + mUI->mMenuFile->removeAction(recentProjectAct); } QStringList projects = mSettings->value(SETTINGS_MRU_PROJECTS).toStringList(); @@ -1817,11 +1822,11 @@ void MainWindow::updateMRUMenuItems() mRecentProjectActs[i]->setText(text); mRecentProjectActs[i]->setData(projects[i]); mRecentProjectActs[i]->setVisible(true); - mUI.mMenuFile->insertAction(mUI.mActionProjectMRU, mRecentProjectActs[i]); + mUI->mMenuFile->insertAction(mUI->mActionProjectMRU, mRecentProjectActs[i]); } if (numRecentProjects > 1) - mRecentProjectActs[numRecentProjects] = mUI.mMenuFile->insertSeparator(mUI.mActionProjectMRU); + mRecentProjectActs[numRecentProjects] = mUI->mMenuFile->insertSeparator(mUI->mActionProjectMRU); } void MainWindow::addProjectMRU(const QString &project) diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 4c5d3ae57..7f19045dc 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -19,8 +19,6 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include "ui_mainwindow.h" - #include "settings.h" #include "platforms.h" @@ -32,10 +30,15 @@ class ThreadHandler; class TranslationHandler; class ScratchPad; class ProjectFile; +class ApplicationList; class QAction; class QActionGroup; class QSettings; class QTimer; +class QLineEdit; +namespace Ui { + class MainWindow; +}; /// @addtogroup GUI /// @{ @@ -431,7 +434,7 @@ private: TranslationHandler *mTranslation; /** @brief Class holding all UI components */ - Ui::MainWindow mUI; + Ui::MainWindow *mUI; /** @brief Current analyzed directory. */ QString mCurrentDirectory; diff --git a/gui/newsuppressiondialog.cpp b/gui/newsuppressiondialog.cpp index 9e8950104..67227df01 100644 --- a/gui/newsuppressiondialog.cpp +++ b/gui/newsuppressiondialog.cpp @@ -18,13 +18,13 @@ #include "newsuppressiondialog.h" -#include "ui_newsuppressiondialog.h" - #include "cppcheck.h" #include "color.h" #include "errorlogger.h" #include "suppressions.h" +#include "ui_newsuppressiondialog.h" + NewSuppressionDialog::NewSuppressionDialog(QWidget *parent) : QDialog(parent), mUI(new Ui::NewSuppressionDialog) diff --git a/gui/projectfiledialog.ui b/gui/projectfile.ui similarity index 100% rename from gui/projectfiledialog.ui rename to gui/projectfile.ui diff --git a/gui/projectfiledialog.cpp b/gui/projectfiledialog.cpp index 074deaef7..f74eed0ed 100644 --- a/gui/projectfiledialog.cpp +++ b/gui/projectfiledialog.cpp @@ -26,6 +26,8 @@ #include "platforms.h" #include "projectfile.h" +#include "ui_projectfile.h" + #include #include #include @@ -70,11 +72,12 @@ QStringList ProjectFileDialog::getProjectConfigs(const QString &fileName) ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, QWidget *parent) : QDialog(parent) + , mUI(new Ui::ProjectFile) , mProjectFile(projectFile) { - mUI.setupUi(this); + mUI->setupUi(this); - mUI.mToolClangAnalyzer->hide(); + mUI->mToolClangAnalyzer->hide(); const QFileInfo inf(projectFile->getFilename()); QString filename = inf.fileName(); @@ -146,9 +149,9 @@ ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, QWidget *parent) } } libs.sort(); - mUI.mLibraries->clear(); + mUI->mLibraries->clear(); for (const QString &lib : libs) { - QListWidgetItem* item = new QListWidgetItem(lib, mUI.mLibraries); + QListWidgetItem* item = new QListWidgetItem(lib, mUI->mLibraries); item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag item->setCheckState(Qt::Unchecked); // AND initialize check state } @@ -156,7 +159,7 @@ ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, QWidget *parent) // Platforms.. Platforms platforms; for (cppcheck::Platform::PlatformType builtinPlatform : builtinPlatforms) - mUI.mComboBoxPlatform->addItem(platforms.get(builtinPlatform).mTitle); + mUI->mComboBoxPlatform->addItem(platforms.get(builtinPlatform).mTitle); QStringList platformFiles; foreach (QString sp, searchPaths) { if (sp.endsWith("/cfg")) @@ -177,41 +180,42 @@ ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, QWidget *parent) } } platformFiles.sort(); - mUI.mComboBoxPlatform->addItems(platformFiles); + mUI->mComboBoxPlatform->addItems(platformFiles); - mUI.mEditTags->setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9 ;]*"),this)); + mUI->mEditTags->setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9 ;]*"),this)); const QRegExp undefRegExp("\\s*([a-zA-Z_][a-zA-Z0-9_]*[; ]*)*"); - mUI.mEditUndefines->setValidator(new QRegExpValidator(undefRegExp, this)); + mUI->mEditUndefines->setValidator(new QRegExpValidator(undefRegExp, this)); - connect(mUI.mButtons, &QDialogButtonBox::accepted, this, &ProjectFileDialog::ok); - connect(mUI.mBtnBrowseBuildDir, &QPushButton::clicked, this, &ProjectFileDialog::browseBuildDir); - connect(mUI.mBtnClearImportProject, &QPushButton::clicked, this, &ProjectFileDialog::clearImportProject); - connect(mUI.mBtnBrowseImportProject, &QPushButton::clicked, this, &ProjectFileDialog::browseImportProject); - connect(mUI.mBtnAddCheckPath, SIGNAL(clicked()), this, SLOT(addCheckPath())); - connect(mUI.mBtnEditCheckPath, &QPushButton::clicked, this, &ProjectFileDialog::editCheckPath); - connect(mUI.mBtnRemoveCheckPath, &QPushButton::clicked, this, &ProjectFileDialog::removeCheckPath); - connect(mUI.mBtnAddInclude, SIGNAL(clicked()), this, SLOT(addIncludeDir())); - connect(mUI.mBtnEditInclude, &QPushButton::clicked, this, &ProjectFileDialog::editIncludeDir); - connect(mUI.mBtnRemoveInclude, &QPushButton::clicked, this, &ProjectFileDialog::removeIncludeDir); - connect(mUI.mBtnAddIgnorePath, SIGNAL(clicked()), this, SLOT(addExcludePath())); - connect(mUI.mBtnAddIgnoreFile, SIGNAL(clicked()), this, SLOT(addExcludeFile())); - connect(mUI.mBtnEditIgnorePath, &QPushButton::clicked, this, &ProjectFileDialog::editExcludePath); - connect(mUI.mBtnRemoveIgnorePath, &QPushButton::clicked, this, &ProjectFileDialog::removeExcludePath); - connect(mUI.mBtnIncludeUp, &QPushButton::clicked, this, &ProjectFileDialog::moveIncludePathUp); - connect(mUI.mBtnIncludeDown, &QPushButton::clicked, this, &ProjectFileDialog::moveIncludePathDown); - connect(mUI.mBtnAddSuppression, &QPushButton::clicked, this, &ProjectFileDialog::addSuppression); - connect(mUI.mBtnRemoveSuppression, &QPushButton::clicked, this, &ProjectFileDialog::removeSuppression); - connect(mUI.mListSuppressions, &QListWidget::doubleClicked, this, &ProjectFileDialog::editSuppression); - connect(mUI.mBtnBrowseMisraFile, &QPushButton::clicked, this, &ProjectFileDialog::browseMisraFile); - connect(mUI.mChkAllVsConfigs, &QCheckBox::clicked, this, &ProjectFileDialog::checkAllVSConfigs); - connect(mUI.mBtnNormalAnalysis, &QCheckBox::toggled, mUI.mBtnSafeClasses, &QCheckBox::setEnabled); + connect(mUI->mButtons, &QDialogButtonBox::accepted, this, &ProjectFileDialog::ok); + connect(mUI->mBtnBrowseBuildDir, &QPushButton::clicked, this, &ProjectFileDialog::browseBuildDir); + connect(mUI->mBtnClearImportProject, &QPushButton::clicked, this, &ProjectFileDialog::clearImportProject); + connect(mUI->mBtnBrowseImportProject, &QPushButton::clicked, this, &ProjectFileDialog::browseImportProject); + connect(mUI->mBtnAddCheckPath, SIGNAL(clicked()), this, SLOT(addCheckPath())); + connect(mUI->mBtnEditCheckPath, &QPushButton::clicked, this, &ProjectFileDialog::editCheckPath); + connect(mUI->mBtnRemoveCheckPath, &QPushButton::clicked, this, &ProjectFileDialog::removeCheckPath); + connect(mUI->mBtnAddInclude, SIGNAL(clicked()), this, SLOT(addIncludeDir())); + connect(mUI->mBtnEditInclude, &QPushButton::clicked, this, &ProjectFileDialog::editIncludeDir); + connect(mUI->mBtnRemoveInclude, &QPushButton::clicked, this, &ProjectFileDialog::removeIncludeDir); + connect(mUI->mBtnAddIgnorePath, SIGNAL(clicked()), this, SLOT(addExcludePath())); + connect(mUI->mBtnAddIgnoreFile, SIGNAL(clicked()), this, SLOT(addExcludeFile())); + connect(mUI->mBtnEditIgnorePath, &QPushButton::clicked, this, &ProjectFileDialog::editExcludePath); + connect(mUI->mBtnRemoveIgnorePath, &QPushButton::clicked, this, &ProjectFileDialog::removeExcludePath); + connect(mUI->mBtnIncludeUp, &QPushButton::clicked, this, &ProjectFileDialog::moveIncludePathUp); + connect(mUI->mBtnIncludeDown, &QPushButton::clicked, this, &ProjectFileDialog::moveIncludePathDown); + connect(mUI->mBtnAddSuppression, &QPushButton::clicked, this, &ProjectFileDialog::addSuppression); + connect(mUI->mBtnRemoveSuppression, &QPushButton::clicked, this, &ProjectFileDialog::removeSuppression); + connect(mUI->mListSuppressions, &QListWidget::doubleClicked, this, &ProjectFileDialog::editSuppression); + connect(mUI->mBtnBrowseMisraFile, &QPushButton::clicked, this, &ProjectFileDialog::browseMisraFile); + connect(mUI->mChkAllVsConfigs, &QCheckBox::clicked, this, &ProjectFileDialog::checkAllVSConfigs); + connect(mUI->mBtnNormalAnalysis, &QCheckBox::toggled, mUI->mBtnSafeClasses, &QCheckBox::setEnabled); loadFromProjectFile(projectFile); } ProjectFileDialog::~ProjectFileDialog() { saveSettings(); + delete mUI; } void ProjectFileDialog::loadSettings() @@ -240,13 +244,13 @@ static void updateAddonCheckBox(QCheckBox *cb, const ProjectFile *projectFile, c void ProjectFileDialog::checkAllVSConfigs() { - if (mUI.mChkAllVsConfigs->isChecked()) { - for (int row = 0; row < mUI.mListVsConfigs->count(); ++row) { - QListWidgetItem *item = mUI.mListVsConfigs->item(row); + if (mUI->mChkAllVsConfigs->isChecked()) { + for (int row = 0; row < mUI->mListVsConfigs->count(); ++row) { + QListWidgetItem *item = mUI->mListVsConfigs->item(row); item->setCheckState(Qt::Checked); } } - mUI.mListVsConfigs->setEnabled(!mUI.mChkAllVsConfigs->isChecked()); + mUI->mListVsConfigs->setEnabled(!mUI->mChkAllVsConfigs->isChecked()); } void ProjectFileDialog::loadFromProjectFile(const ProjectFile *projectFile) @@ -258,39 +262,39 @@ void ProjectFileDialog::loadFromProjectFile(const ProjectFile *projectFile) setUndefines(projectFile->getUndefines()); setCheckPaths(projectFile->getCheckPaths()); setImportProject(projectFile->getImportProject()); - mUI.mChkAllVsConfigs->setChecked(projectFile->getAnalyzeAllVsConfigs()); - setProjectConfigurations(getProjectConfigs(mUI.mEditImportProject->text())); - for (int row = 0; row < mUI.mListVsConfigs->count(); ++row) { - QListWidgetItem *item = mUI.mListVsConfigs->item(row); + mUI->mChkAllVsConfigs->setChecked(projectFile->getAnalyzeAllVsConfigs()); + setProjectConfigurations(getProjectConfigs(mUI->mEditImportProject->text())); + for (int row = 0; row < mUI->mListVsConfigs->count(); ++row) { + QListWidgetItem *item = mUI->mListVsConfigs->item(row); if (projectFile->getAnalyzeAllVsConfigs() || projectFile->getVsConfigurations().contains(item->text())) item->setCheckState(Qt::Checked); else item->setCheckState(Qt::Unchecked); } - mUI.mCheckHeaders->setChecked(projectFile->getCheckHeaders()); - mUI.mCheckUnusedTemplates->setChecked(projectFile->getCheckUnusedTemplates()); - mUI.mMaxCtuDepth->setValue(projectFile->getMaxCtuDepth()); - mUI.mMaxTemplateRecursion->setValue(projectFile->getMaxTemplateRecursion()); + mUI->mCheckHeaders->setChecked(projectFile->getCheckHeaders()); + mUI->mCheckUnusedTemplates->setChecked(projectFile->getCheckUnusedTemplates()); + mUI->mMaxCtuDepth->setValue(projectFile->getMaxCtuDepth()); + mUI->mMaxTemplateRecursion->setValue(projectFile->getMaxTemplateRecursion()); if (projectFile->clangParser) - mUI.mBtnClangParser->setChecked(true); + mUI->mBtnClangParser->setChecked(true); else - mUI.mBtnCppcheckParser->setChecked(true); - mUI.mBtnSafeClasses->setChecked(projectFile->safeChecks.classes); - mUI.mBtnBugHunting->setChecked(projectFile->bugHunting); + mUI->mBtnCppcheckParser->setChecked(true); + mUI->mBtnSafeClasses->setChecked(projectFile->safeChecks.classes); + mUI->mBtnBugHunting->setChecked(projectFile->bugHunting); setExcludedPaths(projectFile->getExcludedPaths()); setLibraries(projectFile->getLibraries()); const QString platform = projectFile->getPlatform(); if (platform.endsWith(".xml")) { int i; - for (i = numberOfBuiltinPlatforms; i < mUI.mComboBoxPlatform->count(); ++i) { - if (mUI.mComboBoxPlatform->itemText(i) == platform) + for (i = numberOfBuiltinPlatforms; i < mUI->mComboBoxPlatform->count(); ++i) { + if (mUI->mComboBoxPlatform->itemText(i) == platform) break; } - if (i < mUI.mComboBoxPlatform->count()) - mUI.mComboBoxPlatform->setCurrentIndex(i); + if (i < mUI->mComboBoxPlatform->count()) + mUI->mComboBoxPlatform->setCurrentIndex(i); else { - mUI.mComboBoxPlatform->addItem(platform); - mUI.mComboBoxPlatform->setCurrentIndex(i); + mUI->mComboBoxPlatform->addItem(platform); + mUI->mComboBoxPlatform->setCurrentIndex(i); } } else { int i; @@ -300,55 +304,55 @@ void ProjectFileDialog::loadFromProjectFile(const ProjectFile *projectFile) break; } if (i < numberOfBuiltinPlatforms) - mUI.mComboBoxPlatform->setCurrentIndex(i); + mUI->mComboBoxPlatform->setCurrentIndex(i); else - mUI.mComboBoxPlatform->setCurrentIndex(-1); + mUI->mComboBoxPlatform->setCurrentIndex(-1); } - mUI.mComboBoxPlatform->setCurrentText(projectFile->getPlatform()); + mUI->mComboBoxPlatform->setCurrentText(projectFile->getPlatform()); setSuppressions(projectFile->getSuppressions()); // Human knowledge.. /* - mUI.mListUnknownFunctionReturn->clear(); - mUI.mListUnknownFunctionReturn->addItem("rand()"); - for (int row = 0; row < mUI.mListUnknownFunctionReturn->count(); ++row) { - QListWidgetItem *item = mUI.mListUnknownFunctionReturn->item(row); + mUI->mListUnknownFunctionReturn->clear(); + mUI->mListUnknownFunctionReturn->addItem("rand()"); + for (int row = 0; row < mUI->mListUnknownFunctionReturn->count(); ++row) { + QListWidgetItem *item = mUI->mListUnknownFunctionReturn->item(row); item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag const bool unknownValues = projectFile->getCheckUnknownFunctionReturn().contains(item->text()); item->setCheckState(unknownValues ? Qt::Checked : Qt::Unchecked); // AND initialize check state } - mUI.mCheckSafeClasses->setChecked(projectFile->getSafeChecks().classes); - mUI.mCheckSafeExternalFunctions->setChecked(projectFile->getSafeChecks().externalFunctions); - mUI.mCheckSafeInternalFunctions->setChecked(projectFile->getSafeChecks().internalFunctions); - mUI.mCheckSafeExternalVariables->setChecked(projectFile->getSafeChecks().externalVariables); + mUI->mCheckSafeClasses->setChecked(projectFile->getSafeChecks().classes); + mUI->mCheckSafeExternalFunctions->setChecked(projectFile->getSafeChecks().externalFunctions); + mUI->mCheckSafeInternalFunctions->setChecked(projectFile->getSafeChecks().internalFunctions); + mUI->mCheckSafeExternalVariables->setChecked(projectFile->getSafeChecks().externalVariables); */ // Addons.. QSettings settings; const QString dataDir = getDataDir(); - updateAddonCheckBox(mUI.mAddonThreadSafety, projectFile, dataDir, "threadsafety"); - updateAddonCheckBox(mUI.mAddonY2038, projectFile, dataDir, "y2038"); - updateAddonCheckBox(mUI.mAddonCert, projectFile, dataDir, "cert"); - updateAddonCheckBox(mUI.mAddonMisra, projectFile, dataDir, "misra"); + updateAddonCheckBox(mUI->mAddonThreadSafety, projectFile, dataDir, "threadsafety"); + updateAddonCheckBox(mUI->mAddonY2038, projectFile, dataDir, "y2038"); + updateAddonCheckBox(mUI->mAddonCert, projectFile, dataDir, "cert"); + updateAddonCheckBox(mUI->mAddonMisra, projectFile, dataDir, "misra"); const QString &misraFile = settings.value(SETTINGS_MISRA_FILE, QString()).toString(); - mUI.mEditMisraFile->setText(misraFile); - if (!mUI.mAddonMisra->isEnabled()) { - mUI.mEditMisraFile->setEnabled(false); - mUI.mBtnBrowseMisraFile->setEnabled(false); + mUI->mEditMisraFile->setText(misraFile); + if (!mUI->mAddonMisra->isEnabled()) { + mUI->mEditMisraFile->setEnabled(false); + mUI->mBtnBrowseMisraFile->setEnabled(false); } else if (misraFile.isEmpty()) { - mUI.mAddonMisra->setEnabled(false); - mUI.mAddonMisra->setText(mUI.mAddonMisra->text() + ' ' + tr("(no rule texts file)")); + mUI->mAddonMisra->setEnabled(false); + mUI->mAddonMisra->setText(mUI->mAddonMisra->text() + ' ' + tr("(no rule texts file)")); } - mUI.mToolClangAnalyzer->setChecked(projectFile->getClangAnalyzer()); - mUI.mToolClangTidy->setChecked(projectFile->getClangTidy()); + mUI->mToolClangAnalyzer->setChecked(projectFile->getClangAnalyzer()); + mUI->mToolClangTidy->setChecked(projectFile->getClangTidy()); if (CheckThread::clangTidyCmd().isEmpty()) { - mUI.mToolClangTidy->setText(tr("Clang-tidy (not found)")); - mUI.mToolClangTidy->setEnabled(false); + mUI->mToolClangTidy->setText(tr("Clang-tidy (not found)")); + mUI->mToolClangTidy->setEnabled(false); } - mUI.mEditTags->setText(projectFile->getTags().join(';')); + mUI->mEditTags->setText(projectFile->getTags().join(';')); updatePathsAndDefines(); } @@ -357,25 +361,25 @@ void ProjectFileDialog::saveToProjectFile(ProjectFile *projectFile) const projectFile->setRootPath(getRootPath()); projectFile->setBuildDir(getBuildDir()); projectFile->setImportProject(getImportProject()); - projectFile->setAnalyzeAllVsConfigs(mUI.mChkAllVsConfigs->isChecked()); + projectFile->setAnalyzeAllVsConfigs(mUI->mChkAllVsConfigs->isChecked()); projectFile->setVSConfigurations(getProjectConfigurations()); - projectFile->setCheckHeaders(mUI.mCheckHeaders->isChecked()); - projectFile->setCheckUnusedTemplates(mUI.mCheckUnusedTemplates->isChecked()); - projectFile->setMaxCtuDepth(mUI.mMaxCtuDepth->value()); - projectFile->setMaxTemplateRecursion(mUI.mMaxTemplateRecursion->value()); + projectFile->setCheckHeaders(mUI->mCheckHeaders->isChecked()); + projectFile->setCheckUnusedTemplates(mUI->mCheckUnusedTemplates->isChecked()); + projectFile->setMaxCtuDepth(mUI->mMaxCtuDepth->value()); + projectFile->setMaxTemplateRecursion(mUI->mMaxTemplateRecursion->value()); projectFile->setIncludes(getIncludePaths()); projectFile->setDefines(getDefines()); projectFile->setUndefines(getUndefines()); projectFile->setCheckPaths(getCheckPaths()); projectFile->setExcludedPaths(getExcludedPaths()); projectFile->setLibraries(getLibraries()); - projectFile->clangParser = mUI.mBtnClangParser->isChecked(); - projectFile->safeChecks.classes = mUI.mBtnSafeClasses->isChecked(); - projectFile->bugHunting = mUI.mBtnBugHunting->isChecked(); - if (mUI.mComboBoxPlatform->currentText().endsWith(".xml")) - projectFile->setPlatform(mUI.mComboBoxPlatform->currentText()); + projectFile->clangParser = mUI->mBtnClangParser->isChecked(); + projectFile->safeChecks.classes = mUI->mBtnSafeClasses->isChecked(); + projectFile->bugHunting = mUI->mBtnBugHunting->isChecked(); + if (mUI->mComboBoxPlatform->currentText().endsWith(".xml")) + projectFile->setPlatform(mUI->mComboBoxPlatform->currentText()); else { - int i = mUI.mComboBoxPlatform->currentIndex(); + int i = mUI->mComboBoxPlatform->currentIndex(); if (i < numberOfBuiltinPlatforms) projectFile->setPlatform(cppcheck::Platform::platformString(builtinPlatforms[i])); else @@ -385,36 +389,36 @@ void ProjectFileDialog::saveToProjectFile(ProjectFile *projectFile) const // Human knowledge /* QStringList unknownReturnValues; - for (int row = 0; row < mUI.mListUnknownFunctionReturn->count(); ++row) { - QListWidgetItem *item = mUI.mListUnknownFunctionReturn->item(row); + for (int row = 0; row < mUI->mListUnknownFunctionReturn->count(); ++row) { + QListWidgetItem *item = mUI->mListUnknownFunctionReturn->item(row); if (item->checkState() == Qt::Checked) unknownReturnValues << item->text(); } projectFile->setCheckUnknownFunctionReturn(unknownReturnValues); ProjectFile::SafeChecks safeChecks; - safeChecks.classes = mUI.mCheckSafeClasses->isChecked(); - safeChecks.externalFunctions = mUI.mCheckSafeExternalFunctions->isChecked(); - safeChecks.internalFunctions = mUI.mCheckSafeInternalFunctions->isChecked(); - safeChecks.externalVariables = mUI.mCheckSafeExternalVariables->isChecked(); + safeChecks.classes = mUI->mCheckSafeClasses->isChecked(); + safeChecks.externalFunctions = mUI->mCheckSafeExternalFunctions->isChecked(); + safeChecks.internalFunctions = mUI->mCheckSafeInternalFunctions->isChecked(); + safeChecks.externalVariables = mUI->mCheckSafeExternalVariables->isChecked(); projectFile->setSafeChecks(safeChecks); */ // Addons QStringList list; - if (mUI.mAddonThreadSafety->isChecked()) + if (mUI->mAddonThreadSafety->isChecked()) list << "threadsafety"; - if (mUI.mAddonY2038->isChecked()) + if (mUI->mAddonY2038->isChecked()) list << "y2038"; - if (mUI.mAddonCert->isChecked()) + if (mUI->mAddonCert->isChecked()) list << "cert"; - if (mUI.mAddonMisra->isChecked()) + if (mUI->mAddonMisra->isChecked()) list << "misra"; projectFile->setAddons(list); - projectFile->setClangAnalyzer(mUI.mToolClangAnalyzer->isChecked()); - projectFile->setClangTidy(mUI.mToolClangTidy->isChecked()); + projectFile->setClangAnalyzer(mUI->mToolClangAnalyzer->isChecked()); + projectFile->setClangTidy(mUI->mToolClangTidy->isChecked()); #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) - projectFile->setTags(mUI.mEditTags->text().split(";", Qt::SkipEmptyParts)); + projectFile->setTags(mUI->mEditTags->text().split(";", Qt::SkipEmptyParts)); #else - projectFile->setTags(mUI.mEditTags->text().split(";", QString::SkipEmptyParts)); + projectFile->setTags(mUI->mEditTags->text().split(";", QString::SkipEmptyParts)); #endif } @@ -454,36 +458,36 @@ void ProjectFileDialog::browseBuildDir() { const QString dir(getExistingDirectory(tr("Select Cppcheck build dir"), false)); if (!dir.isEmpty()) - mUI.mEditBuildDir->setText(dir); + mUI->mEditBuildDir->setText(dir); } void ProjectFileDialog::updatePathsAndDefines() { - const QString &fileName = mUI.mEditImportProject->text(); + const QString &fileName = mUI->mEditImportProject->text(); bool importProject = !fileName.isEmpty(); bool hasConfigs = fileName.endsWith(".sln") || fileName.endsWith(".vcxproj"); - mUI.mBtnClearImportProject->setEnabled(importProject); - mUI.mListCheckPaths->setEnabled(!importProject); - mUI.mListIncludeDirs->setEnabled(!importProject); - mUI.mBtnAddCheckPath->setEnabled(!importProject); - mUI.mBtnEditCheckPath->setEnabled(!importProject); - mUI.mBtnRemoveCheckPath->setEnabled(!importProject); - mUI.mEditDefines->setEnabled(!importProject); - mUI.mEditUndefines->setEnabled(!importProject); - mUI.mBtnAddInclude->setEnabled(!importProject); - mUI.mBtnEditInclude->setEnabled(!importProject); - mUI.mBtnRemoveInclude->setEnabled(!importProject); - mUI.mBtnIncludeUp->setEnabled(!importProject); - mUI.mBtnIncludeDown->setEnabled(!importProject); - mUI.mChkAllVsConfigs->setEnabled(hasConfigs); - mUI.mListVsConfigs->setEnabled(hasConfigs && !mUI.mChkAllVsConfigs->isChecked()); + mUI->mBtnClearImportProject->setEnabled(importProject); + mUI->mListCheckPaths->setEnabled(!importProject); + mUI->mListIncludeDirs->setEnabled(!importProject); + mUI->mBtnAddCheckPath->setEnabled(!importProject); + mUI->mBtnEditCheckPath->setEnabled(!importProject); + mUI->mBtnRemoveCheckPath->setEnabled(!importProject); + mUI->mEditDefines->setEnabled(!importProject); + mUI->mEditUndefines->setEnabled(!importProject); + mUI->mBtnAddInclude->setEnabled(!importProject); + mUI->mBtnEditInclude->setEnabled(!importProject); + mUI->mBtnRemoveInclude->setEnabled(!importProject); + mUI->mBtnIncludeUp->setEnabled(!importProject); + mUI->mBtnIncludeDown->setEnabled(!importProject); + mUI->mChkAllVsConfigs->setEnabled(hasConfigs); + mUI->mListVsConfigs->setEnabled(hasConfigs && !mUI->mChkAllVsConfigs->isChecked()); if (!hasConfigs) - mUI.mListVsConfigs->clear(); + mUI->mListVsConfigs->clear(); } void ProjectFileDialog::clearImportProject() { - mUI.mEditImportProject->clear(); + mUI->mEditImportProject->clear(); updatePathsAndDefines(); } @@ -499,11 +503,11 @@ void ProjectFileDialog::browseImportProject() dir.canonicalPath(), toFilterString(filters)); if (!fileName.isEmpty()) { - mUI.mEditImportProject->setText(dir.relativeFilePath(fileName)); + mUI->mEditImportProject->setText(dir.relativeFilePath(fileName)); updatePathsAndDefines(); setProjectConfigurations(getProjectConfigs(fileName)); - for (int row = 0; row < mUI.mListVsConfigs->count(); ++row) { - QListWidgetItem *item = mUI.mListVsConfigs->item(row); + for (int row = 0; row < mUI->mListVsConfigs->count(); ++row) { + QListWidgetItem *item = mUI->mListVsConfigs->item(row); item->setCheckState(Qt::Checked); } } @@ -512,8 +516,8 @@ void ProjectFileDialog::browseImportProject() QStringList ProjectFileDialog::getProjectConfigurations() const { QStringList configs; - for (int row = 0; row < mUI.mListVsConfigs->count(); ++row) { - QListWidgetItem *item = mUI.mListVsConfigs->item(row); + for (int row = 0; row < mUI->mListVsConfigs->count(); ++row) { + QListWidgetItem *item = mUI->mListVsConfigs->item(row); if (item->checkState() == Qt::Checked) configs << item->text(); } @@ -522,10 +526,10 @@ QStringList ProjectFileDialog::getProjectConfigurations() const void ProjectFileDialog::setProjectConfigurations(const QStringList &configs) { - mUI.mListVsConfigs->clear(); - mUI.mListVsConfigs->setEnabled(!configs.isEmpty() && !mUI.mChkAllVsConfigs->isChecked()); + mUI->mListVsConfigs->clear(); + mUI->mListVsConfigs->setEnabled(!configs.isEmpty() && !mUI->mChkAllVsConfigs->isChecked()); foreach (const QString &cfg, configs) { - QListWidgetItem* item = new QListWidgetItem(cfg, mUI.mListVsConfigs); + QListWidgetItem* item = new QListWidgetItem(cfg, mUI->mListVsConfigs); item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag item->setCheckState(Qt::Unchecked); } @@ -533,7 +537,7 @@ void ProjectFileDialog::setProjectConfigurations(const QStringList &configs) QString ProjectFileDialog::getImportProject() const { - return mUI.mEditImportProject->text(); + return mUI->mEditImportProject->text(); } void ProjectFileDialog::addIncludeDir(const QString &dir) @@ -544,7 +548,7 @@ void ProjectFileDialog::addIncludeDir(const QString &dir) const QString newdir = QDir::toNativeSeparators(dir); QListWidgetItem *item = new QListWidgetItem(newdir); item->setFlags(item->flags() | Qt::ItemIsEditable); - mUI.mListIncludeDirs->addItem(item); + mUI->mListIncludeDirs->addItem(item); } void ProjectFileDialog::addCheckPath(const QString &path) @@ -555,7 +559,7 @@ void ProjectFileDialog::addCheckPath(const QString &path) const QString newpath = QDir::toNativeSeparators(path); QListWidgetItem *item = new QListWidgetItem(newpath); item->setFlags(item->flags() | Qt::ItemIsEditable); - mUI.mListCheckPaths->addItem(item); + mUI->mListCheckPaths->addItem(item); } void ProjectFileDialog::addExcludePath(const QString &path) @@ -566,12 +570,12 @@ void ProjectFileDialog::addExcludePath(const QString &path) const QString newpath = QDir::toNativeSeparators(path); QListWidgetItem *item = new QListWidgetItem(newpath); item->setFlags(item->flags() | Qt::ItemIsEditable); - mUI.mListExcludedPaths->addItem(item); + mUI->mListExcludedPaths->addItem(item); } QString ProjectFileDialog::getRootPath() const { - QString root = mUI.mEditProjectRoot->text(); + QString root = mUI->mEditProjectRoot->text(); root = root.trimmed(); root = QDir::fromNativeSeparators(root); return root; @@ -579,26 +583,26 @@ QString ProjectFileDialog::getRootPath() const QString ProjectFileDialog::getBuildDir() const { - return mUI.mEditBuildDir->text(); + return mUI->mEditBuildDir->text(); } QStringList ProjectFileDialog::getIncludePaths() const { - return getPaths(mUI.mListIncludeDirs); + return getPaths(mUI->mListIncludeDirs); } QStringList ProjectFileDialog::getDefines() const { #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) - return mUI.mEditDefines->text().trimmed().split(QRegExp("\\s*;\\s*"), Qt::SkipEmptyParts); + return mUI->mEditDefines->text().trimmed().split(QRegExp("\\s*;\\s*"), Qt::SkipEmptyParts); #else - return mUI.mEditDefines->text().trimmed().split(QRegExp("\\s*;\\s*"), QString::SkipEmptyParts); + return mUI->mEditDefines->text().trimmed().split(QRegExp("\\s*;\\s*"), QString::SkipEmptyParts); #endif } QStringList ProjectFileDialog::getUndefines() const { - const QString undefine = mUI.mEditUndefines->text().trimmed(); + const QString undefine = mUI->mEditUndefines->text().trimmed(); #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) QStringList undefines = undefine.split(QRegExp("\\s*;\\s*"), Qt::SkipEmptyParts); #else @@ -610,19 +614,19 @@ QStringList ProjectFileDialog::getUndefines() const QStringList ProjectFileDialog::getCheckPaths() const { - return getPaths(mUI.mListCheckPaths); + return getPaths(mUI->mListCheckPaths); } QStringList ProjectFileDialog::getExcludedPaths() const { - return getPaths(mUI.mListExcludedPaths); + return getPaths(mUI->mListExcludedPaths); } QStringList ProjectFileDialog::getLibraries() const { QStringList libraries; - for (int row = 0; row < mUI.mLibraries->count(); ++row) { - QListWidgetItem *item = mUI.mLibraries->item(row); + for (int row = 0; row < mUI->mLibraries->count(); ++row) { + QListWidgetItem *item = mUI->mLibraries->item(row); if (item->checkState() == Qt::Checked) libraries << item->text(); } @@ -631,17 +635,17 @@ QStringList ProjectFileDialog::getLibraries() const void ProjectFileDialog::setRootPath(const QString &root) { - mUI.mEditProjectRoot->setText(QDir::toNativeSeparators(root)); + mUI->mEditProjectRoot->setText(QDir::toNativeSeparators(root)); } void ProjectFileDialog::setBuildDir(const QString &buildDir) { - mUI.mEditBuildDir->setText(buildDir); + mUI->mEditBuildDir->setText(buildDir); } void ProjectFileDialog::setImportProject(const QString &importProject) { - mUI.mEditImportProject->setText(importProject); + mUI->mEditImportProject->setText(importProject); } void ProjectFileDialog::setIncludepaths(const QStringList &includes) @@ -653,12 +657,12 @@ void ProjectFileDialog::setIncludepaths(const QStringList &includes) void ProjectFileDialog::setDefines(const QStringList &defines) { - mUI.mEditDefines->setText(defines.join(";")); + mUI->mEditDefines->setText(defines.join(";")); } void ProjectFileDialog::setUndefines(const QStringList &undefines) { - mUI.mEditUndefines->setText(undefines.join(";")); + mUI->mEditUndefines->setText(undefines.join(";")); } void ProjectFileDialog::setCheckPaths(const QStringList &paths) @@ -677,8 +681,8 @@ void ProjectFileDialog::setExcludedPaths(const QStringList &paths) void ProjectFileDialog::setLibraries(const QStringList &libraries) { - for (int row = 0; row < mUI.mLibraries->count(); ++row) { - QListWidgetItem *item = mUI.mLibraries->item(row); + for (int row = 0; row < mUI->mLibraries->count(); ++row) { + QListWidgetItem *item = mUI->mLibraries->item(row); item->setCheckState(libraries.contains(item->text()) ? Qt::Checked : Qt::Unchecked); } } @@ -712,18 +716,18 @@ void ProjectFileDialog::addSingleSuppression(const Suppressions::Suppression &su suppression_name = QString::fromStdString(suppression.getText()); } - mUI.mListSuppressions->addItem(suppression_name); + mUI->mListSuppressions->addItem(suppression_name); } void ProjectFileDialog::setSuppressions(const QList &suppressions) { - mUI.mListSuppressions->clear(); + mUI->mListSuppressions->clear(); QList new_suppressions = suppressions; mSuppressions.clear(); foreach (const Suppressions::Suppression &suppression, new_suppressions) { addSingleSuppression(suppression); } - mUI.mListSuppressions->sortItems(); + mUI->mListSuppressions->sortItems(); } void ProjectFileDialog::addCheckPath() @@ -735,14 +739,14 @@ void ProjectFileDialog::addCheckPath() void ProjectFileDialog::editCheckPath() { - QListWidgetItem *item = mUI.mListCheckPaths->currentItem(); - mUI.mListCheckPaths->editItem(item); + QListWidgetItem *item = mUI->mListCheckPaths->currentItem(); + mUI->mListCheckPaths->editItem(item); } void ProjectFileDialog::removeCheckPath() { - const int row = mUI.mListCheckPaths->currentRow(); - QListWidgetItem *item = mUI.mListCheckPaths->takeItem(row); + const int row = mUI->mListCheckPaths->currentRow(); + QListWidgetItem *item = mUI->mListCheckPaths->takeItem(row); delete item; } @@ -755,15 +759,15 @@ void ProjectFileDialog::addIncludeDir() void ProjectFileDialog::removeIncludeDir() { - const int row = mUI.mListIncludeDirs->currentRow(); - QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row); + const int row = mUI->mListIncludeDirs->currentRow(); + QListWidgetItem *item = mUI->mListIncludeDirs->takeItem(row); delete item; } void ProjectFileDialog::editIncludeDir() { - QListWidgetItem *item = mUI.mListIncludeDirs->currentItem(); - mUI.mListIncludeDirs->editItem(item); + QListWidgetItem *item = mUI->mListIncludeDirs->currentItem(); + mUI->mListIncludeDirs->editItem(item); } void ProjectFileDialog::addExcludePath() @@ -783,34 +787,34 @@ void ProjectFileDialog::addExcludeFile() void ProjectFileDialog::editExcludePath() { - QListWidgetItem *item = mUI.mListExcludedPaths->currentItem(); - mUI.mListExcludedPaths->editItem(item); + QListWidgetItem *item = mUI->mListExcludedPaths->currentItem(); + mUI->mListExcludedPaths->editItem(item); } void ProjectFileDialog::removeExcludePath() { - const int row = mUI.mListExcludedPaths->currentRow(); - QListWidgetItem *item = mUI.mListExcludedPaths->takeItem(row); + const int row = mUI->mListExcludedPaths->currentRow(); + QListWidgetItem *item = mUI->mListExcludedPaths->takeItem(row); delete item; } void ProjectFileDialog::moveIncludePathUp() { - int row = mUI.mListIncludeDirs->currentRow(); - QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row); + int row = mUI->mListIncludeDirs->currentRow(); + QListWidgetItem *item = mUI->mListIncludeDirs->takeItem(row); row = row > 0 ? row - 1 : 0; - mUI.mListIncludeDirs->insertItem(row, item); - mUI.mListIncludeDirs->setCurrentItem(item); + mUI->mListIncludeDirs->insertItem(row, item); + mUI->mListIncludeDirs->setCurrentItem(item); } void ProjectFileDialog::moveIncludePathDown() { - int row = mUI.mListIncludeDirs->currentRow(); - QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row); - const int count = mUI.mListIncludeDirs->count(); + int row = mUI->mListIncludeDirs->currentRow(); + QListWidgetItem *item = mUI->mListIncludeDirs->takeItem(row); + const int count = mUI->mListIncludeDirs->count(); row = row < count ? row + 1 : count; - mUI.mListIncludeDirs->insertItem(row, item); - mUI.mListIncludeDirs->setCurrentItem(item); + mUI->mListIncludeDirs->insertItem(row, item); + mUI->mListIncludeDirs->setCurrentItem(item); } void ProjectFileDialog::addSuppression() @@ -823,8 +827,8 @@ void ProjectFileDialog::addSuppression() void ProjectFileDialog::removeSuppression() { - const int row = mUI.mListSuppressions->currentRow(); - QListWidgetItem *item = mUI.mListSuppressions->takeItem(row); + const int row = mUI->mListSuppressions->currentRow(); + QListWidgetItem *item = mUI->mListSuppressions->takeItem(row); if (!item) return; @@ -836,8 +840,8 @@ void ProjectFileDialog::removeSuppression() void ProjectFileDialog::editSuppression(const QModelIndex &) { - const int row = mUI.mListSuppressions->currentRow(); - QListWidgetItem *item = mUI.mListSuppressions->item(row); + const int row = mUI->mListSuppressions->currentRow(); + QListWidgetItem *item = mUI->mListSuppressions->item(row); int suppressionIndex = getSuppressionIndex(item->text()); if (suppressionIndex >= 0) { // TODO what if suppression is not found? NewSuppressionDialog dlg; @@ -867,11 +871,11 @@ void ProjectFileDialog::browseMisraFile() tr("MISRA rule texts file (%1)").arg("*.txt")); if (!fileName.isEmpty()) { QSettings settings; - mUI.mEditMisraFile->setText(fileName); + mUI->mEditMisraFile->setText(fileName); settings.setValue(SETTINGS_MISRA_FILE, fileName); - mUI.mAddonMisra->setText("MISRA C 2012"); - mUI.mAddonMisra->setEnabled(true); - updateAddonCheckBox(mUI.mAddonMisra, nullptr, getDataDir(), "misra"); + mUI->mAddonMisra->setText("MISRA C 2012"); + mUI->mAddonMisra->setEnabled(true); + updateAddonCheckBox(mUI->mAddonMisra, nullptr, getDataDir(), "misra"); } } diff --git a/gui/projectfiledialog.h b/gui/projectfiledialog.h index e8aa10970..0a3de5e09 100644 --- a/gui/projectfiledialog.h +++ b/gui/projectfiledialog.h @@ -19,8 +19,6 @@ #ifndef PROJECTFILE_DIALOG_H #define PROJECTFILE_DIALOG_H -#include "ui_projectfiledialog.h" - #include "suppressions.h" #include @@ -28,6 +26,9 @@ #include class QWidget; +namespace Ui { + class ProjectFile; +} /// @addtogroup GUI /// @{ @@ -315,7 +316,7 @@ protected: private: QStringList getProjectConfigs(const QString &fileName); - Ui::ProjectFile mUI; + Ui::ProjectFile *mUI; /** * @brief Projectfile path. diff --git a/gui/resultsview.cpp b/gui/resultsview.cpp index c58d791b2..6e82a64e4 100644 --- a/gui/resultsview.cpp +++ b/gui/resultsview.cpp @@ -29,6 +29,8 @@ #include "xmlreport.h" #include "xmlreportv2.h" +#include "ui_resultsview.h" + #include #include #include @@ -44,65 +46,66 @@ ResultsView::ResultsView(QWidget * parent) : QWidget(parent), mShowNoErrorsMessage(true), + mUI(new Ui::ResultsView), mStatistics(new CheckStatistics(this)) { - mUI.setupUi(this); + mUI->setupUi(this); - connect(mUI.mTree, &ResultsTree::resultsHidden, this, &ResultsView::resultsHidden); - connect(mUI.mTree, &ResultsTree::checkSelected, this, &ResultsView::checkSelected); - connect(mUI.mTree, &ResultsTree::treeSelectionChanged, this, &ResultsView::updateDetails); - connect(mUI.mTree, &ResultsTree::suppressIds, this, &ResultsView::suppressIds); - connect(mUI.mTree, &ResultsTree::editFunctionContract, this, &ResultsView::editFunctionContract); - connect(this, &ResultsView::showResults, mUI.mTree, &ResultsTree::showResults); - connect(this, &ResultsView::showCppcheckResults, mUI.mTree, &ResultsTree::showCppcheckResults); - connect(this, &ResultsView::showClangResults, mUI.mTree, &ResultsTree::showClangResults); - connect(this, &ResultsView::collapseAllResults, mUI.mTree, &ResultsTree::collapseAll); - connect(this, &ResultsView::expandAllResults, mUI.mTree, &ResultsTree::expandAll); - connect(this, &ResultsView::showHiddenResults, mUI.mTree, &ResultsTree::showHiddenResults); + connect(mUI->mTree, &ResultsTree::resultsHidden, this, &ResultsView::resultsHidden); + connect(mUI->mTree, &ResultsTree::checkSelected, this, &ResultsView::checkSelected); + connect(mUI->mTree, &ResultsTree::treeSelectionChanged, this, &ResultsView::updateDetails); + connect(mUI->mTree, &ResultsTree::suppressIds, this, &ResultsView::suppressIds); + connect(mUI->mTree, &ResultsTree::editFunctionContract, this, &ResultsView::editFunctionContract); + connect(this, &ResultsView::showResults, mUI->mTree, &ResultsTree::showResults); + connect(this, &ResultsView::showCppcheckResults, mUI->mTree, &ResultsTree::showCppcheckResults); + connect(this, &ResultsView::showClangResults, mUI->mTree, &ResultsTree::showClangResults); + connect(this, &ResultsView::collapseAllResults, mUI->mTree, &ResultsTree::collapseAll); + connect(this, &ResultsView::expandAllResults, mUI->mTree, &ResultsTree::expandAll); + connect(this, &ResultsView::showHiddenResults, mUI->mTree, &ResultsTree::showHiddenResults); // Function contracts - connect(mUI.mListAddedContracts, &QListWidget::itemDoubleClicked, this, &ResultsView::contractDoubleClicked); - connect(mUI.mListMissingContracts, &QListWidget::itemDoubleClicked, this, &ResultsView::contractDoubleClicked); - mUI.mListAddedContracts->installEventFilter(this); + connect(mUI->mListAddedContracts, &QListWidget::itemDoubleClicked, this, &ResultsView::contractDoubleClicked); + connect(mUI->mListMissingContracts, &QListWidget::itemDoubleClicked, this, &ResultsView::contractDoubleClicked); + mUI->mListAddedContracts->installEventFilter(this); // Variable contracts - connect(mUI.mListAddedVariables, &QListWidget::itemDoubleClicked, this, &ResultsView::variableDoubleClicked); - connect(mUI.mListMissingVariables, &QListWidget::itemDoubleClicked, this, &ResultsView::variableDoubleClicked); - connect(mUI.mEditVariablesFilter, &QLineEdit::textChanged, this, &ResultsView::editVariablesFilter); - mUI.mListAddedVariables->installEventFilter(this); + connect(mUI->mListAddedVariables, &QListWidget::itemDoubleClicked, this, &ResultsView::variableDoubleClicked); + connect(mUI->mListMissingVariables, &QListWidget::itemDoubleClicked, this, &ResultsView::variableDoubleClicked); + connect(mUI->mEditVariablesFilter, &QLineEdit::textChanged, this, &ResultsView::editVariablesFilter); + mUI->mListAddedVariables->installEventFilter(this); - mUI.mListLog->setContextMenuPolicy(Qt::CustomContextMenu); + mUI->mListLog->setContextMenuPolicy(Qt::CustomContextMenu); - mUI.mListAddedContracts->setSortingEnabled(true); - mUI.mListMissingContracts->setSortingEnabled(true); + mUI->mListAddedContracts->setSortingEnabled(true); + mUI->mListMissingContracts->setSortingEnabled(true); } void ResultsView::initialize(QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler) { - mUI.mProgress->setMinimum(0); - mUI.mProgress->setVisible(false); + mUI->mProgress->setMinimum(0); + mUI->mProgress->setVisible(false); CodeEditorStyle theStyle(CodeEditorStyle::loadSettings(settings)); - mUI.mCode->setStyle(theStyle); + mUI->mCode->setStyle(theStyle); QByteArray state = settings->value(SETTINGS_MAINWND_SPLITTER_STATE).toByteArray(); - mUI.mVerticalSplitter->restoreState(state); + mUI->mVerticalSplitter->restoreState(state); mShowNoErrorsMessage = settings->value(SETTINGS_SHOW_NO_ERRORS, true).toBool(); - mUI.mTree->initialize(settings, list, checkThreadHandler); + mUI->mTree->initialize(settings, list, checkThreadHandler); } ResultsView::~ResultsView() { - //dtor + delete mUI; } void ResultsView::setAddedFunctionContracts(const QStringList &addedContracts) { - mUI.mListAddedContracts->clear(); - mUI.mListAddedContracts->addItems(addedContracts); + mUI->mListAddedContracts->clear(); + mUI->mListAddedContracts->addItems(addedContracts); for (const QString& f: addedContracts) { - auto res = mUI.mListMissingContracts->findItems(f, Qt::MatchExactly); + auto res = mUI->mListMissingContracts->findItems(f, Qt::MatchExactly); if (!res.empty()) delete res.front(); } @@ -110,10 +113,10 @@ void ResultsView::setAddedFunctionContracts(const QStringList &addedContracts) void ResultsView::setAddedVariableContracts(const QStringList &added) { - mUI.mListAddedVariables->clear(); - mUI.mListAddedVariables->addItems(added); + mUI->mListAddedVariables->clear(); + mUI->mListAddedVariables->addItems(added); for (const QString& var: added) { - for (auto *item: mUI.mListMissingVariables->findItems(var, Qt::MatchExactly)) + for (auto *item: mUI->mListMissingVariables->findItems(var, Qt::MatchExactly)) delete item; mVariableContracts.insert(var); } @@ -122,54 +125,59 @@ void ResultsView::setAddedVariableContracts(const QStringList &added) void ResultsView::clear(bool results) { if (results) { - mUI.mTree->clear(); + mUI->mTree->clear(); } - mUI.mDetails->setText(QString()); + mUI->mDetails->setText(QString()); mStatistics->clear(); //Clear the progressbar - mUI.mProgress->setMaximum(PROGRESS_MAX); - mUI.mProgress->setValue(0); - mUI.mProgress->setFormat("%p%"); + mUI->mProgress->setMaximum(PROGRESS_MAX); + mUI->mProgress->setValue(0); + mUI->mProgress->setFormat("%p%"); } void ResultsView::clear(const QString &filename) { - mUI.mTree->clear(filename); + mUI->mTree->clear(filename); } void ResultsView::clearRecheckFile(const QString &filename) { - mUI.mTree->clearRecheckFile(filename); + mUI->mTree->clearRecheckFile(filename); } void ResultsView::clearContracts() { - mUI.mListAddedContracts->clear(); - mUI.mListAddedVariables->clear(); - mUI.mListMissingContracts->clear(); - mUI.mListMissingVariables->clear(); + mUI->mListAddedContracts->clear(); + mUI->mListAddedVariables->clear(); + mUI->mListMissingContracts->clear(); + mUI->mListMissingVariables->clear(); mFunctionContracts.clear(); mVariableContracts.clear(); } +ShowTypes * ResultsView::getShowTypes() const +{ + return &mUI->mTree->mShowSeverities; +} + void ResultsView::showContracts(bool visible) { - mUI.mTabFunctionContracts->setVisible(visible); - mUI.mTabVariableContracts->setVisible(visible); + mUI->mTabFunctionContracts->setVisible(visible); + mUI->mTabVariableContracts->setVisible(visible); } void ResultsView::progress(int value, const QString& description) { - mUI.mProgress->setValue(value); - mUI.mProgress->setFormat(QString("%p% (%1)").arg(description)); + mUI->mProgress->setValue(value); + mUI->mProgress->setFormat(QString("%p% (%1)").arg(description)); } void ResultsView::error(const ErrorItem &item) { - if (mUI.mTree->addErrorItem(item)) { + if (mUI->mTree->addErrorItem(item)) { emit gotResults(); mStatistics->addItem(item.tool(), ShowTypes::SeverityToShowType(item.severity)); } @@ -177,7 +185,7 @@ void ResultsView::error(const ErrorItem &item) void ResultsView::filterResults(const QString& filter) { - mUI.mTree->filterResults(filter); + mUI->mTree->filterResults(filter); } void ResultsView::saveStatistics(const QString &filename) const @@ -199,7 +207,7 @@ void ResultsView::saveStatistics(const QString &filename) const void ResultsView::updateFromOldReport(const QString &filename) const { - mUI.mTree->updateFromOldReport(filename); + mUI->mTree->updateFromOldReport(filename); } void ResultsView::save(const QString &filename, Report::Type type) const @@ -220,7 +228,7 @@ void ResultsView::save(const QString &filename, Report::Type type) const if (report) { if (report->create()) - mUI.mTree->saveResults(report); + mUI->mTree->saveResults(report); else { QMessageBox msgBox; msgBox.setText(tr("Failed to save the report.")); @@ -267,7 +275,7 @@ void ResultsView::print(QPrinter* printer) } PrintableReport report; - mUI.mTree->saveResults(&report); + mUI->mTree->saveResults(&report); QTextDocument doc(report.getFormattedReportText()); doc.print(printer); } @@ -279,42 +287,42 @@ void ResultsView::updateSettings(bool showFullPath, bool showErrorId, bool showInconclusive) { - mUI.mTree->updateSettings(showFullPath, saveFullPath, saveAllErrors, showErrorId, showInconclusive); + mUI->mTree->updateSettings(showFullPath, saveFullPath, saveAllErrors, showErrorId, showInconclusive); mShowNoErrorsMessage = showNoErrorsMessage; } void ResultsView::updateStyleSetting(QSettings *settings) { CodeEditorStyle theStyle(CodeEditorStyle::loadSettings(settings)); - mUI.mCode->setStyle(theStyle); + mUI->mCode->setStyle(theStyle); } void ResultsView::setCheckDirectory(const QString &dir) { - mUI.mTree->setCheckDirectory(dir); + mUI->mTree->setCheckDirectory(dir); } QString ResultsView::getCheckDirectory() { - return mUI.mTree->getCheckDirectory(); + return mUI->mTree->getCheckDirectory(); } void ResultsView::checkingStarted(int count) { - mUI.mProgress->setVisible(true); - mUI.mProgress->setMaximum(PROGRESS_MAX); - mUI.mProgress->setValue(0); - mUI.mProgress->setFormat(tr("%p% (%1 of %2 files checked)").arg(0).arg(count)); + mUI->mProgress->setVisible(true); + mUI->mProgress->setMaximum(PROGRESS_MAX); + mUI->mProgress->setValue(0); + mUI->mProgress->setFormat(tr("%p% (%1 of %2 files checked)").arg(0).arg(count)); } void ResultsView::checkingFinished() { - mUI.mProgress->setVisible(false); - mUI.mProgress->setFormat("%p%"); + mUI->mProgress->setVisible(false); + mUI->mProgress->setFormat("%p%"); // TODO: Items can be mysteriously hidden when checking is finished, this function // call should be redundant but it "unhides" the wrongly hidden items. - mUI.mTree->refreshTree(); + mUI->mTree->refreshTree(); //Should we inform user of non visible/not found errors? if (mShowNoErrorsMessage) { @@ -328,7 +336,7 @@ void ResultsView::checkingFinished() msg.exec(); } //If we have errors but they aren't visible, tell user about it - else if (!mUI.mTree->hasVisibleResults()) { + else if (!mUI->mTree->hasVisibleResults()) { QString text = tr("Errors were found, but they are configured to be hidden.\n" \ "To toggle what kind of errors are shown, open view menu."); QMessageBox msg(QMessageBox::Information, @@ -344,31 +352,31 @@ void ResultsView::checkingFinished() bool ResultsView::hasVisibleResults() const { - return mUI.mTree->hasVisibleResults(); + return mUI->mTree->hasVisibleResults(); } bool ResultsView::hasResults() const { - return mUI.mTree->hasResults(); + return mUI->mTree->hasResults(); } void ResultsView::saveSettings(QSettings *settings) { - mUI.mTree->saveSettings(); - QByteArray state = mUI.mVerticalSplitter->saveState(); + mUI->mTree->saveSettings(); + QByteArray state = mUI->mVerticalSplitter->saveState(); settings->setValue(SETTINGS_MAINWND_SPLITTER_STATE, state); - mUI.mVerticalSplitter->restoreState(state); + mUI->mVerticalSplitter->restoreState(state); } void ResultsView::translate() { - mUI.retranslateUi(this); - mUI.mTree->translate(); + mUI->retranslateUi(this); + mUI->mTree->translate(); } void ResultsView::disableProgressbar() { - mUI.mProgress->setEnabled(false); + mUI->mProgress->setEnabled(false); } void ResultsView::readErrorsXml(const QString &filename) @@ -402,7 +410,7 @@ void ResultsView::readErrorsXml(const QString &filename) ErrorItem item; foreach (item, errors) { - mUI.mTree->addErrorItem(item); + mUI->mTree->addErrorItem(item); } QString dir; @@ -412,17 +420,17 @@ void ResultsView::readErrorsXml(const QString &filename) dir = relativePath; } - mUI.mTree->setCheckDirectory(dir); + mUI->mTree->setCheckDirectory(dir); } void ResultsView::updateDetails(const QModelIndex &index) { - QStandardItemModel *model = qobject_cast(mUI.mTree->model()); + QStandardItemModel *model = qobject_cast(mUI->mTree->model()); QStandardItem *item = model->itemFromIndex(index); if (!item) { - mUI.mCode->clear(); - mUI.mDetails->setText(QString()); + mUI->mCode->clear(); + mUI->mDetails->setText(QString()); return; } @@ -434,8 +442,8 @@ void ResultsView::updateDetails(const QModelIndex &index) // If there is no severity data then it is a parent item without summary and message if (!data.contains("severity")) { - mUI.mCode->clear(); - mUI.mDetails->setText(QString()); + mUI->mCode->clear(); + mUI->mDetails->setText(QString()); return; } @@ -448,46 +456,46 @@ void ResultsView::updateDetails(const QModelIndex &index) if (data["cwe"].toInt() > 0) formattedMsg.prepend("CWE: " + QString::number(data["cwe"].toInt()) + "\n"); - if (mUI.mTree->showIdColumn()) + if (mUI->mTree->showIdColumn()) formattedMsg.prepend(tr("Id") + ": " + data["id"].toString() + "\n"); if (data["incomplete"].toBool()) formattedMsg += "\n" + tr("Bug hunting analysis is incomplete"); - mUI.mDetails->setText(formattedMsg); + mUI->mDetails->setText(formattedMsg); const int lineNumber = data["line"].toInt(); QString filepath = data["file"].toString(); - if (!QFileInfo(filepath).exists() && QFileInfo(mUI.mTree->getCheckDirectory() + '/' + filepath).exists()) - filepath = mUI.mTree->getCheckDirectory() + '/' + filepath; + if (!QFileInfo(filepath).exists() && QFileInfo(mUI->mTree->getCheckDirectory() + '/' + filepath).exists()) + filepath = mUI->mTree->getCheckDirectory() + '/' + filepath; QStringList symbols; if (data.contains("symbolNames")) symbols = data["symbolNames"].toString().split("\n"); - if (filepath == mUI.mCode->getFileName()) { - mUI.mCode->setError(lineNumber, symbols); + if (filepath == mUI->mCode->getFileName()) { + mUI->mCode->setError(lineNumber, symbols); return; } QFile file(filepath); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - mUI.mCode->clear(); + mUI->mCode->clear(); return; } QTextStream in(&file); - mUI.mCode->setError(in.readAll(), lineNumber, symbols); - mUI.mCode->setFileName(filepath); + mUI->mCode->setError(in.readAll(), lineNumber, symbols); + mUI->mCode->setFileName(filepath); } void ResultsView::log(const QString &str) { - mUI.mListLog->addItem(str); + mUI->mListLog->addItem(str); } void ResultsView::debugError(const ErrorItem &item) { - mUI.mListLog->addItem(item.toString()); + mUI->mListLog->addItem(item.toString()); } void ResultsView::bughuntingReportLine(const QString& line) @@ -497,13 +505,13 @@ void ResultsView::bughuntingReportLine(const QString& line) const QString varname = s.mid(9); if (!mVariableContracts.contains(varname)) { mVariableContracts.insert(varname); - mUI.mListMissingVariables->addItem(varname); + mUI->mListMissingVariables->addItem(varname); } } else if (s.startsWith("[missing contract] ")) { const QString functionName = s.mid(19); if (!mFunctionContracts.contains(functionName)) { mFunctionContracts.insert(functionName); - mUI.mListMissingContracts->addItem(functionName); + mUI->mListMissingContracts->addItem(functionName); } } } @@ -511,12 +519,12 @@ void ResultsView::bughuntingReportLine(const QString& line) void ResultsView::logClear() { - mUI.mListLog->clear(); + mUI->mListLog->clear(); } void ResultsView::logCopyEntry() { - const QListWidgetItem * item = mUI.mListLog->currentItem(); + const QListWidgetItem * item = mUI->mListLog->currentItem(); if (nullptr != item) { QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(item->text()); @@ -526,8 +534,8 @@ void ResultsView::logCopyEntry() void ResultsView::logCopyComplete() { QString logText; - for (int i=0; i < mUI.mListLog->count(); ++i) { - const QListWidgetItem * item = mUI.mListLog->item(i); + for (int i=0; i < mUI->mListLog->count(); ++i) { + const QListWidgetItem * item = mUI->mListLog->item(i); if (nullptr != item) { logText += item->text(); } @@ -548,20 +556,20 @@ void ResultsView::variableDoubleClicked(QListWidgetItem* item) void ResultsView::editVariablesFilter(const QString &text) { - for (auto *item: mUI.mListAddedVariables->findItems(".*", Qt::MatchRegExp)) { + for (auto *item: mUI->mListAddedVariables->findItems(".*", Qt::MatchRegExp)) { QString varname = item->text().mid(0, item->text().indexOf(" ")); item->setHidden(!varname.contains(text)); } - for (auto *item: mUI.mListMissingVariables->findItems(".*", Qt::MatchRegExp)) + for (auto *item: mUI->mListMissingVariables->findItems(".*", Qt::MatchRegExp)) item->setHidden(!item->text().contains(text)); } void ResultsView::on_mListLog_customContextMenuRequested(const QPoint &pos) { - if (mUI.mListLog->count() <= 0) + if (mUI->mListLog->count() <= 0) return; - const QPoint globalPos = mUI.mListLog->mapToGlobal(pos); + const QPoint globalPos = mUI->mListLog->mapToGlobal(pos); QMenu contextMenu; contextMenu.addAction(tr("Clear Log"), this, SLOT(logClear())); @@ -574,10 +582,10 @@ void ResultsView::on_mListLog_customContextMenuRequested(const QPoint &pos) bool ResultsView::eventFilter(QObject *target, QEvent *event) { if (event->type() == QEvent::KeyPress) { - if (target == mUI.mListAddedVariables) { + if (target == mUI->mListAddedVariables) { QKeyEvent *keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_Delete) { - for (auto *i: mUI.mListAddedVariables->selectedItems()) { + for (auto *i: mUI->mListAddedVariables->selectedItems()) { emit deleteVariableContract(i->text().mid(0, i->text().indexOf(" "))); delete i; } @@ -585,10 +593,10 @@ bool ResultsView::eventFilter(QObject *target, QEvent *event) } } - if (target == mUI.mListAddedContracts) { + if (target == mUI->mListAddedContracts) { QKeyEvent *keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_Delete) { - for (auto *i: mUI.mListAddedContracts->selectedItems()) { + for (auto *i: mUI->mListAddedContracts->selectedItems()) { emit deleteFunctionContract(i->text()); delete i; } diff --git a/gui/resultsview.h b/gui/resultsview.h index 6834587f1..e7febdc6c 100644 --- a/gui/resultsview.h +++ b/gui/resultsview.h @@ -20,17 +20,24 @@ #ifndef RESULTSVIEW_H #define RESULTSVIEW_H -#include "ui_resultsview.h" - #include "report.h" #include "showtypes.h" +#include +#include +#include + class ErrorItem; class ApplicationList; +class ThreadHandler; class QModelIndex; class QPrinter; class QSettings; class CheckStatistics; +class QListWidgetItem; +namespace Ui { + class ResultsView; +} /// @addtogroup GUI /// @{ @@ -195,9 +202,7 @@ public: * @brief Return Showtypes. * @return Pointer to Showtypes. */ - ShowTypes * getShowTypes() const { - return &mUI.mTree->mShowSeverities; - } + ShowTypes * getShowTypes() const; /** Show/hide the contract tabs */ void showContracts(bool visible); @@ -368,7 +373,7 @@ protected: */ bool mShowNoErrorsMessage; - Ui::ResultsView mUI; + Ui::ResultsView *mUI; CheckStatistics *mStatistics; diff --git a/gui/scratchpad.cpp b/gui/scratchpad.cpp index e4b0efadb..3c8a00ab7 100644 --- a/gui/scratchpad.cpp +++ b/gui/scratchpad.cpp @@ -20,24 +20,32 @@ #include "mainwindow.h" +#include "ui_scratchpad.h" + ScratchPad::ScratchPad(MainWindow& mainWindow) : QDialog(&mainWindow) + , mUI(new Ui::ScratchPad) , mMainWindow(mainWindow) { - mUI.setupUi(this); + mUI->setupUi(this); - connect(mUI.mCheckButton, &QPushButton::clicked, this, &ScratchPad::checkButtonClicked); + connect(mUI->mCheckButton, &QPushButton::clicked, this, &ScratchPad::checkButtonClicked); +} + +ScratchPad::~ScratchPad() +{ + delete mUI; } void ScratchPad::translate() { - mUI.retranslateUi(this); + mUI->retranslateUi(this); } void ScratchPad::checkButtonClicked() { - QString filename = mUI.lineEdit->text(); + QString filename = mUI->lineEdit->text(); if (filename.isEmpty()) filename = "test.cpp"; - mMainWindow.analyzeCode(mUI.plainTextEdit->toPlainText(), filename); + mMainWindow.analyzeCode(mUI->plainTextEdit->toPlainText(), filename); } diff --git a/gui/scratchpad.h b/gui/scratchpad.h index ac33357fb..b45bea225 100644 --- a/gui/scratchpad.h +++ b/gui/scratchpad.h @@ -19,11 +19,12 @@ #ifndef SCRATCHPAD_H #define SCRATCHPAD_H -#include "ui_scratchpad.h" - #include class MainWindow; +namespace Ui { + class ScratchPad; +} /// @addtogroup GUI /// @{ @@ -35,6 +36,7 @@ class ScratchPad : public QDialog { Q_OBJECT public: explicit ScratchPad(MainWindow& mainWindow); + ~ScratchPad(); /** * @brief Translate dialog @@ -48,7 +50,7 @@ private slots: void checkButtonClicked(); private: - Ui::ScratchPad mUI; + Ui::ScratchPad *mUI; MainWindow& mMainWindow; }; diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp index 10180ac38..b637ebc33 100644 --- a/gui/settingsdialog.cpp +++ b/gui/settingsdialog.cpp @@ -25,6 +25,8 @@ #include "common.h" #include "translationhandler.h" +#include "ui_settings.h" + #include #include #include @@ -38,71 +40,72 @@ SettingsDialog::SettingsDialog(ApplicationList *list, QDialog(parent), mApplications(list), mTempApplications(new ApplicationList(this)), - mTranslator(translator) + mTranslator(translator), + mUI(new Ui::Settings) { - mUI.setupUi(this); - mUI.mPythonPathWarning->setStyleSheet("color: red"); + mUI->setupUi(this); + mUI->mPythonPathWarning->setStyleSheet("color: red"); QSettings settings; mTempApplications->copy(list); - mUI.mJobs->setText(settings.value(SETTINGS_CHECK_THREADS, 1).toString()); - mUI.mForce->setCheckState(boolToCheckState(settings.value(SETTINGS_CHECK_FORCE, false).toBool())); - mUI.mShowFullPath->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_FULL_PATH, false).toBool())); - mUI.mShowNoErrorsMessage->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_NO_ERRORS, false).toBool())); - mUI.mShowDebugWarnings->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_DEBUG_WARNINGS, false).toBool())); - mUI.mSaveAllErrors->setCheckState(boolToCheckState(settings.value(SETTINGS_SAVE_ALL_ERRORS, false).toBool())); - mUI.mSaveFullPath->setCheckState(boolToCheckState(settings.value(SETTINGS_SAVE_FULL_PATH, false).toBool())); - mUI.mInlineSuppressions->setCheckState(boolToCheckState(settings.value(SETTINGS_INLINE_SUPPRESSIONS, false).toBool())); - mUI.mEnableInconclusive->setCheckState(boolToCheckState(settings.value(SETTINGS_INCONCLUSIVE_ERRORS, false).toBool())); - mUI.mShowStatistics->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_STATISTICS, false).toBool())); - mUI.mShowErrorId->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_ERROR_ID, false).toBool())); - mUI.mEditPythonPath->setText(settings.value(SETTINGS_PYTHON_PATH, QString()).toString()); + mUI->mJobs->setText(settings.value(SETTINGS_CHECK_THREADS, 1).toString()); + mUI->mForce->setCheckState(boolToCheckState(settings.value(SETTINGS_CHECK_FORCE, false).toBool())); + mUI->mShowFullPath->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_FULL_PATH, false).toBool())); + mUI->mShowNoErrorsMessage->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_NO_ERRORS, false).toBool())); + mUI->mShowDebugWarnings->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_DEBUG_WARNINGS, false).toBool())); + mUI->mSaveAllErrors->setCheckState(boolToCheckState(settings.value(SETTINGS_SAVE_ALL_ERRORS, false).toBool())); + mUI->mSaveFullPath->setCheckState(boolToCheckState(settings.value(SETTINGS_SAVE_FULL_PATH, false).toBool())); + mUI->mInlineSuppressions->setCheckState(boolToCheckState(settings.value(SETTINGS_INLINE_SUPPRESSIONS, false).toBool())); + mUI->mEnableInconclusive->setCheckState(boolToCheckState(settings.value(SETTINGS_INCONCLUSIVE_ERRORS, false).toBool())); + mUI->mShowStatistics->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_STATISTICS, false).toBool())); + mUI->mShowErrorId->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_ERROR_ID, false).toBool())); + mUI->mEditPythonPath->setText(settings.value(SETTINGS_PYTHON_PATH, QString()).toString()); validateEditPythonPath(); - mUI.mEditMisraFile->setText(settings.value(SETTINGS_MISRA_FILE, QString()).toString()); + mUI->mEditMisraFile->setText(settings.value(SETTINGS_MISRA_FILE, QString()).toString()); #ifdef Q_OS_WIN - //mUI.mTabClang->setVisible(true); - mUI.mEditClangPath->setText(settings.value(SETTINGS_CLANG_PATH, QString()).toString()); - mUI.mEditVsIncludePaths->setText(settings.value(SETTINGS_VS_INCLUDE_PATHS, QString()).toString()); - connect(mUI.mBtnBrowseClangPath, &QPushButton::released, this, &SettingsDialog::browseClangPath); + //mUI->mTabClang->setVisible(true); + mUI->mEditClangPath->setText(settings.value(SETTINGS_CLANG_PATH, QString()).toString()); + mUI->mEditVsIncludePaths->setText(settings.value(SETTINGS_VS_INCLUDE_PATHS, QString()).toString()); + connect(mUI->mBtnBrowseClangPath, &QPushButton::released, this, &SettingsDialog::browseClangPath); #else - mUI.mTabClang->setVisible(false); + mUI->mTabClang->setVisible(false); #endif mCurrentStyle = new CodeEditorStyle(CodeEditorStyle::loadSettings(&settings)); manageStyleControls(); - connect(mUI.mEditPythonPath, SIGNAL(textEdited(const QString&)), + connect(mUI->mEditPythonPath, SIGNAL(textEdited(const QString&)), this, SLOT(validateEditPythonPath())); - connect(mUI.mButtons, &QDialogButtonBox::accepted, this, &SettingsDialog::ok); - connect(mUI.mButtons, &QDialogButtonBox::rejected, this, &SettingsDialog::reject); - connect(mUI.mBtnAddApplication, SIGNAL(clicked()), + connect(mUI->mButtons, &QDialogButtonBox::accepted, this, &SettingsDialog::ok); + connect(mUI->mButtons, &QDialogButtonBox::rejected, this, &SettingsDialog::reject); + connect(mUI->mBtnAddApplication, SIGNAL(clicked()), this, SLOT(addApplication())); - connect(mUI.mBtnRemoveApplication, SIGNAL(clicked()), + connect(mUI->mBtnRemoveApplication, SIGNAL(clicked()), this, SLOT(removeApplication())); - connect(mUI.mBtnEditApplication, SIGNAL(clicked()), + connect(mUI->mBtnEditApplication, SIGNAL(clicked()), this, SLOT(editApplication())); - connect(mUI.mBtnDefaultApplication, SIGNAL(clicked()), + connect(mUI->mBtnDefaultApplication, SIGNAL(clicked()), this, SLOT(defaultApplication())); - connect(mUI.mListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), + connect(mUI->mListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(editApplication())); - connect(mUI.mBtnBrowsePythonPath, &QPushButton::clicked, this, &SettingsDialog::browsePythonPath); - connect(mUI.mBtnBrowseMisraFile, &QPushButton::clicked, this, &SettingsDialog::browseMisraFile); - connect(mUI.mBtnEditTheme, SIGNAL(clicked()), this, SLOT(editCodeEditorStyle())); - connect(mUI.mThemeSystem, SIGNAL(released()), this, SLOT(setCodeEditorStyleDefault())); - connect(mUI.mThemeDark, SIGNAL(released()), this, SLOT(setCodeEditorStyleDefault())); - connect(mUI.mThemeLight, SIGNAL(released()), this, SLOT(setCodeEditorStyleDefault())); - connect(mUI.mThemeCustom, SIGNAL(toggled(bool)), mUI.mBtnEditTheme, SLOT(setEnabled(bool))); + connect(mUI->mBtnBrowsePythonPath, &QPushButton::clicked, this, &SettingsDialog::browsePythonPath); + connect(mUI->mBtnBrowseMisraFile, &QPushButton::clicked, this, &SettingsDialog::browseMisraFile); + connect(mUI->mBtnEditTheme, SIGNAL(clicked()), this, SLOT(editCodeEditorStyle())); + connect(mUI->mThemeSystem, SIGNAL(released()), this, SLOT(setCodeEditorStyleDefault())); + connect(mUI->mThemeDark, SIGNAL(released()), this, SLOT(setCodeEditorStyleDefault())); + connect(mUI->mThemeLight, SIGNAL(released()), this, SLOT(setCodeEditorStyleDefault())); + connect(mUI->mThemeCustom, SIGNAL(toggled(bool)), mUI->mBtnEditTheme, SLOT(setEnabled(bool))); - mUI.mListWidget->setSortingEnabled(false); + mUI->mListWidget->setSortingEnabled(false); populateApplicationList(); const int count = QThread::idealThreadCount(); if (count != -1) - mUI.mLblIdealThreads->setText(QString::number(count)); + mUI->mLblIdealThreads->setText(QString::number(count)); else - mUI.mLblIdealThreads->setText(tr("N/A")); + mUI->mLblIdealThreads->setText(tr("N/A")); loadSettings(); initTranslationsList(); @@ -111,6 +114,7 @@ SettingsDialog::SettingsDialog(ApplicationList *list, SettingsDialog::~SettingsDialog() { saveSettings(); + delete mUI; } void SettingsDialog::initTranslationsList() @@ -121,9 +125,9 @@ void SettingsDialog::initTranslationsList() QListWidgetItem *item = new QListWidgetItem; item->setText(translation.mName); item->setData(mLangCodeRole, QVariant(translation.mCode)); - mUI.mListLanguages->addItem(item); + mUI->mListLanguages->addItem(item); if (translation.mCode == current || translation.mCode == current.mid(0, 2)) - mUI.mListLanguages->setCurrentItem(item); + mUI->mListLanguages->setCurrentItem(item); } } @@ -160,32 +164,32 @@ void SettingsDialog::saveSettings() const void SettingsDialog::saveSettingValues() const { - int jobs = mUI.mJobs->text().toInt(); + int jobs = mUI->mJobs->text().toInt(); if (jobs <= 0) { jobs = 1; } QSettings settings; settings.setValue(SETTINGS_CHECK_THREADS, jobs); - saveCheckboxValue(&settings, mUI.mForce, SETTINGS_CHECK_FORCE); - saveCheckboxValue(&settings, mUI.mSaveAllErrors, SETTINGS_SAVE_ALL_ERRORS); - saveCheckboxValue(&settings, mUI.mSaveFullPath, SETTINGS_SAVE_FULL_PATH); - saveCheckboxValue(&settings, mUI.mShowFullPath, SETTINGS_SHOW_FULL_PATH); - saveCheckboxValue(&settings, mUI.mShowNoErrorsMessage, SETTINGS_SHOW_NO_ERRORS); - saveCheckboxValue(&settings, mUI.mShowDebugWarnings, SETTINGS_SHOW_DEBUG_WARNINGS); - saveCheckboxValue(&settings, mUI.mInlineSuppressions, SETTINGS_INLINE_SUPPRESSIONS); - saveCheckboxValue(&settings, mUI.mEnableInconclusive, SETTINGS_INCONCLUSIVE_ERRORS); - saveCheckboxValue(&settings, mUI.mShowStatistics, SETTINGS_SHOW_STATISTICS); - saveCheckboxValue(&settings, mUI.mShowErrorId, SETTINGS_SHOW_ERROR_ID); - settings.setValue(SETTINGS_PYTHON_PATH, mUI.mEditPythonPath->text()); - settings.setValue(SETTINGS_MISRA_FILE, mUI.mEditMisraFile->text()); + saveCheckboxValue(&settings, mUI->mForce, SETTINGS_CHECK_FORCE); + saveCheckboxValue(&settings, mUI->mSaveAllErrors, SETTINGS_SAVE_ALL_ERRORS); + saveCheckboxValue(&settings, mUI->mSaveFullPath, SETTINGS_SAVE_FULL_PATH); + saveCheckboxValue(&settings, mUI->mShowFullPath, SETTINGS_SHOW_FULL_PATH); + saveCheckboxValue(&settings, mUI->mShowNoErrorsMessage, SETTINGS_SHOW_NO_ERRORS); + saveCheckboxValue(&settings, mUI->mShowDebugWarnings, SETTINGS_SHOW_DEBUG_WARNINGS); + saveCheckboxValue(&settings, mUI->mInlineSuppressions, SETTINGS_INLINE_SUPPRESSIONS); + saveCheckboxValue(&settings, mUI->mEnableInconclusive, SETTINGS_INCONCLUSIVE_ERRORS); + saveCheckboxValue(&settings, mUI->mShowStatistics, SETTINGS_SHOW_STATISTICS); + saveCheckboxValue(&settings, mUI->mShowErrorId, SETTINGS_SHOW_ERROR_ID); + settings.setValue(SETTINGS_PYTHON_PATH, mUI->mEditPythonPath->text()); + settings.setValue(SETTINGS_MISRA_FILE, mUI->mEditMisraFile->text()); #ifdef Q_OS_WIN - settings.setValue(SETTINGS_CLANG_PATH, mUI.mEditClangPath->text()); - settings.setValue(SETTINGS_VS_INCLUDE_PATHS, mUI.mEditVsIncludePaths->text()); + settings.setValue(SETTINGS_CLANG_PATH, mUI->mEditClangPath->text()); + settings.setValue(SETTINGS_VS_INCLUDE_PATHS, mUI->mEditVsIncludePaths->text()); #endif - const QListWidgetItem *currentLang = mUI.mListLanguages->currentItem(); + const QListWidgetItem *currentLang = mUI->mListLanguages->currentItem(); if (currentLang) { const QString langcode = currentLang->data(mLangCodeRole).toString(); settings.setValue(SETTINGS_LANGUAGE, langcode); @@ -201,10 +205,10 @@ void SettingsDialog::saveCheckboxValue(QSettings *settings, QCheckBox *box, void SettingsDialog::validateEditPythonPath() { - const auto pythonPath = mUI.mEditPythonPath->text(); + const auto pythonPath = mUI->mEditPythonPath->text(); if (pythonPath.isEmpty()) { - mUI.mEditPythonPath->setStyleSheet(""); - mUI.mPythonPathWarning->hide(); + mUI->mEditPythonPath->setStyleSheet(""); + mUI->mPythonPathWarning->hide(); return; } @@ -212,12 +216,12 @@ void SettingsDialog::validateEditPythonPath() if (!pythonPathInfo.exists() || !pythonPathInfo.isFile() || !pythonPathInfo.isExecutable()) { - mUI.mEditPythonPath->setStyleSheet("QLineEdit {border: 1px solid red}"); - mUI.mPythonPathWarning->setText(tr("The executable file \"%1\" is not available").arg(pythonPath)); - mUI.mPythonPathWarning->show(); + mUI->mEditPythonPath->setStyleSheet("QLineEdit {border: 1px solid red}"); + mUI->mPythonPathWarning->setText(tr("The executable file \"%1\" is not available").arg(pythonPath)); + mUI->mPythonPathWarning->show(); } else { - mUI.mEditPythonPath->setStyleSheet(""); - mUI.mPythonPathWarning->hide(); + mUI->mEditPythonPath->setStyleSheet(""); + mUI->mPythonPathWarning->hide(); } } @@ -228,15 +232,15 @@ void SettingsDialog::addApplication() if (dialog.exec() == QDialog::Accepted) { mTempApplications->addApplication(app); - mUI.mListWidget->addItem(app.getName()); + mUI->mListWidget->addItem(app.getName()); } } void SettingsDialog::removeApplication() { - QList selected = mUI.mListWidget->selectedItems(); + QList selected = mUI->mListWidget->selectedItems(); foreach (QListWidgetItem *item, selected) { - const int removeIndex = mUI.mListWidget->row(item); + const int removeIndex = mUI->mListWidget->row(item); const int currentDefault = mTempApplications->getDefaultApplication(); mTempApplications->removeApplication(removeIndex); if (removeIndex == currentDefault) @@ -246,16 +250,16 @@ void SettingsDialog::removeApplication() // Move default app one up if earlier app was removed mTempApplications->setDefault(currentDefault - 1); } - mUI.mListWidget->clear(); + mUI->mListWidget->clear(); populateApplicationList(); } void SettingsDialog::editApplication() { - QList selected = mUI.mListWidget->selectedItems(); + QList selected = mUI->mListWidget->selectedItems(); QListWidgetItem *item = nullptr; foreach (item, selected) { - int row = mUI.mListWidget->row(item); + int row = mUI->mListWidget->row(item); Application& app = mTempApplications->getApplication(row); ApplicationDialog dialog(tr("Modify an application"), app, this); @@ -270,11 +274,11 @@ void SettingsDialog::editApplication() void SettingsDialog::defaultApplication() { - QList selected = mUI.mListWidget->selectedItems(); + QList selected = mUI->mListWidget->selectedItems(); if (!selected.isEmpty()) { - int index = mUI.mListWidget->row(selected[0]); + int index = mUI->mListWidget->row(selected[0]); mTempApplications->setDefault(index); - mUI.mListWidget->clear(); + mUI->mListWidget->clear(); populateApplicationList(); } } @@ -289,18 +293,18 @@ void SettingsDialog::populateApplicationList() name += " "; name += tr("[Default]"); } - mUI.mListWidget->addItem(name); + mUI->mListWidget->addItem(name); } // Select default application, or if there is no default app then the // first item. if (defapp == -1) - mUI.mListWidget->setCurrentRow(0); + mUI->mListWidget->setCurrentRow(0); else { if (mTempApplications->getApplicationCount() > defapp) - mUI.mListWidget->setCurrentRow(defapp); + mUI->mListWidget->setCurrentRow(defapp); else - mUI.mListWidget->setCurrentRow(0); + mUI->mListWidget->setCurrentRow(0); } } @@ -312,56 +316,56 @@ void SettingsDialog::ok() bool SettingsDialog::showFullPath() const { - return checkStateToBool(mUI.mShowFullPath->checkState()); + return checkStateToBool(mUI->mShowFullPath->checkState()); } bool SettingsDialog::saveFullPath() const { - return checkStateToBool(mUI.mSaveFullPath->checkState()); + return checkStateToBool(mUI->mSaveFullPath->checkState()); } bool SettingsDialog::saveAllErrors() const { - return checkStateToBool(mUI.mSaveAllErrors->checkState()); + return checkStateToBool(mUI->mSaveAllErrors->checkState()); } bool SettingsDialog::showNoErrorsMessage() const { - return checkStateToBool(mUI.mShowNoErrorsMessage->checkState()); + return checkStateToBool(mUI->mShowNoErrorsMessage->checkState()); } bool SettingsDialog::showErrorId() const { - return checkStateToBool(mUI.mShowErrorId->checkState()); + return checkStateToBool(mUI->mShowErrorId->checkState()); } bool SettingsDialog::showInconclusive() const { - return checkStateToBool(mUI.mEnableInconclusive->checkState()); + return checkStateToBool(mUI->mEnableInconclusive->checkState()); } void SettingsDialog::browsePythonPath() { QString fileName = QFileDialog::getOpenFileName(this, tr("Select python binary"), QDir::rootPath()); if (fileName.contains("python", Qt::CaseInsensitive)) - mUI.mEditPythonPath->setText(fileName); + mUI->mEditPythonPath->setText(fileName); } void SettingsDialog::browseMisraFile() { const QString fileName = QFileDialog::getOpenFileName(this, tr("Select MISRA File"), QDir::homePath(), "Misra File (*.pdf *.txt)"); if (!fileName.isEmpty()) - mUI.mEditMisraFile->setText(fileName); + mUI->mEditMisraFile->setText(fileName); } // Slot to set default light style void SettingsDialog::setCodeEditorStyleDefault() { - if (mUI.mThemeSystem->isChecked()) + if (mUI->mThemeSystem->isChecked()) *mCurrentStyle = CodeEditorStyle::getSystemTheme(); - if (mUI.mThemeLight->isChecked()) + if (mUI->mThemeLight->isChecked()) *mCurrentStyle = defaultStyleLight; - if (mUI.mThemeDark->isChecked()) + if (mUI->mThemeDark->isChecked()) *mCurrentStyle = defaultStyleDark; manageStyleControls(); } @@ -384,7 +388,7 @@ void SettingsDialog::browseClangPath() QDir::rootPath()); if (!selectedDir.isEmpty()) { - mUI.mEditClangPath->setText(selectedDir); + mUI->mEditClangPath->setText(selectedDir); } } @@ -393,10 +397,10 @@ void SettingsDialog::manageStyleControls() bool isSystemTheme = mCurrentStyle->isSystemTheme(); bool isDefaultLight = !isSystemTheme && *mCurrentStyle == defaultStyleLight; bool isDefaultDark = !isSystemTheme && *mCurrentStyle == defaultStyleDark; - mUI.mThemeSystem->setChecked(isSystemTheme); - mUI.mThemeLight->setChecked(isDefaultLight && !isDefaultDark); - mUI.mThemeDark->setChecked(!isDefaultLight && isDefaultDark); - mUI.mThemeCustom->setChecked(!isSystemTheme && !isDefaultLight && !isDefaultDark); - mUI.mBtnEditTheme->setEnabled(!isSystemTheme && !isDefaultLight && !isDefaultDark); + mUI->mThemeSystem->setChecked(isSystemTheme); + mUI->mThemeLight->setChecked(isDefaultLight && !isDefaultDark); + mUI->mThemeDark->setChecked(!isDefaultLight && isDefaultDark); + mUI->mThemeCustom->setChecked(!isSystemTheme && !isDefaultLight && !isDefaultDark); + mUI->mBtnEditTheme->setEnabled(!isSystemTheme && !isDefaultLight && !isDefaultDark); } diff --git a/gui/settingsdialog.h b/gui/settingsdialog.h index 489f9c52b..4f4da9d8d 100644 --- a/gui/settingsdialog.h +++ b/gui/settingsdialog.h @@ -20,8 +20,6 @@ #ifndef SETTINGSDIALOG_H #define SETTINGSDIALOG_H -#include "ui_settings.h" - #include class QSettings; @@ -29,6 +27,10 @@ class QWidget; class ApplicationList; class TranslationHandler; class CodeEditorStyle; +class QCheckBox; +namespace Ui { + class Settings; +} /// @addtogroup GUI /// @{ @@ -230,7 +232,7 @@ protected: * @brief Dialog from UI designer * */ - Ui::Settings mUI; + Ui::Settings *mUI; private: void manageStyleControls(); diff --git a/gui/statsdialog.cpp b/gui/statsdialog.cpp index 2e5dc64f5..607cbfe31 100644 --- a/gui/statsdialog.cpp +++ b/gui/statsdialog.cpp @@ -22,6 +22,8 @@ #include "common.h" #include "projectfile.h" +#include "ui_statsdialog.h" + #include #include #include @@ -46,26 +48,32 @@ static const QString CPPCHECK("cppcheck"); StatsDialog::StatsDialog(QWidget *parent) : QDialog(parent), + mUI(new Ui::StatsDialog), mStatistics(nullptr) { - mUI.setupUi(this); + mUI->setupUi(this); setWindowFlags(Qt::Window); - connect(mUI.mCopyToClipboard, &QPushButton::pressed, this, &StatsDialog::copyToClipboard); - connect(mUI.mPDFexport, &QPushButton::pressed, this, &StatsDialog::pdfExport); + connect(mUI->mCopyToClipboard, &QPushButton::pressed, this, &StatsDialog::copyToClipboard); + connect(mUI->mPDFexport, &QPushButton::pressed, this, &StatsDialog::pdfExport); +} + +StatsDialog::~StatsDialog() +{ + delete mUI; } void StatsDialog::setProject(const ProjectFile* projectFile) { if (projectFile) { - mUI.mProject->setText(projectFile->getRootPath()); - mUI.mPaths->setText(projectFile->getCheckPaths().join(";")); - mUI.mIncludePaths->setText(projectFile->getIncludeDirs().join(";")); - mUI.mDefines->setText(projectFile->getDefines().join(";")); - mUI.mUndefines->setText(projectFile->getUndefines().join(";")); + mUI->mProject->setText(projectFile->getRootPath()); + mUI->mPaths->setText(projectFile->getCheckPaths().join(";")); + mUI->mIncludePaths->setText(projectFile->getIncludeDirs().join(";")); + mUI->mDefines->setText(projectFile->getDefines().join(";")); + mUI->mUndefines->setText(projectFile->getUndefines().join(";")); #ifndef HAVE_QCHART - mUI.mTabHistory->setVisible(false); + mUI->mTabHistory->setVisible(false); #else QString statsFile; if (!projectFile->getBuildDir().isEmpty()) { @@ -75,38 +83,38 @@ void StatsDialog::setProject(const ProjectFile* projectFile) statsFile = buildDir + "/statistics.txt"; } } - mUI.mLblHistoryFile->setText(tr("File: ") + (statsFile.isEmpty() ? tr("No cppcheck build dir") : statsFile)); + mUI->mLblHistoryFile->setText(tr("File: ") + (statsFile.isEmpty() ? tr("No cppcheck build dir") : statsFile)); if (!statsFile.isEmpty()) { QChartView *chartView; chartView = createChart(statsFile, "cppcheck"); - mUI.mTabHistory->layout()->addWidget(chartView); + mUI->mTabHistory->layout()->addWidget(chartView); if (projectFile->getClangAnalyzer()) { chartView = createChart(statsFile, CLANG_ANALYZER); - mUI.mTabHistory->layout()->addWidget(chartView); + mUI->mTabHistory->layout()->addWidget(chartView); } if (projectFile->getClangTidy()) { chartView = createChart(statsFile, CLANG_TIDY); - mUI.mTabHistory->layout()->addWidget(chartView); + mUI->mTabHistory->layout()->addWidget(chartView); } } #endif } else { - mUI.mProject->setText(QString()); - mUI.mPaths->setText(QString()); - mUI.mIncludePaths->setText(QString()); - mUI.mDefines->setText(QString()); - mUI.mUndefines->setText(QString()); + mUI->mProject->setText(QString()); + mUI->mPaths->setText(QString()); + mUI->mIncludePaths->setText(QString()); + mUI->mDefines->setText(QString()); + mUI->mUndefines->setText(QString()); } } void StatsDialog::setPathSelected(const QString& path) { - mUI.mPath->setText(path); + mUI->mPath->setText(path); } void StatsDialog::setNumberOfFilesScanned(int num) { - mUI.mNumberOfFilesScanned->setText(QString::number(num)); + mUI->mNumberOfFilesScanned->setText(QString::number(num)); } void StatsDialog::setScanDuration(double seconds) @@ -135,7 +143,7 @@ void StatsDialog::setScanDuration(double seconds) if (parts.isEmpty()) parts << tr("0.%1 seconds").arg(int(10.0 *(seconds - secs))); - mUI.mScanDuration->setText(parts.join(tr(" and "))); + mUI->mScanDuration->setText(parts.join(tr(" and "))); } void StatsDialog::pdfExport() { @@ -213,15 +221,15 @@ void StatsDialog::copyToClipboard() ) .arg(projSettings) .arg(project) - .arg(mUI.mProject->text()) + .arg(mUI->mProject->text()) .arg(paths) - .arg(mUI.mPaths->text()) + .arg(mUI->mPaths->text()) .arg(incPaths) - .arg(mUI.mIncludePaths->text()) + .arg(mUI->mIncludePaths->text()) .arg(defines) - .arg(mUI.mDefines->text()) + .arg(mUI->mDefines->text()) .arg(undefines) - .arg(mUI.mUndefines->text()); + .arg(mUI->mUndefines->text()); const QString previous = QString( "%1\n" @@ -231,11 +239,11 @@ void StatsDialog::copyToClipboard() ) .arg(prevScan) .arg(selPath) - .arg(mUI.mPath->text()) + .arg(mUI->mPath->text()) .arg(numFiles) - .arg(mUI.mNumberOfFilesScanned->text()) + .arg(mUI->mNumberOfFilesScanned->text()) .arg(duration) - .arg(mUI.mScanDuration->text()); + .arg(mUI->mScanDuration->text()); const QString statistics = QString( "%1\n" @@ -275,15 +283,15 @@ void StatsDialog::copyToClipboard() ) .arg(projSettings) .arg(project) - .arg(mUI.mProject->text()) + .arg(mUI->mProject->text()) .arg(paths) - .arg(mUI.mPaths->text()) + .arg(mUI->mPaths->text()) .arg(incPaths) - .arg(mUI.mIncludePaths->text()) + .arg(mUI->mIncludePaths->text()) .arg(defines) - .arg(mUI.mDefines->text()) + .arg(mUI->mDefines->text()) .arg(undefines) - .arg(mUI.mUndefines->text()); + .arg(mUI->mUndefines->text()); const QString htmlPrevious = QString( "

%1

\n" @@ -295,11 +303,11 @@ void StatsDialog::copyToClipboard() ) .arg(prevScan) .arg(selPath) - .arg(mUI.mPath->text()) + .arg(mUI->mPath->text()) .arg(numFiles) - .arg(mUI.mNumberOfFilesScanned->text()) + .arg(mUI->mNumberOfFilesScanned->text()) .arg(duration) - .arg(mUI.mScanDuration->text()); + .arg(mUI->mScanDuration->text()); const QString htmlStatistics = QString( "

%1

\n" @@ -336,12 +344,12 @@ void StatsDialog::copyToClipboard() void StatsDialog::setStatistics(const CheckStatistics *stats) { mStatistics = stats; - mUI.mLblErrors->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowErrors))); - mUI.mLblWarnings->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowWarnings))); - mUI.mLblStyle->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowStyle))); - mUI.mLblPortability->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowPortability))); - mUI.mLblPerformance->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowPerformance))); - mUI.mLblInformation->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowInformation))); + mUI->mLblErrors->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowErrors))); + mUI->mLblWarnings->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowWarnings))); + mUI->mLblStyle->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowStyle))); + mUI->mLblPortability->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowPortability))); + mUI->mLblPerformance->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowPerformance))); + mUI->mLblInformation->setText(QString("%1").arg(stats->getCount(CPPCHECK,ShowTypes::ShowInformation))); } #ifdef HAVE_QCHART diff --git a/gui/statsdialog.h b/gui/statsdialog.h index 37ff1f5dd..d9ad94cf9 100644 --- a/gui/statsdialog.h +++ b/gui/statsdialog.h @@ -19,12 +19,13 @@ #ifndef STATSDIALOG_H #define STATSDIALOG_H -#include "ui_stats.h" - #include class ProjectFile; class CheckStatistics; +namespace Ui { + class StatsDialog; +} #ifdef HAVE_QCHART namespace QtCharts { @@ -44,6 +45,7 @@ class StatsDialog : public QDialog { Q_OBJECT public: explicit StatsDialog(QWidget *parent = nullptr); + ~StatsDialog() override; /** * @brief Sets the project to extract statistics from @@ -78,7 +80,7 @@ private slots: QtCharts::QLineSeries *numberOfReports(const QString &fileName, const QString &severity) const; #endif private: - Ui::StatsDialog mUI; + Ui::StatsDialog *mUI; const CheckStatistics *mStatistics; }; diff --git a/gui/stats.ui b/gui/statsdialog.ui similarity index 100% rename from gui/stats.ui rename to gui/statsdialog.ui