Commit 6d41df37 authored by Laurent Montel's avatar Laurent Montel 😁

Use new folderconfiguresettingspagebase

parent 60c2a151
Pipeline #35733 failed with stage
in 99 minutes and 43 seconds
......@@ -9,15 +9,12 @@
#include <QVBoxLayout>
FolderConfigureSettingsGeneralWidget::FolderConfigureSettingsGeneralWidget(QWidget *parent)
: QWidget(parent)
: FolderConfigureSettingsPageBase(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mCollectionGeneralWidget = new MailCommon::CollectionGeneralWidget(this);
mCollectionGeneralWidget->setObjectName(QStringLiteral("mCollectionGeneralWidget"));
mainLayout->addWidget(mCollectionGeneralWidget);
mainLayout->addStretch();
addMainWidget(mCollectionGeneralWidget);
mMainLayout->addStretch();
}
FolderConfigureSettingsGeneralWidget::~FolderConfigureSettingsGeneralWidget()
......@@ -26,5 +23,7 @@ FolderConfigureSettingsGeneralWidget::~FolderConfigureSettingsGeneralWidget()
void FolderConfigureSettingsGeneralWidget::save(Akonadi::Collection &col)
{
mCollectionGeneralWidget->save(col);
if (wasModified()) {
mCollectionGeneralWidget->save(col);
}
}
......@@ -9,11 +9,12 @@
#include <QWidget>
#include "folderconfiguresettings_private_export.h"
#include "folderconfiguresettingspagebase.h"
#include <AkonadiCore/Collection>
namespace MailCommon {
class CollectionGeneralWidget;
}
class LIBFOLDERCONFIGURESETTINGS_TESTS_EXPORT FolderConfigureSettingsGeneralWidget : public QWidget
class LIBFOLDERCONFIGURESETTINGS_TESTS_EXPORT FolderConfigureSettingsGeneralWidget : public FolderConfigureSettingsPageBase
{
Q_OBJECT
public:
......
......@@ -19,6 +19,7 @@ FolderConfigureSettingsPageBase::FolderConfigureSettingsPageBase(QWidget *parent
mModifyCheckBox = new QCheckBox(i18n("Modify Settings"), this);
mModifyCheckBox->setObjectName(QStringLiteral("mModifiedCheckBox"));
mModifyCheckBox->setChecked(false);
mMainLayout->addWidget(mModifyCheckBox);
connect(mModifyCheckBox, &QCheckBox::clicked, this, &FolderConfigureSettingsPageBase::slotModifyClicked);
}
......
......@@ -9,14 +9,11 @@
#include <QVBoxLayout>
FolderConfigureSettingsTemplateWidget::FolderConfigureSettingsTemplateWidget(QWidget *parent)
: QWidget(parent)
: FolderConfigureSettingsPageBase(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins(0, 0, 0, 0);
mCollectionTemplateWidget = new MailCommon::CollectionTemplatesWidget(this);
mCollectionTemplateWidget->setObjectName(QStringLiteral("mCollectionTemplateWidget"));
mainLayout->addWidget(mCollectionTemplateWidget);
addMainWidget(mCollectionTemplateWidget);
}
FolderConfigureSettingsTemplateWidget::~FolderConfigureSettingsTemplateWidget()
......@@ -25,5 +22,7 @@ FolderConfigureSettingsTemplateWidget::~FolderConfigureSettingsTemplateWidget()
void FolderConfigureSettingsTemplateWidget::save(Akonadi::Collection &col)
{
mCollectionTemplateWidget->save(col);
if (wasModified()) {
mCollectionTemplateWidget->save(col);
}
}
......@@ -7,12 +7,14 @@
#ifndef FOLDERCONFIGURESETTINGSTEMPLATEWIDGET_H
#define FOLDERCONFIGURESETTINGSTEMPLATEWIDGET_H
#include "folderconfiguresettingspagebase.h"
#include <QWidget>
#include <AkonadiCore/Collection>
namespace MailCommon {
class CollectionTemplatesWidget;
}
class FolderConfigureSettingsTemplateWidget : public QWidget
class FolderConfigureSettingsTemplateWidget : public FolderConfigureSettingsPageBase
{
Q_OBJECT
public:
......
......@@ -9,13 +9,11 @@
#include <QVBoxLayout>
FolderConfigureSettingsViewWidget::FolderConfigureSettingsViewWidget(QWidget *parent)
: QWidget(parent)
: FolderConfigureSettingsPageBase(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mCollectionViewWidget = new MailCommon::CollectionViewWidget(this);
mCollectionViewWidget->setObjectName(QStringLiteral("mCollectionTemplateWidget"));
mainLayout->addWidget(mCollectionViewWidget);
addMainWidget(mCollectionViewWidget);
}
FolderConfigureSettingsViewWidget::~FolderConfigureSettingsViewWidget()
......@@ -24,5 +22,7 @@ FolderConfigureSettingsViewWidget::~FolderConfigureSettingsViewWidget()
void FolderConfigureSettingsViewWidget::save(Akonadi::Collection &col)
{
mCollectionViewWidget->save(col);
if (wasModified()) {
mCollectionViewWidget->save(col);
}
}
......@@ -7,12 +7,14 @@
#ifndef FOLDERCONFIGURESETTINGSVIEWWIDGET_H
#define FOLDERCONFIGURESETTINGSVIEWWIDGET_H
#include "folderconfiguresettingspagebase.h"
#include <QWidget>
#include <AkonadiCore/Collection>
namespace MailCommon {
class CollectionViewWidget;
}
class FolderConfigureSettingsViewWidget : public QWidget
class FolderConfigureSettingsViewWidget : public FolderConfigureSettingsPageBase
{
Q_OBJECT
public:
......
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