Commit 0565cb7c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix layout

parent 737ac98f
Pipeline #132238 passed with stage
in 13 minutes and 48 seconds
......@@ -6,9 +6,9 @@
#include "openurlwithconfigurecreatewidgettest.h"
#include "openurlwithconfigurecreatewidget.h"
#include <QFormLayout>
#include <QLineEdit>
#include <QTest>
#include <QVBoxLayout>
QTEST_MAIN(OpenUrlWithConfigureCreateWidgetTest)
OpenUrlWithConfigureCreateWidgetTest::OpenUrlWithConfigureCreateWidgetTest(QObject *parent)
: QObject{parent}
......@@ -19,7 +19,7 @@ void OpenUrlWithConfigureCreateWidgetTest::shouldHaveDefaultValues()
{
OpenUrlWithConfigureCreateWidget w;
auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
auto mainLayout = w.findChild<QFormLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->contentsMargins(), QMargins{});
......
......@@ -12,7 +12,7 @@ OpenUrlWithConfigureCreateDialog::OpenUrlWithConfigureCreateDialog(QWidget *pare
: QDialog(parent)
, mOpenUrlWithCreateWidget(new OpenUrlWithConfigureCreateWidget(this))
{
setWindowTitle(i18nc("@title:window", "Configure Open Url With Plugin"));
setWindowTitle(i18nc("@title:window", "Create"));
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
......@@ -38,5 +38,6 @@ OpenUrlWithConfigureCreateWidget::OpenUrlWithInfo OpenUrlWithConfigureCreateDial
void OpenUrlWithConfigureCreateDialog::setInfo(const OpenUrlWithConfigureCreateWidget::OpenUrlWithInfo &i)
{
setWindowTitle(i18nc("@title:window", "Edit"));
mOpenUrlWithCreateWidget->setInfo(i);
}
......@@ -6,26 +6,24 @@
#include "openurlwithconfigurecreatewidget.h"
#include <KLocalizedString>
#include <QFormLayout>
#include <QLabel>
#include <QLineEdit>
#include <QVBoxLayout>
OpenUrlWithConfigureCreateWidget::OpenUrlWithConfigureCreateWidget(QWidget *parent)
: QWidget{parent}
, mServerName(new QLineEdit(this))
, mCommand(new QLineEdit(this))
{
auto mainLayout = new QVBoxLayout(this);
auto mainLayout = new QFormLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setContentsMargins(QMargins());
auto label = new QLabel(i18n("Server Name:"), this);
mainLayout->addWidget(label);
mServerName->setObjectName(QStringLiteral("mServerName"));
mainLayout->addWidget(mServerName);
mainLayout->addRow(i18n("Server Name:"), mServerName);
mCommand->setObjectName(QStringLiteral("mCommand"));
mainLayout->addWidget(mCommand);
mainLayout->addRow(i18n("Command:"), mCommand);
}
OpenUrlWithConfigureCreateWidget::~OpenUrlWithConfigureCreateWidget()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment