summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-18 16:18:31 +0000
committerKitware Robot <kwrobot@kitware.com>2021-01-18 11:18:37 -0500
commit80ea78da0d28f795f1306c961e5d0314e0a0b18d (patch)
treebd093124a30c8019da5b925818f7cc5d56dfb43b /Source
parentcbcb507227a12daeced0fef6735c1a0fd0f9c52a (diff)
parent79d00c629f9029cd1d9a5e1dacbfe498779959dc (diff)
downloadcmake-80ea78da0d28f795f1306c961e5d0314e0a0b18d.tar.gz
Merge topic 'cmake-gui-improvements'
79d00c629f CMake GUI: Fix rendering issue 15e8072859 CMake GUI: Use system icons when available 8aebd159fc CMake GUI: Don't use QToolButton 0bc327a79c CMake GUI: Improve signal specification Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5706
Diffstat (limited to 'Source')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx23
-rw-r--r--Source/QtDialog/CMakeSetupDialog.ui19
-rw-r--r--Source/QtDialog/EnvironmentDialog.cxx4
-rw-r--r--Source/QtDialog/EnvironmentDialog.ui14
-rw-r--r--Source/QtDialog/QCMakeWidgets.cxx2
5 files changed, 24 insertions, 38 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 05518a99c6..031308891d 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -22,7 +22,6 @@
#include <QShortcut>
#include <QStatusBar>
#include <QString>
-#include <QToolButton>
#include <QUrl>
#include <QVector>
@@ -253,7 +252,7 @@ void CMakeSetupDialog::initialize()
&QCMake::propertiesChanged, this->CacheValues->cacheModel(),
&QCMakeCacheModel::setProperties);
- QObject::connect(this->ConfigureButton, &QPushButton::clicked, this,
+ QObject::connect(this->ConfigureButton, &QAbstractButton::clicked, this,
&CMakeSetupDialog::doConfigure);
QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::configureDone,
@@ -261,15 +260,17 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::generateDone,
this, &CMakeSetupDialog::exitLoop);
- QObject::connect(this->GenerateButton, &QPushButton::clicked, this,
+ QObject::connect(this->GenerateButton, &QAbstractButton::clicked, this,
&CMakeSetupDialog::doGenerate);
- QObject::connect(this->OpenProjectButton, &QPushButton::clicked, this,
+ QObject::connect(this->OpenProjectButton, &QAbstractButton::clicked, this,
&CMakeSetupDialog::doOpenProject);
- QObject::connect(this->BrowseSourceDirectoryButton, &QPushButton::clicked,
- this, &CMakeSetupDialog::doSourceBrowse);
- QObject::connect(this->BrowseBinaryDirectoryButton, &QPushButton::clicked,
- this, &CMakeSetupDialog::doBinaryBrowse);
+ QObject::connect(this->BrowseSourceDirectoryButton,
+ &QAbstractButton::clicked, this,
+ &CMakeSetupDialog::doSourceBrowse);
+ QObject::connect(this->BrowseBinaryDirectoryButton,
+ &QAbstractButton::clicked, this,
+ &CMakeSetupDialog::doBinaryBrowse);
QObject::connect(this->BinaryDirectory, &QComboBox::editTextChanged, this,
&CMakeSetupDialog::onBinaryDirectoryChanged);
@@ -324,12 +325,12 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->CacheValues->selectionModel(),
&QItemSelectionModel::selectionChanged, this,
&CMakeSetupDialog::selectionChanged);
- QObject::connect(this->RemoveEntry, &QToolButton::clicked, this,
+ QObject::connect(this->RemoveEntry, &QAbstractButton::clicked, this,
&CMakeSetupDialog::removeSelectedCacheEntries);
- QObject::connect(this->AddEntry, &QToolButton::clicked, this,
+ QObject::connect(this->AddEntry, &QAbstractButton::clicked, this,
&CMakeSetupDialog::addCacheEntry);
- QObject::connect(this->Environment, &QToolButton::clicked, this,
+ QObject::connect(this->Environment, &QAbstractButton::clicked, this,
&CMakeSetupDialog::editEnvironment);
QObject::connect(this->WarnUninitializedAction, &QAction::triggered,
diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui
index a5c35b1c30..c17c4140b6 100644
--- a/Source/QtDialog/CMakeSetupDialog.ui
+++ b/Source/QtDialog/CMakeSetupDialog.ui
@@ -84,14 +84,11 @@
<item row="2" column="1">
<widget class="QComboBox" name="BinaryDirectory">
<property name="sizePolicy">
- <sizepolicy hsizetype="Ignored" vsizetype="Fixed">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="styleSheet">
- <string notr="true">padding-left: 0</string>
- </property>
<property name="editable">
<bool>true</bool>
</property>
@@ -208,7 +205,7 @@
</widget>
</item>
<item>
- <widget class="QToolButton" name="AddEntry">
+ <widget class="QPushButton" name="AddEntry">
<property name="toolTip">
<string>Add New Entry</string>
</property>
@@ -216,16 +213,13 @@
<string>&amp;Add Entry</string>
</property>
<property name="icon">
- <iconset resource="CMakeSetup.qrc">
+ <iconset theme="list-add" resource="CMakeSetup.qrc">
<normaloff>:/Icons/Plus16.png</normaloff>:/Icons/Plus16.png</iconset>
</property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
</widget>
</item>
<item>
- <widget class="QToolButton" name="RemoveEntry">
+ <widget class="QPushButton" name="RemoveEntry">
<property name="toolTip">
<string>Remove Selected Entries</string>
</property>
@@ -233,12 +227,9 @@
<string>&amp;Remove Entry</string>
</property>
<property name="icon">
- <iconset resource="CMakeSetup.qrc">
+ <iconset theme="list-remove" resource="CMakeSetup.qrc">
<normaloff>:/Icons/Delete16.png</normaloff>:/Icons/Delete16.png</iconset>
</property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
</widget>
</item>
<item>
diff --git a/Source/QtDialog/EnvironmentDialog.cxx b/Source/QtDialog/EnvironmentDialog.cxx
index d4f978cb61..0339d1d63f 100644
--- a/Source/QtDialog/EnvironmentDialog.cxx
+++ b/Source/QtDialog/EnvironmentDialog.cxx
@@ -106,9 +106,9 @@ EnvironmentDialog::EnvironmentDialog(const QProcessEnvironment& environment,
this->Environment->setSelectionMode(QAbstractItemView::ExtendedSelection);
this->Environment->setSelectionBehavior(QAbstractItemView::SelectRows);
- QObject::connect(this->AddEntry, &QToolButton::clicked, this,
+ QObject::connect(this->AddEntry, &QAbstractButton::clicked, this,
&EnvironmentDialog::addEntry);
- QObject::connect(this->RemoveEntry, &QToolButton::clicked, this,
+ QObject::connect(this->RemoveEntry, &QAbstractButton::clicked, this,
&EnvironmentDialog::removeSelectedEntries);
QObject::connect(this->Search, &QLineEdit::textChanged, this->m_filter,
&EnvironmentSearchFilter::setFilterFixedString);
diff --git a/Source/QtDialog/EnvironmentDialog.ui b/Source/QtDialog/EnvironmentDialog.ui
index dea762446e..ed23c2c027 100644
--- a/Source/QtDialog/EnvironmentDialog.ui
+++ b/Source/QtDialog/EnvironmentDialog.ui
@@ -46,31 +46,25 @@
</spacer>
</item>
<item>
- <widget class="QToolButton" name="AddEntry">
+ <widget class="QPushButton" name="AddEntry">
<property name="text">
<string>&amp;Add Entry</string>
</property>
<property name="icon">
- <iconset resource="CMakeSetup.qrc">
+ <iconset theme="list-add" resource="CMakeSetup.qrc">
<normaloff>:/Icons/Plus16.png</normaloff>:/Icons/Plus16.png</iconset>
</property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
</widget>
</item>
<item>
- <widget class="QToolButton" name="RemoveEntry">
+ <widget class="QPushButton" name="RemoveEntry">
<property name="text">
<string>&amp;Remove Entry</string>
</property>
<property name="icon">
- <iconset resource="CMakeSetup.qrc">
+ <iconset theme="list-remove" resource="CMakeSetup.qrc">
<normaloff>:/Icons/Delete16.png</normaloff>:/Icons/Delete16.png</iconset>
</property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
</widget>
</item>
</layout>
diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx
index ca65d13f73..03d6ed1403 100644
--- a/Source/QtDialog/QCMakeWidgets.cxx
+++ b/Source/QtDialog/QCMakeWidgets.cxx
@@ -25,7 +25,7 @@ QCMakeFileEditor::QCMakeFileEditor(QWidget* p, QString var)
this->ToolButton = new QToolButton(this);
this->ToolButton->setText("...");
this->ToolButton->setCursor(QCursor(Qt::ArrowCursor));
- QObject::connect(this->ToolButton, &QToolButton::clicked, this,
+ QObject::connect(this->ToolButton, &QAbstractButton::clicked, this,
&QCMakeFileEditor::chooseFile);
}