GitLab: Fix reflecting port data inside ui

Set values did not show up inside the ui. Likely a redo of
the options page would be more appropriate, but for now the
quick fix should be good as well.

Change-Id: Id782ba48ea4dee08b2c6720cdf9e78350f1e9a47
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2022-06-08 11:53:04 +02:00
parent 99acc9a153
commit d06d6ebeba
2 changed files with 5 additions and 4 deletions

View File

@@ -81,9 +81,9 @@ GitLabServerWidget::GitLabServerWidget(Mode m, QWidget *parent)
m_token.setVisible(m == Edit); m_token.setVisible(m == Edit);
m_port.setRange(1, 65535); m_port.setRange(1, 65535);
m_port.setDefaultValue(GitLabServer::defaultPort); m_port.setValue(GitLabServer::defaultPort);
auto portLabel = new QLabel(tr("Port:"), this);
m_port.setEnabled(m == Edit); m_port.setEnabled(m == Edit);
m_port.setLabelText(tr("Port:"));
m_secure.setLabelText(tr("HTTPS:")); m_secure.setLabelText(tr("HTTPS:"));
m_secure.setLabelPlacement(Utils::BoolAspect::LabelPlacement::InExtraLabel); m_secure.setLabelPlacement(Utils::BoolAspect::LabelPlacement::InExtraLabel);
m_secure.setDefaultValue(true); m_secure.setDefaultValue(true);
@@ -97,7 +97,7 @@ GitLabServerWidget::GitLabServerWidget(Mode m, QWidget *parent)
m_host, m_host,
m_description, m_description,
m_token, m_token,
m_port, portLabel, &m_port, nl,
m_secure m_secure
}, },
Stretch() Stretch()

View File

@@ -31,6 +31,7 @@
#include <utils/aspects.h> #include <utils/aspects.h>
#include <QPointer> #include <QPointer>
#include <QSpinBox>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QComboBox; class QComboBox;
@@ -55,7 +56,7 @@ private:
Utils::StringAspect m_host; Utils::StringAspect m_host;
Utils::StringAspect m_description; Utils::StringAspect m_description;
Utils::StringAspect m_token; Utils::StringAspect m_token;
Utils::IntegerAspect m_port; QSpinBox m_port;
Utils::BoolAspect m_secure; Utils::BoolAspect m_secure;
}; };