GUI: Add Information-severity support.

This commit is contained in:
Kimmo Varis 2010-12-26 12:35:31 +02:00
parent 243a524909
commit 31c974c954
5 changed files with 17 additions and 0 deletions

View File

@ -45,6 +45,9 @@ void CheckStatistics::AddItem(ShowTypes type)
case SHOW_ERRORS:
mError++;
break;
case SHOW_INFORMATION:
mInformation++;
break;
case SHOW_NONE:
default:
qDebug() << "Unknown error type - not added to statistics.";
@ -58,6 +61,7 @@ void CheckStatistics::Clear()
mWarning = 0;
mPerformance = 0;
mPortability = 0;
mInformation = 0;
mError = 0;
}
@ -81,6 +85,9 @@ unsigned CheckStatistics::GetCount(ShowTypes type) const
case SHOW_ERRORS:
count = mError;
break;
case SHOW_INFORMATION:
count = mInformation;
break;
case SHOW_NONE:
default:
qDebug() << "Unknown error type - returning zero statistics.";

View File

@ -59,6 +59,7 @@ private:
unsigned mWarning;
unsigned mPerformance;
unsigned mPortability;
unsigned mInformation;
unsigned mError;
};

View File

@ -33,6 +33,7 @@ typedef enum
SHOW_WARNINGS,
SHOW_PERFORMANCE,
SHOW_PORTABILITY,
SHOW_INFORMATION,
SHOW_ERRORS, // Keep this as last real item
SHOW_NONE
}
@ -48,6 +49,7 @@ ShowTypes;
#define SETTINGS_SHOW_ERRORS "Show errors"
#define SETTINGS_SHOW_WARNINGS "Show warnings"
#define SETTINGS_SHOW_PERFORMANCE "Show performance"
#define SETTINGS_SHOW_INFORMATION "Show information"
#define SETTINGS_CHECK_PATH "Check path"
#define SETTINGS_CHECK_FORCE "Check force"
#define SETTINGS_CHECK_THREADS "Check threads"

View File

@ -201,6 +201,7 @@ void MainWindow::SaveSettings()
mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI.mActionShowErrors->isChecked());
mSettings->setValue(SETTINGS_SHOW_WARNINGS, mUI.mActionShowWarnings->isChecked());
mSettings->setValue(SETTINGS_SHOW_PERFORMANCE, mUI.mActionShowPerformance->isChecked());
mSettings->setValue(SETTINGS_SHOW_INFORMATION, true);
mSettings->setValue(SETTINGS_TOOLBARS_MAIN_SHOW, mUI.mToolBarMain->isVisible());
mSettings->setValue(SETTINGS_TOOLBARS_VIEW_SHOW, mUI.mToolBarView->isVisible());

View File

@ -262,6 +262,8 @@ ShowTypes ResultsTree::SeverityToShowType(const QString & severity)
return SHOW_PERFORMANCE;
if (severity == "portability")
return SHOW_PORTABILITY;
if (severity == "information")
return SHOW_INFORMATION;
return SHOW_NONE;
}
@ -837,6 +839,10 @@ QString ResultsTree::ShowTypeToString(ShowTypes type)
return tr("portability");
break;
case SHOW_INFORMATION:
return tr("information");
break;
case SHOW_NONE:
return "";
break;