GUI: Add 'portability' warnings to statistics-dialog.

This commit is contained in:
Kimmo Varis 2010-12-27 11:17:17 +02:00
parent f150f1ba05
commit 2cd4fbfeb2
2 changed files with 441 additions and 418 deletions

View File

@ -1,414 +1,432 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>StatsDialog</class> <class>StatsDialog</class>
<widget class="QDialog" name="StatsDialog"> <widget class="QDialog" name="StatsDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>502</width> <width>502</width>
<height>329</height> <height>329</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Statistics</string> <string>Statistics</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QTabWidget" name="mTabWidget"> <widget class="QTabWidget" name="mTabWidget">
<property name="tabShape"> <property name="tabShape">
<enum>QTabWidget::Rounded</enum> <enum>QTabWidget::Rounded</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>2</number>
</property> </property>
<widget class="QWidget" name="mProjectTab"> <widget class="QWidget" name="mProjectTab">
<attribute name="title"> <attribute name="title">
<string>Project</string> <string>Project</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="QLabel" name="mProjectLabel"> <widget class="QLabel" name="mProjectLabel">
<property name="text"> <property name="text">
<string>Project:</string> <string>Project:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="mProject"> <widget class="QLineEdit" name="mProject">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="mPathsLabel"> <widget class="QLabel" name="mPathsLabel">
<property name="text"> <property name="text">
<string>Paths:</string> <string>Paths:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="mPaths"> <widget class="QLineEdit" name="mPaths">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="acceptDrops"> <property name="acceptDrops">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="frame"> <property name="frame">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="mIncludePathsLabel"> <widget class="QLabel" name="mIncludePathsLabel">
<property name="text"> <property name="text">
<string>Include paths:</string> <string>Include paths:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="mIncludePaths"> <widget class="QLineEdit" name="mIncludePaths">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="mDefinesLabel"> <widget class="QLabel" name="mDefinesLabel">
<property name="text"> <property name="text">
<string>Defines:</string> <string>Defines:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="mDefines"> <widget class="QLineEdit" name="mDefines">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="mVerticalSpacer"> <spacer name="mVerticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="mScanTab"> <widget class="QWidget" name="mScanTab">
<attribute name="title"> <attribute name="title">
<string>Previous Scan</string> <string>Previous Scan</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="mPathLabel"> <widget class="QLabel" name="mPathLabel">
<property name="text"> <property name="text">
<string>Path Selected:</string> <string>Path Selected:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="mNumberOfFilesScannedLabel"> <widget class="QLabel" name="mNumberOfFilesScannedLabel">
<property name="text"> <property name="text">
<string>Number of Files Scanned:</string> <string>Number of Files Scanned:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="mNumberOfFilesScanned"> <widget class="QLabel" name="mNumberOfFilesScanned">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="mScanDurationLabel"> <widget class="QLabel" name="mScanDurationLabel">
<property name="text"> <property name="text">
<string>Scan Duration:</string> <string>Scan Duration:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QLabel" name="mScanDuration"> <widget class="QLabel" name="mScanDuration">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<spacer name="mVerticalSpacer_2"> <spacer name="mVerticalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="mPath"> <widget class="QLineEdit" name="mPath">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="mStatsTab"> <widget class="QWidget" name="mStatsTab">
<attribute name="title"> <attribute name="title">
<string>Statistics</string> <string>Statistics</string>
</attribute> </attribute>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Errors:</string> <string>Errors:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="mLblErrors"> <widget class="QLabel" name="mLblErrors">
<property name="text"> <property name="text">
<string notr="true">TextLabel</string> <string notr="true">TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>Warnings:</string> <string>Warnings:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="mLblWarnings"> <widget class="QLabel" name="mLblWarnings">
<property name="text"> <property name="text">
<string notr="true">TextLabel</string> <string notr="true">TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Stylistic warnings:</string> <string>Stylistic warnings:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="mLblStyle"> <widget class="QLabel" name="mLblStyle">
<property name="text"> <property name="text">
<string notr="true">TextLabel</string> <string notr="true">TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_8">
<item> <item>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_6">
<property name="text"> <property name="text">
<string>Performance issues:</string> <string>Portability warnings:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="mLblPerformance"> <widget class="QLabel" name="mLblPortability">
<property name="text"> <property name="text">
<string notr="true">TextLabel</string> <string>TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="4" column="0"> <item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>Information messages:</string> <string>Performance issues:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="mLblInformation"> <widget class="QLabel" name="mLblPerformance">
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
</layout> <item row="5" column="0">
</widget> <layout class="QHBoxLayout" name="horizontalLayout_6">
</widget> <item>
</item> <widget class="QLabel" name="label_5">
<item> <property name="text">
<widget class="QWidget" name="widget" native="true"> <string>Information messages:</string>
<layout class="QHBoxLayout" name="horizontalLayout"> </property>
<item> </widget>
<spacer name="horizontalSpacer"> </item>
<property name="orientation"> <item>
<enum>Qt::Horizontal</enum> <widget class="QLabel" name="mLblInformation">
</property> <property name="text">
<property name="sizeHint" stdset="0"> <string>TextLabel</string>
<size> </property>
<width>40</width> </widget>
<height>20</height> </item>
</size> </layout>
</property> </item>
</spacer> </layout>
</item> </widget>
<item> </widget>
<widget class="QPushButton" name="mCopyToClipboard"> </item>
<property name="text"> <item>
<string>Copy to Clipboard</string> <widget class="QWidget" name="widget" native="true">
</property> <layout class="QHBoxLayout" name="horizontalLayout">
</widget> <item>
</item> <spacer name="horizontalSpacer">
<item> <property name="orientation">
<widget class="QDialogButtonBox" name="mButtonBox"> <enum>Qt::Horizontal</enum>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Maximum" vsizetype="Fixed"> <property name="sizeHint" stdset="0">
<horstretch>0</horstretch> <size>
<verstretch>0</verstretch> <width>40</width>
</sizepolicy> <height>20</height>
</property> </size>
<property name="orientation"> </property>
<enum>Qt::Horizontal</enum> </spacer>
</property> </item>
<property name="standardButtons"> <item>
<set>QDialogButtonBox::Close</set> <widget class="QPushButton" name="mCopyToClipboard">
</property> <property name="text">
</widget> <string>Copy to Clipboard</string>
</item> </property>
</layout> </widget>
</widget> </item>
</item> <item>
</layout> <widget class="QDialogButtonBox" name="mButtonBox">
</widget> <property name="sizePolicy">
<tabstops> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<tabstop>mTabWidget</tabstop> <horstretch>0</horstretch>
<tabstop>mProject</tabstop> <verstretch>0</verstretch>
<tabstop>mPaths</tabstop> </sizepolicy>
<tabstop>mIncludePaths</tabstop> </property>
<tabstop>mDefines</tabstop> <property name="orientation">
<tabstop>mCopyToClipboard</tabstop> <enum>Qt::Horizontal</enum>
<tabstop>mButtonBox</tabstop> </property>
<tabstop>mPath</tabstop> <property name="standardButtons">
</tabstops> <set>QDialogButtonBox::Close</set>
<resources/> </property>
<connections> </widget>
<connection> </item>
<sender>mButtonBox</sender> </layout>
<signal>accepted()</signal> </widget>
<receiver>StatsDialog</receiver> </item>
<slot>accept()</slot> </layout>
<hints> </widget>
<hint type="sourcelabel"> <tabstops>
<x>483</x> <tabstop>mTabWidget</tabstop>
<y>310</y> <tabstop>mProject</tabstop>
</hint> <tabstop>mPaths</tabstop>
<hint type="destinationlabel"> <tabstop>mIncludePaths</tabstop>
<x>157</x> <tabstop>mDefines</tabstop>
<y>274</y> <tabstop>mCopyToClipboard</tabstop>
</hint> <tabstop>mButtonBox</tabstop>
</hints> <tabstop>mPath</tabstop>
</connection> </tabstops>
<connection> <resources/>
<sender>mButtonBox</sender> <connections>
<signal>rejected()</signal> <connection>
<receiver>StatsDialog</receiver> <sender>mButtonBox</sender>
<slot>reject()</slot> <signal>accepted()</signal>
<hints> <receiver>StatsDialog</receiver>
<hint type="sourcelabel"> <slot>accept()</slot>
<x>483</x> <hints>
<y>310</y> <hint type="sourcelabel">
</hint> <x>483</x>
<hint type="destinationlabel"> <y>310</y>
<x>286</x> </hint>
<y>274</y> <hint type="destinationlabel">
</hint> <x>157</x>
</hints> <y>274</y>
</connection> </hint>
</connections> </hints>
</ui> </connection>
<connection>
<sender>mButtonBox</sender>
<signal>rejected()</signal>
<receiver>StatsDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>483</x>
<y>310</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -113,8 +113,9 @@ void StatsDialog::copyToClipboard()
"\tErrors:\t%8\n" "\tErrors:\t%8\n"
"\tWarnings:\t%9\n" "\tWarnings:\t%9\n"
"\tStyle warnings:\t%10\n" "\tStyle warnings:\t%10\n"
"\tPerformance warnings:\t%11\n" "\tPortability warnings:\t%11\n"
"\tInformation messages:\t%12\n" "\tPerformance warnings:\t%12\n"
"\tInformation messages:\t%13\n"
) )
.arg(mUI.mProject->text()) .arg(mUI.mProject->text())
.arg(mUI.mPaths->text()) .arg(mUI.mPaths->text())
@ -126,6 +127,7 @@ void StatsDialog::copyToClipboard()
.arg(mStatistics->GetCount(SHOW_ERRORS)) .arg(mStatistics->GetCount(SHOW_ERRORS))
.arg(mStatistics->GetCount(SHOW_WARNINGS)) .arg(mStatistics->GetCount(SHOW_WARNINGS))
.arg(mStatistics->GetCount(SHOW_STYLE)) .arg(mStatistics->GetCount(SHOW_STYLE))
.arg(mStatistics->GetCount(SHOW_PORTABILITY))
.arg(mStatistics->GetCount(SHOW_PERFORMANCE)) .arg(mStatistics->GetCount(SHOW_PERFORMANCE))
.arg(mStatistics->GetCount(SHOW_INFORMATION)); .arg(mStatistics->GetCount(SHOW_INFORMATION));
@ -148,8 +150,9 @@ void StatsDialog::copyToClipboard()
" <tr><th>Errors:</th><td>%8</td></tr>\n" " <tr><th>Errors:</th><td>%8</td></tr>\n"
" <tr><th>Warnings:</th><td>%9</td></tr>\n" " <tr><th>Warnings:</th><td>%9</td></tr>\n"
" <tr><th>Style warnings:</th><td>%10</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>Portability warnings:</th><td>%11</td></tr>\n"
" <tr><th>Information messages:</th><td>%12</td></tr>\n" " <tr><th>Performance warnings:</th><td>%12</td></tr>\n"
" <tr><th>Information messages:</th><td>%13</td></tr>\n"
"</table>\n" "</table>\n"
) )
.arg(mUI.mProject->text()) .arg(mUI.mProject->text())
@ -162,6 +165,7 @@ void StatsDialog::copyToClipboard()
.arg(mStatistics->GetCount(SHOW_ERRORS)) .arg(mStatistics->GetCount(SHOW_ERRORS))
.arg(mStatistics->GetCount(SHOW_WARNINGS)) .arg(mStatistics->GetCount(SHOW_WARNINGS))
.arg(mStatistics->GetCount(SHOW_STYLE)) .arg(mStatistics->GetCount(SHOW_STYLE))
.arg(mStatistics->GetCount(SHOW_PORTABILITY))
.arg(mStatistics->GetCount(SHOW_PERFORMANCE)) .arg(mStatistics->GetCount(SHOW_PERFORMANCE))
.arg(mStatistics->GetCount(SHOW_INFORMATION)); .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.mLblErrors->setText(QString("%1").arg(stats->GetCount(SHOW_ERRORS)));
mUI.mLblWarnings->setText(QString("%1").arg(stats->GetCount(SHOW_WARNINGS))); mUI.mLblWarnings->setText(QString("%1").arg(stats->GetCount(SHOW_WARNINGS)));
mUI.mLblStyle->setText(QString("%1").arg(stats->GetCount(SHOW_STYLE))); 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.mLblPerformance->setText(QString("%1").arg(stats->GetCount(SHOW_PERFORMANCE)));
mUI.mLblInformation->setText(QString("%1").arg(stats->GetCount(SHOW_INFORMATION))); mUI.mLblInformation->setText(QString("%1").arg(stats->GetCount(SHOW_INFORMATION)));
} }