aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangtools
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2019-12-14 16:20:50 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2020-01-03 12:28:37 +0000
commit574174840e843f832c1c94eef0e541afb6979cf5 (patch)
tree99ba5d3c49fbd279c0c806d5364ccf17e53b3cbb /src/plugins/clangtools
parent8a1daa15facbf6030b147179407c30ed1b9c843f (diff)
ClangTools: Use Utils::InfoLabel in DiagnosticConfigsWidget
Task-number: QTCREATORBUG-23346 Change-Id: I5eeb40c50b55c4779ee3e4aa144274604f259f32 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/plugins/clangtools')
-rw-r--r--src/plugins/clangtools/clazychecks.ui50
-rw-r--r--src/plugins/clangtools/diagnosticconfigswidget.cpp7
-rw-r--r--src/plugins/clangtools/tidychecks.ui47
3 files changed, 34 insertions, 70 deletions
diff --git a/src/plugins/clangtools/clazychecks.ui b/src/plugins/clangtools/clazychecks.ui
index 57ad02422e..0818b8d31e 100644
--- a/src/plugins/clangtools/clazychecks.ui
+++ b/src/plugins/clangtools/clazychecks.ui
@@ -127,42 +127,15 @@
<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">
- <property name="text">
- <string>Could not query the supported checks from the clazy-standalone executable.
+ <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>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </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>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
</item>
<item>
<spacer name="verticalSpacer">
@@ -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>
diff --git a/src/plugins/clangtools/diagnosticconfigswidget.cpp b/src/plugins/clangtools/diagnosticconfigswidget.cpp
index b6591820d1..986d7f9ac4 100644
--- a/src/plugins/clangtools/diagnosticconfigswidget.cpp
+++ b/src/plugins/clangtools/diagnosticconfigswidget.cpp
@@ -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,
diff --git a/src/plugins/clangtools/tidychecks.ui b/src/plugins/clangtools/tidychecks.ui
index f98c7eec7b..5acdc1682f 100644
--- a/src/plugins/clangtools/tidychecks.ui
+++ b/src/plugins/clangtools/tidychecks.ui
@@ -129,39 +129,15 @@
<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">
- <property name="text">
- <string>Could not query the supported checks from the clang-tidy executable.
+ <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>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </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>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
</item>
<item>
<spacer name="verticalSpacer">
@@ -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>