GUI: Show information messages count in stats dialog.

This commit is contained in:
Kimmo Varis 2010-12-26 15:21:37 +02:00
parent a73970483d
commit 3020e77570
2 changed files with 29 additions and 7 deletions

View File

@ -300,6 +300,24 @@
</item>
</layout>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Information messages:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="mLblInformation">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
@ -367,8 +385,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>227</x>
<y>307</y>
<x>483</x>
<y>310</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
@ -383,8 +401,8 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>295</x>
<y>313</y>
<x>483</x>
<y>310</y>
</hint>
<hint type="destinationlabel">
<x>286</x>

View File

@ -114,6 +114,7 @@ void StatsDialog::copyToClipboard()
"\tWarnings:\t%9\n"
"\tStyle warnings:\t%10\n"
"\tPerformance warnings:\t%11\n"
"\tInformation messages:\t%12\n"
)
.arg(mUI.mProject->text())
.arg(mUI.mPaths->text())
@ -125,7 +126,8 @@ void StatsDialog::copyToClipboard()
.arg(mStatistics->GetCount(SHOW_ERRORS))
.arg(mStatistics->GetCount(SHOW_WARNINGS))
.arg(mStatistics->GetCount(SHOW_STYLE))
.arg(mStatistics->GetCount(SHOW_PERFORMANCE));
.arg(mStatistics->GetCount(SHOW_PERFORMANCE))
.arg(mStatistics->GetCount(SHOW_INFORMATION));
// HTML summary
QString htmlSummary = tr(
@ -147,6 +149,7 @@ void StatsDialog::copyToClipboard()
" <tr><th>Warnings:</th><td>%9</td></tr>\n"
" <tr><th>Style warnings:</th><td>%10</td></tr>\n"
" <tr><th>Performance warnings:</th><td>%11</td></tr>\n"
" <tr><th>Information messages:</th><td>%12</td></tr>\n"
"</table>\n"
)
.arg(mUI.mProject->text())
@ -159,13 +162,13 @@ void StatsDialog::copyToClipboard()
.arg(mStatistics->GetCount(SHOW_ERRORS))
.arg(mStatistics->GetCount(SHOW_WARNINGS))
.arg(mStatistics->GetCount(SHOW_STYLE))
.arg(mStatistics->GetCount(SHOW_PERFORMANCE));
.arg(mStatistics->GetCount(SHOW_PERFORMANCE))
.arg(mStatistics->GetCount(SHOW_INFORMATION));
QMimeData *mimeData = new QMimeData();
mimeData->setText(textSummary);
mimeData->setHtml(htmlSummary);
clipboard->setMimeData(mimeData);
}
}
@ -176,4 +179,5 @@ void StatsDialog::setStatistics(const CheckStatistics *stats)
mUI.mLblWarnings->setText(QString("%1").arg(stats->GetCount(SHOW_WARNINGS)));
mUI.mLblStyle->setText(QString("%1").arg(stats->GetCount(SHOW_STYLE)));
mUI.mLblPerformance->setText(QString("%1").arg(stats->GetCount(SHOW_PERFORMANCE)));
mUI.mLblInformation->setText(QString("%1").arg(stats->GetCount(SHOW_INFORMATION)));
}