Commit bb14ea2e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Prepare autotest

parent 8b5d6d54
Pipeline #124581 passed with stage
in 12 minutes and 56 seconds
......@@ -11,3 +11,4 @@ endmacro ()
add_messageviewer_openwithurl_unittest(openurlwithconfigurewidgettest.cpp)
add_messageviewer_openwithurl_unittest(openurlwithconfiguredialogtest.cpp)
add_messageviewer_openwithurl_unittest(openurlwithconfigurecreatedialogtest.cpp)
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "openurlwithconfigurecreatedialogtest.h"
#include "openurlwithconfigurecreatedialog.h"
#include <QTest>
QTEST_MAIN(OpenUrlWithConfigureCreateDialogTest)
OpenUrlWithConfigureCreateDialogTest::OpenUrlWithConfigureCreateDialogTest(QObject *parent)
: QObject{parent}
{
}
void OpenUrlWithConfigureCreateDialogTest::shouldHaveDefaultValues()
{
OpenUrlWithConfigureCreateDialog d;
// TODO
}
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <QObject>
class OpenUrlWithConfigureCreateDialogTest : public QObject
{
Q_OBJECT
public:
explicit OpenUrlWithConfigureCreateDialogTest(QObject *parent = nullptr);
~OpenUrlWithConfigureCreateDialogTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
......@@ -4,26 +4,28 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "openurlwithconfigurecreatedialog.h"
#include "openurlwithconfigurecreatewidget.h"
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QVBoxLayout>
OpenUrlWithConfigureCreateDialog::OpenUrlWithConfigureCreateDialog(QWidget *parent)
: QDialog(parent)
, mOpenUrlWithCreateWidget(new OpenUrlWithConfigureCreateWidget(this))
{
setWindowTitle(i18nc("@title:window", "Configure Open Url With Plugin"));
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
// mOpenUrlWithWidget->setObjectName(QStringLiteral("mOpenUrlWithWidget"));
// mainLayout->addWidget(mOpenUrlWithWidget);
mOpenUrlWithCreateWidget->setObjectName(QStringLiteral("mOpenUrlWithWidget"));
mainLayout->addWidget(mOpenUrlWithCreateWidget);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonBox"));
mainLayout->addWidget(buttonBox);
// connect(buttonBox, &QDialogButtonBox::accepted, this, &OpenUrlWithConfigureDialog::slotAccepted);
// connect(buttonBox, &QDialogButtonBox::rejected, this, &OpenUrlWithConfigureDialog::reject);
connect(buttonBox, &QDialogButtonBox::accepted, this, &OpenUrlWithConfigureCreateDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &OpenUrlWithConfigureCreateDialog::reject);
}
OpenUrlWithConfigureCreateDialog::~OpenUrlWithConfigureCreateDialog()
......
......@@ -8,11 +8,14 @@
#include "openurlwith_private_export.h"
#include <QDialog>
class OpenUrlWithConfigureCreateWidget;
class LIBOPENURLWITHCONFIGURE_TESTS_EXPORT OpenUrlWithConfigureCreateDialog : public QDialog
{
Q_OBJECT
public:
explicit OpenUrlWithConfigureCreateDialog(QWidget *parent = nullptr);
~OpenUrlWithConfigureCreateDialog() override;
private:
OpenUrlWithConfigureCreateWidget *const mOpenUrlWithCreateWidget;
};
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