GUI: Remove GUI for showing unused functions.

Implements ticket #443 (Remove checking of unused functions from GUI) https://sourceforge.net/apps/trac/cppcheck/ticket/443
See also ticket #434
https://sourceforge.net/apps/trac/cppcheck/ticket/434
This commit is contained in:
Kimmo Varis 2009-06-27 10:41:30 +03:00
parent 64f88f147c
commit 64f304684f
4 changed files with 0 additions and 32 deletions

View File

@ -28,7 +28,6 @@ typedef enum
SHOW_ALL = 0, SHOW_ALL = 0,
SHOW_STYLE, SHOW_STYLE,
SHOW_SECURITY, SHOW_SECURITY,
SHOW_UNUSED,
SHOW_ERRORS, SHOW_ERRORS,
SHOW_NONE SHOW_NONE
} }

View File

@ -45,7 +45,6 @@ MainWindow::MainWindow() :
mActionShowAll(tr("Show possible false positives"), this), mActionShowAll(tr("Show possible false positives"), this),
mActionShowSecurity(tr("Show &security errors"), this), mActionShowSecurity(tr("Show &security errors"), this),
mActionShowStyle(tr("Show s&tyle errors"), this), mActionShowStyle(tr("Show s&tyle errors"), this),
mActionShowUnused(tr("Show errors on &unused functions"), this),
mActionShowErrors(tr("Show &common errors"), this), mActionShowErrors(tr("Show &common errors"), this),
mActionShowCheckAll(tr("Show all"), this), mActionShowCheckAll(tr("Show all"), this),
mActionShowUncheckAll(tr("Hide all"), this), mActionShowUncheckAll(tr("Hide all"), this),
@ -73,7 +72,6 @@ MainWindow::MainWindow() :
connect(&mActionShowAll, SIGNAL(toggled(bool)), this, SLOT(ShowAll(bool))); connect(&mActionShowAll, SIGNAL(toggled(bool)), this, SLOT(ShowAll(bool)));
connect(&mActionShowSecurity, SIGNAL(toggled(bool)), this, SLOT(ShowSecurity(bool))); connect(&mActionShowSecurity, SIGNAL(toggled(bool)), this, SLOT(ShowSecurity(bool)));
connect(&mActionShowStyle, SIGNAL(toggled(bool)), this, SLOT(ShowStyle(bool))); connect(&mActionShowStyle, SIGNAL(toggled(bool)), this, SLOT(ShowStyle(bool)));
connect(&mActionShowUnused, SIGNAL(toggled(bool)), this, SLOT(ShowUnused(bool)));
connect(&mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool))); connect(&mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool)));
connect(&mActionShowCheckAll, SIGNAL(triggered()), this, SLOT(CheckAll())); connect(&mActionShowCheckAll, SIGNAL(triggered()), this, SLOT(CheckAll()));
connect(&mActionShowUncheckAll, SIGNAL(triggered()), this, SLOT(UncheckAll())); connect(&mActionShowUncheckAll, SIGNAL(triggered()), this, SLOT(UncheckAll()));
@ -138,7 +136,6 @@ void MainWindow::CreateMenus()
menuview->addAction(&mActionShowAll); menuview->addAction(&mActionShowAll);
menuview->addAction(&mActionShowSecurity); menuview->addAction(&mActionShowSecurity);
menuview->addAction(&mActionShowStyle); menuview->addAction(&mActionShowStyle);
menuview->addAction(&mActionShowUnused);
menuview->addAction(&mActionShowErrors); menuview->addAction(&mActionShowErrors);
menuview->addSeparator(); menuview->addSeparator();
menuview->addAction(&mActionShowCheckAll); menuview->addAction(&mActionShowCheckAll);
@ -150,7 +147,6 @@ void MainWindow::CreateMenus()
mActionShowAll.setCheckable(true); mActionShowAll.setCheckable(true);
mActionShowSecurity.setCheckable(true); mActionShowSecurity.setCheckable(true);
mActionShowStyle.setCheckable(true); mActionShowStyle.setCheckable(true);
mActionShowUnused.setCheckable(true);
mActionShowErrors.setCheckable(true); mActionShowErrors.setCheckable(true);
// Program-menu // Program-menu
@ -194,14 +190,12 @@ void MainWindow::LoadSettings()
mActionShowAll.setChecked(mSettings.value(tr("Show all"), true).toBool()); mActionShowAll.setChecked(mSettings.value(tr("Show all"), true).toBool());
mActionShowSecurity.setChecked(mSettings.value(tr("Show security"), true).toBool()); mActionShowSecurity.setChecked(mSettings.value(tr("Show security"), true).toBool());
mActionShowStyle.setChecked(mSettings.value(tr("Show style"), true).toBool()); mActionShowStyle.setChecked(mSettings.value(tr("Show style"), true).toBool());
mActionShowUnused.setChecked(mSettings.value(tr("Show unused"), true).toBool());
mActionShowErrors.setChecked(mSettings.value(tr("Show errors"), true).toBool()); mActionShowErrors.setChecked(mSettings.value(tr("Show errors"), true).toBool());
mResults.ShowResults(SHOW_ALL, mActionShowAll.isChecked()); mResults.ShowResults(SHOW_ALL, mActionShowAll.isChecked());
mResults.ShowResults(SHOW_ERRORS, mActionShowErrors.isChecked()); mResults.ShowResults(SHOW_ERRORS, mActionShowErrors.isChecked());
mResults.ShowResults(SHOW_SECURITY, mActionShowSecurity.isChecked()); mResults.ShowResults(SHOW_SECURITY, mActionShowSecurity.isChecked());
mResults.ShowResults(SHOW_STYLE, mActionShowStyle.isChecked()); mResults.ShowResults(SHOW_STYLE, mActionShowStyle.isChecked());
mResults.ShowResults(SHOW_UNUSED, mActionShowUnused.isChecked());
mApplications.LoadSettings(mSettings); mApplications.LoadSettings(mSettings);
} }
@ -214,7 +208,6 @@ void MainWindow::SaveSettings()
mSettings.setValue(tr("Show all"), mActionShowAll.isChecked()); mSettings.setValue(tr("Show all"), mActionShowAll.isChecked());
mSettings.setValue(tr("Show security"), mActionShowSecurity.isChecked()); mSettings.setValue(tr("Show security"), mActionShowSecurity.isChecked());
mSettings.setValue(tr("Show style"), mActionShowStyle.isChecked()); mSettings.setValue(tr("Show style"), mActionShowStyle.isChecked());
mSettings.setValue(tr("Show unused"), mActionShowUnused.isChecked());
mSettings.setValue(tr("Show errors"), mActionShowErrors.isChecked()); mSettings.setValue(tr("Show errors"), mActionShowErrors.isChecked());
mApplications.SaveSettings(mSettings); mApplications.SaveSettings(mSettings);
} }
@ -446,11 +439,6 @@ void MainWindow::ShowStyle(bool checked)
mResults.ShowResults(SHOW_STYLE, checked); mResults.ShowResults(SHOW_STYLE, checked);
} }
void MainWindow::ShowUnused(bool checked)
{
mResults.ShowResults(SHOW_UNUSED, checked);
}
void MainWindow::ShowErrors(bool checked) void MainWindow::ShowErrors(bool checked)
{ {
mResults.ShowResults(SHOW_ERRORS, checked); mResults.ShowResults(SHOW_ERRORS, checked);
@ -500,9 +488,6 @@ void MainWindow::ToggleAllChecked(bool checked)
mActionShowStyle.setChecked(checked); mActionShowStyle.setChecked(checked);
ShowStyle(checked); ShowStyle(checked);
mActionShowUnused.setChecked(checked);
ShowUnused(checked);
mActionShowErrors.setChecked(checked); mActionShowErrors.setChecked(checked);
ShowErrors(checked); ShowErrors(checked);
} }

View File

@ -79,12 +79,6 @@ public slots:
*/ */
void ShowStyle(bool checked); void ShowStyle(bool checked);
/**
* @brief Show errors with type "unused"
* @param checked Should errors be shown (truw) or hidden (false)
*/
void ShowUnused(bool checked);
/** /**
* @brief Show errors with type "error" * @brief Show errors with type "error"
* @param checked Should errors be shown (truw) or hidden (false) * @param checked Should errors be shown (truw) or hidden (false)
@ -289,12 +283,6 @@ protected:
*/ */
QAction mActionShowStyle; QAction mActionShowStyle;
/**
* @brief Action to show errors with type "unused"
*
*/
QAction mActionShowUnused;
/** /**
* @brief Action to show errors with type "error" * @brief Action to show errors with type "error"
* *

View File

@ -613,10 +613,6 @@ QString ResultsTree::ShowTypeToString(ShowTypes type)
return "security"; return "security";
break; break;
case SHOW_UNUSED:
return "unused";
break;
case SHOW_ERRORS: case SHOW_ERRORS:
return "error"; return "error";
break; break;