diff options
author | Christian Stenger <christian.stenger@qt.io> | 2022-07-06 21:51:02 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2022-07-08 07:00:17 +0000 |
commit | 674cca18a77813521b1271a1a71441d9243a2a10 (patch) | |
tree | 2ad862eeafd930f50d13c2acc777d1b96ece4bd0 /src/plugins/gitlab | |
parent | ae1e006426463590eea66afdcb9e9aee57e7e1db (diff) | |
download | qt-creator-674cca18a77813521b1271a1a71441d9243a2a10.tar.gz |
GitLab: Use IntegerAspect instead of QSpinBox
Change-Id: I06e9d907a6a65f8cf135031f0aed3cd3eca9281b
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/gitlab')
-rw-r--r-- | src/plugins/gitlab/gitlaboptionspage.cpp | 8 | ||||
-rw-r--r-- | src/plugins/gitlab/gitlaboptionspage.h | 3 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/gitlab/gitlaboptionspage.cpp b/src/plugins/gitlab/gitlaboptionspage.cpp index 5687eb9ec8..6df8373402 100644 --- a/src/plugins/gitlab/gitlaboptionspage.cpp +++ b/src/plugins/gitlab/gitlaboptionspage.cpp @@ -80,9 +80,9 @@ GitLabServerWidget::GitLabServerWidget(Mode m, QWidget *parent) : Utils::StringAspect::LineEditDisplay); m_token.setVisible(m == Edit); + m_port.setLabelText(GitLabOptionsPage::tr("Port:")); m_port.setRange(1, 65535); m_port.setValue(GitLabServer::defaultPort); - auto portLabel = new QLabel(GitLabOptionsPage::tr("Port:"), this); m_port.setEnabled(m == Edit); m_secure.setLabelText(GitLabOptionsPage::tr("HTTPS:")); m_secure.setLabelPlacement(Utils::BoolAspect::LabelPlacement::InExtraLabel); @@ -90,17 +90,15 @@ GitLabServerWidget::GitLabServerWidget(Mode m, QWidget *parent) m_secure.setEnabled(m == Edit); using namespace Utils::Layouting; - const Break nl; Row { Form { m_host, m_description, m_token, - portLabel, &m_port, nl, + m_port, m_secure }, - Stretch() }.attachTo(this, m == Edit); } @@ -209,7 +207,6 @@ void GitLabOptionsWidget::showEditServerDialog() connect(buttons->button(QDialogButtonBox::Cancel), &QPushButton::clicked, &d, &QDialog::reject); layout->addWidget(buttons); d.setLayout(layout); - d.resize(300, 200); if (d.exec() != QDialog::Accepted) return; @@ -231,7 +228,6 @@ void GitLabOptionsWidget::showAddServerDialog() connect(buttons->button(QDialogButtonBox::Cancel), &QPushButton::clicked, &d, &QDialog::reject); layout->addWidget(buttons); d.setLayout(layout); - d.resize(300, 200); if (d.exec() != QDialog::Accepted) return; diff --git a/src/plugins/gitlab/gitlaboptionspage.h b/src/plugins/gitlab/gitlaboptionspage.h index 4d89b20b00..4779028fbd 100644 --- a/src/plugins/gitlab/gitlaboptionspage.h +++ b/src/plugins/gitlab/gitlaboptionspage.h @@ -31,7 +31,6 @@ #include <utils/aspects.h> #include <QPointer> -#include <QSpinBox> QT_BEGIN_NAMESPACE class QComboBox; @@ -56,7 +55,7 @@ private: Utils::StringAspect m_host; Utils::StringAspect m_description; Utils::StringAspect m_token; - QSpinBox m_port; + Utils::IntegerAspect m_port; Utils::BoolAspect m_secure; }; |