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.setupUi(this);
|
||||||
|
|
||||||
m_ui.frameworksWarnIcon->setVisible(false);
|
|
||||||
m_ui.frameworksWarnIcon->setPixmap(Utils::Icons::WARNING.pixmap());
|
|
||||||
m_ui.frameworksWarn->setVisible(false);
|
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->setText(tr("No active test frameworks."));
|
||||||
m_ui.frameworksWarn->setToolTip(tr("You will not be able to use the AutoTest plugin without "
|
m_ui.frameworksWarn->setToolTip(tr("You will not be able to use the AutoTest plugin without "
|
||||||
"having at least one active test framework."));
|
"having at least one active test framework."));
|
||||||
@@ -133,13 +133,11 @@ void TestSettingsWidget::onFrameworkItemChanged()
|
|||||||
for (int row = 0, count = model->rowCount(); row < count; ++row) {
|
for (int row = 0, count = model->rowCount(); row < count; ++row) {
|
||||||
if (model->index(row, 0).data(Qt::CheckStateRole) == Qt::Checked) {
|
if (model->index(row, 0).data(Qt::CheckStateRole) == Qt::Checked) {
|
||||||
m_ui.frameworksWarn->setVisible(false);
|
m_ui.frameworksWarn->setVisible(false);
|
||||||
m_ui.frameworksWarnIcon->setVisible(false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_ui.frameworksWarn->setVisible(true);
|
m_ui.frameworksWarn->setVisible(true);
|
||||||
m_ui.frameworksWarnIcon->setVisible(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TestSettingsPage::TestSettingsPage(const QSharedPointer<TestSettings> &settings)
|
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>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="0,0">
|
<widget class="Utils::InfoLabel" name="frameworksWarn"/>
|
||||||
<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>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -397,6 +380,13 @@ Warning: this is an experimental feature and might lead to failing to execute th
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>Utils::InfoLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header location="global">utils/infolabel.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Reference in New Issue
Block a user