From 5d55bc05812815a6a359f31adb53833f60a6d514 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Sat, 3 Jul 2010 12:58:56 +0300 Subject: [PATCH] GUI: Remove remains of "possible error". --- gui/common.h | 4 +-- gui/cppcheck_de.ts | 88 ++++++++++++++++++++------------------------- gui/cppcheck_en.ts | 88 ++++++++++++++++++++------------------------- gui/cppcheck_fi.ts | 88 ++++++++++++++++++++------------------------- gui/cppcheck_nl.ts | 88 ++++++++++++++++++++------------------------- gui/cppcheck_pl.ts | 86 ++++++++++++++++++++------------------------ gui/cppcheck_ru.ts | 88 ++++++++++++++++++++------------------------- gui/cppcheck_se.ts | 88 ++++++++++++++++++++------------------------- gui/main.ui | 8 ----- gui/mainwindow.cpp | 12 ------- gui/mainwindow.h | 6 ---- gui/resultstree.cpp | 8 +---- 12 files changed, 274 insertions(+), 378 deletions(-) diff --git a/gui/common.h b/gui/common.h index 841531161..aed345f27 100644 --- a/gui/common.h +++ b/gui/common.h @@ -29,8 +29,7 @@ */ typedef enum { - SHOW_ALL = 0, - SHOW_STYLE, + SHOW_STYLE = 0, SHOW_ERRORS, SHOW_NONE } @@ -42,7 +41,6 @@ ShowTypes; #define SETTINGS_WINDOW_MAXIMIZED "Window maximized" #define SETTINGS_WINDOW_WIDTH "Window width" #define SETTINGS_WINDOW_HEIGHT "Window height" -#define SETTINGS_SHOW_ALL "Show all" #define SETTINGS_SHOW_STYLE "Show style" #define SETTINGS_SHOW_ERRORS "Show errors" #define SETTINGS_CHECK_PATH "Check path" diff --git a/gui/cppcheck_de.ts b/gui/cppcheck_de.ts index c5a8c67f3..99b91d85c 100644 --- a/gui/cppcheck_de.ts +++ b/gui/cppcheck_de.ts @@ -128,10 +128,10 @@ kate -l(line) (file) MainWindow - - - - + + + + Cppcheck @@ -140,11 +140,6 @@ kate -l(line) (file) Standard - - - Show possible false positives - - &File @@ -246,53 +241,53 @@ kate -l(line) (file) - + Show style errors Show security errors - + Show common errors - + &Check all - + &Uncheck all - + Collapse &all - + &Expand all - + &Toolbar - + &Contents - + Open the help contents - + F1 @@ -307,69 +302,69 @@ kate -l(line) (file) - + Select files to check - + Select directory to check - + No suitable files found to check! - + Cannot exit while checking. Stop the checking before exiting. - + License - + Authors - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Save the report file - + XML files (*.xml) - + Text files (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 - + Failed to change the language: %1 @@ -440,25 +435,25 @@ Stop the checking before exiting. ResultsTree - + File - + Severity - + Line - + Message @@ -468,50 +463,45 @@ Stop the checking before exiting. - + Copy filename - + Copy full path - + Copy message - + Cppcheck - + Configure the text file viewer program in Cppcheck preferences/Applications. You can open this error by specifying applications in program's settings. - + Could not start %1 Please check the application path and parameters are correct. - - possible error - - - - + style - + error diff --git a/gui/cppcheck_en.ts b/gui/cppcheck_en.ts index 607e8a201..227900352 100644 --- a/gui/cppcheck_en.ts +++ b/gui/cppcheck_en.ts @@ -141,10 +141,10 @@ kate -l(line) (file) MainWindow - - - - + + + + Cppcheck Cppcheck @@ -153,11 +153,6 @@ kate -l(line) (file) Standard Standard - - - Show possible false positives - Show possible false positives - &File @@ -259,53 +254,53 @@ kate -l(line) (file) &Preferences - + Show style errors Show security errors Show security errors - + Show common errors Show common errors - + &Check all &Check all - + &Uncheck all &Uncheck all - + Collapse &all Collapse &all - + &Expand all &Expand all - + &Toolbar &Toolbar - + &Contents - + Open the help contents - + F1 @@ -320,22 +315,22 @@ kate -l(line) (file) &Help - + Select files to check Select files to check - + Select directory to check Select directory to check - + No suitable files found to check! No suitable files found to check! - + Cannot exit while checking. Stop the checking before exiting. @@ -344,47 +339,47 @@ Stop the checking before exiting. Stop the checking before exiting. - + License License - + Authors Authors - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Save the report file Save the report file - + XML files (*.xml) XML files (*.xml) - + Text files (*.txt) Text files (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the language: %1 @@ -457,25 +452,25 @@ Stop the checking before exiting. ResultsTree - + File File - + Severity Severity - + Line Line - + Message Message @@ -485,33 +480,33 @@ Stop the checking before exiting. Undefined file - + Copy filename Copy filename - + Copy full path Copy full path - + Copy message - + Cppcheck Cppcheck - + Configure the text file viewer program in Cppcheck preferences/Applications. You can open this error by specifying applications in program's settings. You can open this error by specifying applications in program's settings. - + Could not start %1 Please check the application path and parameters are correct. @@ -520,17 +515,12 @@ Please check the application path and parameters are correct. Please check the application path and parameters are correct. - - possible error - possible error - - - + style Style - + error Error diff --git a/gui/cppcheck_fi.ts b/gui/cppcheck_fi.ts index 7cefbaee9..0be8271d1 100644 --- a/gui/cppcheck_fi.ts +++ b/gui/cppcheck_fi.ts @@ -143,10 +143,10 @@ kate -l(line) (file) MainWindow - - - - + + + + Cppcheck Cppcheck @@ -155,11 +155,6 @@ kate -l(line) (file) Standard Vakio - - - Show possible false positives - Näytä epävarmat virheet - &File @@ -261,53 +256,53 @@ kate -l(line) (file) &Asetukset - + Show style errors Show security errors Näytä tietoturvavirheet - + Show common errors Näytä yleiset virheet - + &Check all &Valitse kaikki - + &Uncheck all &Poista kaikista valinta - + Collapse &all &Pienennä kaikki - + &Expand all &Laajenna kaikki - + &Toolbar &Työkalupalkki - + &Contents - + Open the help contents - + F1 @@ -322,22 +317,22 @@ kate -l(line) (file) &Ohje - + Select files to check Valitse tarkistettavat tiedostot - + Select directory to check Valitse tarkistettava hakemisto - + No suitable files found to check! Tarkistettavaksi sopivia tiedostoja ei löytynyt! - + Cannot exit while checking. Stop the checking before exiting. @@ -346,47 +341,47 @@ Stop the checking before exiting. Lopeta tarkistus ennen ohjelman sammuttamista. - + License Lisenssi - + Authors Tekijät - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML-tiedostot (*.xml);;Tekstitiedostot (*.txt);;CSV-tiedostot (*.csv) - + Save the report file Tallenna raportti - + XML files (*.xml) XML-tiedostot (*xml) - + Text files (*.txt) Tekstitiedostot (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the language: %1 @@ -461,25 +456,25 @@ Lopeta tarkistus ennen ohjelman sammuttamista. ResultsTree - + File Tiedosto - + Severity Tyyppi - + Line Rivi - + Message Virhe @@ -489,33 +484,33 @@ Lopeta tarkistus ennen ohjelman sammuttamista. Määrittelemätön tiedosto - + Copy filename Kopioi tiedostonimi - + Copy full path Kopioi tiedoston koko polku - + Copy message - + Cppcheck Cppcheck - + Configure the text file viewer program in Cppcheck preferences/Applications. You can open this error by specifying applications in program's settings. Voit asetuksista määritellä muita ohjelmia joilla avata tämän virheen sisältävän tiedoston. - + Could not start %1 Please check the application path and parameters are correct. @@ -524,17 +519,12 @@ Please check the application path and parameters are correct. Tarkista että ohjelman polku ja parametrit ovat oikeat. - - possible error - mahdollinen virhe - - - + style Tyyli - + error Yleinen diff --git a/gui/cppcheck_nl.ts b/gui/cppcheck_nl.ts index 32fd9ea82..576a5149e 100644 --- a/gui/cppcheck_nl.ts +++ b/gui/cppcheck_nl.ts @@ -141,10 +141,10 @@ kate -l(line) (file) MainWindow - - - - + + + + Cppcheck Cppcheck @@ -153,11 +153,6 @@ kate -l(line) (file) Standard Standaard - - - Show possible false positives - Toon mogelijke false positives - &File @@ -259,53 +254,53 @@ kate -l(line) (file) &Voorkeuren - + Show style errors Show security errors Toon beveiligingsfouten - + Show common errors Toon gewone fouten - + &Check all &Selecteer alles - + &Uncheck all Selecteer &niets - + Collapse &all Alles Inkl&appen - + &Expand all Alles &Uitklappen - + &Toolbar Wer&kbalk - + &Contents - + Open the help contents - + F1 @@ -320,22 +315,22 @@ kate -l(line) (file) &Help - + Select files to check Selecteer bestanden om te controleren - + Select directory to check Selecteer een map om te controleren - + No suitable files found to check! Geen geschikte bestanden gevonden om te controleren! - + Cannot exit while checking. Stop the checking before exiting. @@ -344,47 +339,47 @@ Stop the checking before exiting. Stop de controle alvorens te sluiten. - + License Licentie - + Authors Auteurs - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML bestanden (*.xml);;Tekst bestanden (*.txt);;CSV bestanden (*.csv) - + Save the report file Rapport opslaan - + XML files (*.xml) XML bestanden (*.xml) - + Text files (*.txt) Tekst bestanden (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the language: %1 @@ -457,25 +452,25 @@ Stop de controle alvorens te sluiten. ResultsTree - + File Bestand - + Severity Ernst - + Line Regel - + Message Boodschap @@ -485,33 +480,33 @@ Stop de controle alvorens te sluiten. Niet gedefinieerd bestand - + Copy filename Kopier bestandsnaam - + Copy full path Kopieer volledig pad - + Copy message - + Cppcheck Cppcheck - + Configure the text file viewer program in Cppcheck preferences/Applications. You can open this error by specifying applications in program's settings. U dient een applicatie te configureren in de instellingen om deze fout in te openen. - + Could not start %1 Please check the application path and parameters are correct. @@ -520,17 +515,12 @@ Please check the application path and parameters are correct. Gelieve te controleren of de het pad en de parameters correct zijn. - - possible error - Mogelijke fouten - - - + style Stijlfouten - + error Fouten diff --git a/gui/cppcheck_pl.ts b/gui/cppcheck_pl.ts index 645b1fd5b..453df034c 100644 --- a/gui/cppcheck_pl.ts +++ b/gui/cppcheck_pl.ts @@ -128,10 +128,10 @@ kate -l(line) (file) MainWindow - - - - + + + + Cppcheck @@ -252,124 +252,119 @@ kate -l(line) (file) - Show possible false positives - - - - Show style errors Show security errors - + Show common errors - + &Check all - + &Uncheck all - + Collapse &all - + &Expand all - + &Toolbar - + &Contents - + Open the help contents - + F1 - + No suitable files found to check! - + Select files to check - + Select directory to check - + Cannot exit while checking. Stop the checking before exiting. - + License - + Authors - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Save the report file - + XML files (*.xml) - + Text files (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 - + Failed to change the language: %1 @@ -435,25 +430,25 @@ Stop the checking before exiting. ResultsTree - + File - + Severity - + Line - + Message @@ -463,49 +458,44 @@ Stop the checking before exiting. - + Copy filename - + Copy full path - + Copy message - + Cppcheck - + Configure the text file viewer program in Cppcheck preferences/Applications. - + Could not start %1 Please check the application path and parameters are correct. - - possible error - - - - + style - + error diff --git a/gui/cppcheck_ru.ts b/gui/cppcheck_ru.ts index e78af8df3..72ff9d9ae 100644 --- a/gui/cppcheck_ru.ts +++ b/gui/cppcheck_ru.ts @@ -131,10 +131,10 @@ kate -l(line) (file) MainWindow - - - - + + + + Cppcheck Cppcheck @@ -143,11 +143,6 @@ kate -l(line) (file) Standard - - - Show possible false positives - Показывать возможные ложные срабатывания - &File @@ -249,53 +244,53 @@ kate -l(line) (file) Параметры - + Show style errors Show security errors Показывать ошибки безопасности - + Show common errors Показывать общие ошибки - + &Check all Отметить все - + &Uncheck all Сбросить все - + Collapse &all Свернуть все - + &Expand all Развернуть все - + &Toolbar Панель инструментов - + &Contents - + Open the help contents - + F1 @@ -310,69 +305,69 @@ kate -l(line) (file) Помощь - + Select files to check Выберите файлы для проверки - + Select directory to check Выберите каталог для проверки - + No suitable files found to check! - + Cannot exit while checking. Stop the checking before exiting. - + License Лицензия - + Authors Авторы - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) - + Save the report file - + XML files (*.xml) - + Text files (*.txt) Текстовые файлы (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the language: %1 @@ -447,25 +442,25 @@ Stop the checking before exiting. ResultsTree - + File Файл - + Severity Важность - + Line Строка - + Message Сообщение @@ -475,50 +470,45 @@ Stop the checking before exiting. - + Copy filename Скопировать имя файла - + Copy full path Скопировать полный путь - + Copy message - + Cppcheck Cppcheck - + Configure the text file viewer program in Cppcheck preferences/Applications. You can open this error by specifying applications in program's settings. - + Could not start %1 Please check the application path and parameters are correct. - - possible error - - - - + style - + error diff --git a/gui/cppcheck_se.ts b/gui/cppcheck_se.ts index d412c3670..4eddf42b4 100644 --- a/gui/cppcheck_se.ts +++ b/gui/cppcheck_se.ts @@ -141,10 +141,10 @@ kate -l(line) (file) MainWindow - - - - + + + + Cppcheck Cppcheck @@ -153,11 +153,6 @@ kate -l(line) (file) Standard Standard - - - Show possible false positives - Visa möjliga false positives - &File @@ -259,54 +254,54 @@ kate -l(line) (file) &Inställningar - + Show style errors Show security errors Säkerhetsvarningar - + Show common errors Vanliga fel - + &Check all &Kryssa alla - + &Uncheck all Kryssa &ur alla - + Collapse &all Ingen bra översättning! &Fäll ihop alla - + &Expand all &Expandera alla - + &Toolbar &Verktyg - + &Contents - + Open the help contents - + F1 @@ -321,69 +316,69 @@ kate -l(line) (file) &Hjälp - + Select files to check Välj filer att kontrollera - + Select directory to check Välj katalog som skall kontrolleras - + No suitable files found to check! Inga lämpliga filer hittades! - + Cannot exit while checking. Stop the checking before exiting. Kan ej avsluta medans check pågår. - + License Licens - + Authors Utvecklare - + XML files (*.xml);;Text files (*.txt);;CSV files (*.csv) XML filer (*.xml);;Text filer (*.txt);;CSV filer (*.csv) - + Save the report file Spara rapport - + XML files (*.xml) XML filer (*.xml) - + Text files (*.txt) Text filer (*.txt) - + CSV files (*.csv) - + Cppcheck - %1 Cppcheck - %1 - + Failed to change the language: %1 @@ -458,25 +453,25 @@ Stop the checking before exiting. ResultsTree - + File Fil - + Severity Typ - + Line Rad - + Message Meddelande @@ -486,33 +481,33 @@ Stop the checking before exiting. Odefinierad fil - + Copy filename Kopiera filnamn - + Copy full path Kopiera full sökväg - + Copy message - + Cppcheck Cppcheck - + Configure the text file viewer program in Cppcheck preferences/Applications. You can open this error by specifying applications in program's settings. Konfigurera program i inställningar/program. - + Could not start %1 Please check the application path and parameters are correct. @@ -521,17 +516,12 @@ Please check the application path and parameters are correct. Kontrollera att sökvägen och parametrarna är korrekta. - - possible error - Möjligt fel - - - + style stil - + error fel diff --git a/gui/main.ui b/gui/main.ui index 69e839911..29c3d11ff 100644 --- a/gui/main.ui +++ b/gui/main.ui @@ -244,14 +244,6 @@ &Preferences - - - true - - - Show possible false positives - - true diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index c7e27ab4b..03b6a5170 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -57,7 +57,6 @@ MainWindow::MainWindow() : connect(mUI.mActionSettings, SIGNAL(triggered()), this, SLOT(ProgramSettings())); connect(mUI.mActionClearResults, SIGNAL(triggered()), this, SLOT(ClearResults())); - connect(mUI.mActionShowAll, SIGNAL(toggled(bool)), this, SLOT(ShowAll(bool))); connect(mUI.mActionShowStyle, SIGNAL(toggled(bool)), this, SLOT(ShowStyle(bool))); connect(mUI.mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool))); connect(mUI.mActionCheckAll, SIGNAL(triggered()), this, SLOT(CheckAll())); @@ -156,11 +155,9 @@ void MainWindow::LoadSettings() mSettings->value(SETTINGS_WINDOW_HEIGHT, 600).toInt()); } - mUI.mActionShowAll->setChecked(mSettings->value(SETTINGS_SHOW_ALL, true).toBool()); mUI.mActionShowStyle->setChecked(mSettings->value(SETTINGS_SHOW_STYLE, true).toBool()); mUI.mActionShowErrors->setChecked(mSettings->value(SETTINGS_SHOW_ERRORS, true).toBool()); - mUI.mResults->ShowResults(SHOW_ALL, mUI.mActionShowAll->isChecked()); mUI.mResults->ShowResults(SHOW_ERRORS, mUI.mActionShowErrors->isChecked()); mUI.mResults->ShowResults(SHOW_STYLE, mUI.mActionShowStyle->isChecked()); @@ -181,7 +178,6 @@ void MainWindow::SaveSettings() mSettings->setValue(SETTINGS_WINDOW_HEIGHT, size().height()); mSettings->setValue(SETTINGS_WINDOW_MAXIMIZED, isMaximized()); - mSettings->setValue(SETTINGS_SHOW_ALL, mUI.mActionShowAll->isChecked()); mSettings->setValue(SETTINGS_SHOW_STYLE, mUI.mActionShowStyle->isChecked()); mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI.mActionShowErrors->isChecked()); mSettings->setValue(SETTINGS_TOOLBARS_SHOW, mUI.mToolBar->isVisible()); @@ -445,11 +441,6 @@ void MainWindow::EnableCheckButtons(bool enable) mUI.mActionCheckDirectory->setEnabled(enable); } -void MainWindow::ShowAll(bool checked) -{ - mUI.mResults->ShowResults(SHOW_ALL, checked); -} - void MainWindow::ShowStyle(bool checked) { mUI.mResults->ShowResults(SHOW_STYLE, checked); @@ -496,9 +487,6 @@ void MainWindow::closeEvent(QCloseEvent *event) void MainWindow::ToggleAllChecked(bool checked) { - mUI.mActionShowAll->setChecked(checked); - ShowAll(checked); - mUI.mActionShowStyle->setChecked(checked); ShowStyle(checked); diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 014b6fadd..457163ed2 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -67,12 +67,6 @@ public slots: */ void ClearResults(); - /** - * @brief Show errors with type "possible error" - * @param checked Should errors be shown (true) or hidden (false) - */ - void ShowAll(bool checked); - /** * @brief Show errors with type "style" * @param checked Should errors be shown (true) or hidden (false) diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index f62ca8c1e..e69138a81 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -209,7 +209,7 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent, ShowTypes ResultsTree::VariantToShowType(const QVariant &data) { int value = data.toInt(); - if (value < SHOW_ALL && value > SHOW_ERRORS) + if (value < SHOW_STYLE && value > SHOW_ERRORS) { return SHOW_NONE; } @@ -218,8 +218,6 @@ ShowTypes ResultsTree::VariantToShowType(const QVariant &data) ShowTypes ResultsTree::SeverityToShowType(const QString & severity) { - if (severity == "possible error") - return SHOW_ALL; if (severity == "error") return SHOW_ERRORS; if (severity == "style") @@ -659,10 +657,6 @@ QString ResultsTree::ShowTypeToString(ShowTypes type) { switch (type) { - case SHOW_ALL: - return tr("possible error"); - break; - case SHOW_STYLE: return tr("style"); break;