forked from qt-creator/qt-creator
AutoTest: Use Utils::InfoLabel in TestSettingsPage
Task-number: QTCREATORBUG-23346 Change-Id: Iacf60422707953eeff40b67fa752627f688b8a17 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -43,9 +43,9 @@ TestSettingsWidget::TestSettingsWidget(QWidget *parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
m_ui.frameworksWarnIcon->setVisible(false);
|
||||
m_ui.frameworksWarnIcon->setPixmap(Utils::Icons::WARNING.pixmap());
|
||||
m_ui.frameworksWarn->setVisible(false);
|
||||
m_ui.frameworksWarn->setElideMode(Qt::ElideNone);
|
||||
m_ui.frameworksWarn->setType(Utils::InfoLabel::Warning);
|
||||
m_ui.frameworksWarn->setText(tr("No active test frameworks."));
|
||||
m_ui.frameworksWarn->setToolTip(tr("You will not be able to use the AutoTest plugin without "
|
||||
"having at least one active test framework."));
|
||||
@@ -133,13 +133,11 @@ void TestSettingsWidget::onFrameworkItemChanged()
|
||||
for (int row = 0, count = model->rowCount(); row < count; ++row) {
|
||||
if (model->index(row, 0).data(Qt::CheckStateRole) == Qt::Checked) {
|
||||
m_ui.frameworksWarn->setVisible(false);
|
||||
m_ui.frameworksWarnIcon->setVisible(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_ui.frameworksWarn->setVisible(true);
|
||||
m_ui.frameworksWarnIcon->setVisible(true);
|
||||
}
|
||||
|
||||
TestSettingsPage::TestSettingsPage(const QSharedPointer<TestSettings> &settings)
|
||||
|
||||
@@ -343,24 +343,7 @@ Warning: this is an experimental feature and might lead to failing to execute th
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="0,0">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="frameworksWarnIcon">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="frameworksWarn"/>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="Utils::InfoLabel" name="frameworksWarn"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -397,6 +380,13 @@ Warning: this is an experimental feature and might lead to failing to execute th
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Utils::InfoLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header location="global">utils/infolabel.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user