forked from qt-creator/qt-creator
ClangTools: Use Utils::InfoLabel in DiagnosticConfigsWidget
Task-number: QTCREATORBUG-23346 Change-Id: I5eeb40c50b55c4779ee3e4aa144274604f259f32 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -127,19 +127,7 @@
|
||||
<widget class="QWidget" name="invalidExecutablePage">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="invalidExecutableIcon">
|
||||
<property name="text">
|
||||
<string>Icon</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="invalidExecutableText">
|
||||
<widget class="Utils::InfoLabel" name="invalidExecutableLabel">
|
||||
<property name="text">
|
||||
<string>Could not query the supported checks from the clazy-standalone executable.
|
||||
Set a valid executable first.</string>
|
||||
@@ -149,21 +137,6 @@ Set a valid executable first.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@@ -183,6 +156,13 @@ Set a valid executable first.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Utils::InfoLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header location="global">utils/infolabel.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@@ -35,7 +35,6 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QDialogButtonBox>
|
||||
@@ -709,7 +708,8 @@ DiagnosticConfigsWidget::DiagnosticConfigsWidget(const ClangDiagnosticConfigs &c
|
||||
m_clazyChecks = std::make_unique<Ui::ClazyChecks>();
|
||||
m_clazyChecksWidget = new QWidget();
|
||||
m_clazyChecks->setupUi(m_clazyChecksWidget);
|
||||
m_clazyChecks->invalidExecutableIcon->setPixmap(Utils::Icons::WARNING.pixmap());
|
||||
m_clazyChecks->invalidExecutableLabel->setType(Utils::InfoLabel::Warning);
|
||||
m_clazyChecks->invalidExecutableLabel->setElideMode(Qt::ElideNone);
|
||||
m_clazySortFilterProxyModel = new ClazyChecksSortFilterModel(this);
|
||||
m_clazySortFilterProxyModel->setSourceModel(m_clazyTreeModel.get());
|
||||
setupTreeView(m_clazyChecks->checksView, m_clazySortFilterProxyModel, 2);
|
||||
@@ -752,7 +752,8 @@ DiagnosticConfigsWidget::DiagnosticConfigsWidget(const ClangDiagnosticConfigs &c
|
||||
m_tidyChecks = std::make_unique<Ui::TidyChecks>();
|
||||
m_tidyChecksWidget = new QWidget();
|
||||
m_tidyChecks->setupUi(m_tidyChecksWidget);
|
||||
m_tidyChecks->invalidExecutableIcon->setPixmap(Utils::Icons::WARNING.pixmap());
|
||||
m_tidyChecks->invalidExecutableLabel->setType(Utils::InfoLabel::Warning);
|
||||
m_tidyChecks->invalidExecutableLabel->setElideMode(Qt::ElideNone);
|
||||
setupTreeView(m_tidyChecks->checksPrefixesTree, m_tidyTreeModel.get());
|
||||
|
||||
connect(m_tidyChecks->checksPrefixesTree,
|
||||
|
@@ -129,16 +129,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="invalidExecutableIcon">
|
||||
<property name="text">
|
||||
<string>Icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="invalidExecutableLabel">
|
||||
<widget class="Utils::InfoLabel" name="invalidExecutableLabel">
|
||||
<property name="text">
|
||||
<string>Could not query the supported checks from the clang-tidy executable.
|
||||
Set a valid executable first.</string>
|
||||
@@ -148,21 +139,6 @@ Set a valid executable first.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@@ -182,6 +158,13 @@ Set a valid executable first.</string>
|
||||
</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