From 2cd4fbfeb2f7fa7e8ad31ffb5c5399d451ed8ab1 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Mon, 27 Dec 2010 11:17:17 +0200 Subject: [PATCH] GUI: Add 'portability' warnings to statistics-dialog. --- gui/stats.ui | 846 ++++++++++++++++++++++---------------------- gui/statsdialog.cpp | 13 +- 2 files changed, 441 insertions(+), 418 deletions(-) diff --git a/gui/stats.ui b/gui/stats.ui index 2f00be767..192ed096a 100644 --- a/gui/stats.ui +++ b/gui/stats.ui @@ -1,414 +1,432 @@ - - - StatsDialog - - - - 0 - 0 - 502 - 329 - - - - Statistics - - - - - - QTabWidget::Rounded - - - 2 - - - - Project - - - - - - Project: - - - - - - - - 0 - 0 - - - - true - - - - - - - Paths: - - - - - - - true - - - - 0 - 0 - - - - true - - - false - - - true - - - true - - - - - - - Include paths: - - - - - - - true - - - - 0 - 0 - - - - true - - - - - - - Defines: - - - - - - - true - - - - 0 - 0 - - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Previous Scan - - - - - - Path Selected: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Number of Files Scanned: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing - - - - - - - Scan Duration: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - true - - - - - - - - Statistics - - - - - - - - Errors: - - - - - - - TextLabel - - - - - - - - - - - Warnings: - - - - - - - TextLabel - - - - - - - - - - - Stylistic warnings: - - - - - - - TextLabel - - - - - - - - - - - Performance issues: - - - - - - - TextLabel - - - - - - - - - - - Information messages: - - - - - - - TextLabel - - - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Copy to Clipboard - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QDialogButtonBox::Close - - - - - - - - - - mTabWidget - mProject - mPaths - mIncludePaths - mDefines - mCopyToClipboard - mButtonBox - mPath - - - - - mButtonBox - accepted() - StatsDialog - accept() - - - 483 - 310 - - - 157 - 274 - - - - - mButtonBox - rejected() - StatsDialog - reject() - - - 483 - 310 - - - 286 - 274 - - - - - + + + StatsDialog + + + + 0 + 0 + 502 + 329 + + + + Statistics + + + + + + QTabWidget::Rounded + + + 2 + + + + Project + + + + + + Project: + + + + + + + + 0 + 0 + + + + true + + + + + + + Paths: + + + + + + + true + + + + 0 + 0 + + + + true + + + false + + + true + + + true + + + + + + + Include paths: + + + + + + + true + + + + 0 + 0 + + + + true + + + + + + + Defines: + + + + + + + true + + + + 0 + 0 + + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Previous Scan + + + + + + Path Selected: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Number of Files Scanned: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing + + + + + + + Scan Duration: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + true + + + + + + + + Statistics + + + + + + + + Errors: + + + + + + + TextLabel + + + + + + + + + + + Warnings: + + + + + + + TextLabel + + + + + + + + + + + Stylistic warnings: + + + + + + + TextLabel + + + + + + + + + + + Portability warnings: + + + + + + + TextLabel + + + + + + + + + + + Performance issues: + + + + + + + TextLabel + + + + + + + + + + + Information messages: + + + + + + + TextLabel + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Copy to Clipboard + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QDialogButtonBox::Close + + + + + + + + + + mTabWidget + mProject + mPaths + mIncludePaths + mDefines + mCopyToClipboard + mButtonBox + mPath + + + + + mButtonBox + accepted() + StatsDialog + accept() + + + 483 + 310 + + + 157 + 274 + + + + + mButtonBox + rejected() + StatsDialog + reject() + + + 483 + 310 + + + 286 + 274 + + + + + diff --git a/gui/statsdialog.cpp b/gui/statsdialog.cpp index 3c335b125..8ffa779a0 100644 --- a/gui/statsdialog.cpp +++ b/gui/statsdialog.cpp @@ -113,8 +113,9 @@ void StatsDialog::copyToClipboard() "\tErrors:\t%8\n" "\tWarnings:\t%9\n" "\tStyle warnings:\t%10\n" - "\tPerformance warnings:\t%11\n" - "\tInformation messages:\t%12\n" + "\tPortability warnings:\t%11\n" + "\tPerformance warnings:\t%12\n" + "\tInformation messages:\t%13\n" ) .arg(mUI.mProject->text()) .arg(mUI.mPaths->text()) @@ -126,6 +127,7 @@ void StatsDialog::copyToClipboard() .arg(mStatistics->GetCount(SHOW_ERRORS)) .arg(mStatistics->GetCount(SHOW_WARNINGS)) .arg(mStatistics->GetCount(SHOW_STYLE)) + .arg(mStatistics->GetCount(SHOW_PORTABILITY)) .arg(mStatistics->GetCount(SHOW_PERFORMANCE)) .arg(mStatistics->GetCount(SHOW_INFORMATION)); @@ -148,8 +150,9 @@ void StatsDialog::copyToClipboard() " Errors:%8\n" " Warnings:%9\n" " Style warnings:%10\n" - " Performance warnings:%11\n" - " Information messages:%12\n" + " Portability warnings:%11\n" + " Performance warnings:%12\n" + " Information messages:%13\n" "\n" ) .arg(mUI.mProject->text()) @@ -162,6 +165,7 @@ void StatsDialog::copyToClipboard() .arg(mStatistics->GetCount(SHOW_ERRORS)) .arg(mStatistics->GetCount(SHOW_WARNINGS)) .arg(mStatistics->GetCount(SHOW_STYLE)) + .arg(mStatistics->GetCount(SHOW_PORTABILITY)) .arg(mStatistics->GetCount(SHOW_PERFORMANCE)) .arg(mStatistics->GetCount(SHOW_INFORMATION)); @@ -178,6 +182,7 @@ void StatsDialog::setStatistics(const CheckStatistics *stats) mUI.mLblErrors->setText(QString("%1").arg(stats->GetCount(SHOW_ERRORS))); mUI.mLblWarnings->setText(QString("%1").arg(stats->GetCount(SHOW_WARNINGS))); mUI.mLblStyle->setText(QString("%1").arg(stats->GetCount(SHOW_STYLE))); + mUI.mLblPortability->setText(QString("%1").arg(stats->GetCount(SHOW_PORTABILITY))); mUI.mLblPerformance->setText(QString("%1").arg(stats->GetCount(SHOW_PERFORMANCE))); mUI.mLblInformation->setText(QString("%1").arg(stats->GetCount(SHOW_INFORMATION))); }