Commit 64807d48 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add new settings

parent 6f92d6b6
......@@ -77,7 +77,7 @@ set(LIBKLEO_LIB_VERSION "5.12.80")
set(AKONADI_LIB_VERSION "5.12.80")
set(INCIDENCEEDITOR_LIB_VERSION "5.12.80")
set(KTNEF_LIB_VERSION "5.12.80")
set(MESSAGELIB_LIB_VERSION "5.12.81")
set(MESSAGELIB_LIB_VERSION "5.13.41")
set(AKONADICALENDAR_LIB_VERSION "5.12.80")
set(CALENDAR_UTILS_VERSION "5.12.80")
set(KPIMTEXTEDIT_LIB_VERSION "5.12.80")
......
......@@ -20,6 +20,7 @@
#include "dkimgeneralwidgettest.h"
#include "dkimgeneralwidget.h"
#include <QCheckBox>
#include <QComboBox>
#include <QTest>
#include <QVBoxLayout>
QTEST_MAIN(DKIMGeneralWidgetTest)
......@@ -45,8 +46,6 @@ void DKIMGeneralWidgetTest::shouldHaveDefaultValues()
QVERIFY(!mSaveResult->text().isEmpty());
QVERIFY(!mSaveResult->isChecked());
QCheckBox *mSaveKey = w.findChild<QCheckBox *>(QStringLiteral("mSaveKey"));
QComboBox *mSaveKey = w.findChild<QComboBox *>(QStringLiteral("mSaveKey"));
QVERIFY(mSaveKey);
QVERIFY(!mSaveKey->text().isEmpty());
QVERIFY(!mSaveKey->isChecked());
}
......@@ -22,6 +22,8 @@
#include <MessageViewer/DKIMManager>
#include <KLocalizedString>
#include <QCheckBox>
#include <QComboBox>
#include <QLabel>
#include <QVBoxLayout>
#include <PimCommon/ConfigureImmutableWidgetUtils>
using namespace PimCommon::ConfigureImmutableWidgetUtils;
......@@ -42,10 +44,19 @@ DKIMGeneralWidget::DKIMGeneralWidget(QWidget *parent)
mSaveResult->setChecked(false);
mainLayout->addWidget(mSaveResult);
mSaveKey = new QCheckBox(i18n("Save Record Key"));
QHBoxLayout *saveKeyLayout = new QHBoxLayout;
saveKeyLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->addLayout(saveKeyLayout);
QLabel *saveKeyLabel = new QLabel(i18n("Save Record Key:"), this);
saveKeyLabel->setObjectName(QStringLiteral("saveKeyLabel"));
saveKeyLayout->addWidget(saveKeyLabel);
mSaveKey = new QComboBox(this);
mSaveKey->setObjectName(QStringLiteral("mSaveKey"));
mSaveKey->setChecked(false);
mainLayout->addWidget(mSaveKey);
mSaveKey->addItems({i18n("Nothing"), i18n("Save"), i18n("Save and Compare")});
saveKeyLayout->addWidget(mSaveKey);
saveKeyLayout->addStretch(1);
mainLayout->addStretch(1);
}
......@@ -64,7 +75,7 @@ void DKIMGeneralWidget::saveSettings()
{
saveCheckBox(mEnableDkimSupport, MessageViewer::MessageViewerSettings::self()->enabledDkimItem());
saveCheckBox(mSaveResult, MessageViewer::MessageViewerSettings::self()->saveDkimResultItem());
saveCheckBox(mSaveKey, MessageViewer::MessageViewerSettings::self()->saveKeyItem());
saveComboBox(mSaveKey, MessageViewer::MessageViewerSettings::self()->saveKeyItem());
if (!mEnableDkimSupport->isChecked()) {
MessageViewer::DKIMManager::self()->clearInfoWidget();
}
......
......@@ -23,6 +23,7 @@
#include <QWidget>
#include "dkimconfigure_private_export.h"
class QCheckBox;
class QComboBox;
class LIBDKIMVERIFYCONFIGURE_TESTS_EXPORT DKIMGeneralWidget : public QWidget
{
Q_OBJECT
......@@ -35,7 +36,7 @@ public:
private:
QCheckBox *mEnableDkimSupport = nullptr;
QCheckBox *mSaveResult = nullptr;
QCheckBox *mSaveKey = nullptr;
QComboBox *mSaveKey = nullptr;
};
#endif // DKIMGENERALWIDGET_H
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