summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-23 21:38:54 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-23 21:38:54 (GMT)
commit6929562ba3a03210863e2ddd83833d8f2b14b8ca (patch)
treecbd87dcfdc216d0b9fefb326bc178b5695e2170b
parent5cae4a0c561f36a8ccbecb87a5f6a02626e2bb72 (diff)
Add dialogbox to configure plugins. Clean up plugins.
Remove double margin etc.
-rw-r--r--CMakeLists.txt2
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/CMakeLists.txt1
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp62
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.h44
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp1
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsinterface.cpp2
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.cpp10
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.h2
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/autotests/CMakeLists.txt2
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/autotests/automaticaddcontactsplugintest.cpp1
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/CMakeLists.txt1
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/autotests/CMakeLists.txt2
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/autotests/checkbeforesendplugintest.cpp1
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendinterface.cpp2
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.cpp11
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.h3
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp61
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.h42
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp1
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt3
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/autotests/CMakeLists.txt2
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressplugintest.cpp1
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp62
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.h42
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp1
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressinterface.cpp2
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.cpp10
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.h2
-rw-r--r--plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.cpp15
-rw-r--r--plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.h1
-rw-r--r--plugins/webengineurlinterceptor/adblock/autotests/adblockpluginurlinterceptortest.cpp4
-rw-r--r--plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.cpp12
-rw-r--r--plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.h3
-rw-r--r--plugins/webengineurlinterceptor/adblock/lib/widgets/ui/settings_adblock.ui24
34 files changed, 385 insertions, 50 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 44b56c9..79692c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,7 +68,7 @@ set(LIBKLEO_LIB_VERSION "5.3.40")
set(AKONADI_LIB_VERSION "5.3.45")
set(INCIDENCEEDITOR_LIB_VERSION "5.3.40")
set(KTNEF_LIB_VERSION "5.3.40")
-set(MESSAGELIB_LIB_VERSION "5.3.63")
+set(MESSAGELIB_LIB_VERSION "5.3.64")
set(AKONADICALENDAR_LIB_VERSION "5.3.40")
set(CALENDAR_UTILS_VERSION "5.3.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.3.42")
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/CMakeLists.txt b/kmail/editorsendcheckplugins/automaticaddcontacts/CMakeLists.txt
index ab81b37..2c7ef65 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/CMakeLists.txt
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/CMakeLists.txt
@@ -5,6 +5,7 @@ set(kmail_automaticaddcontactseditorplugin_SRCS
automaticaddcontactsjob.cpp
automaticaddcontactstabwidget.cpp
automaticaddcontactsconfiguretab.cpp
+ automaticaddcontactsconfiguredialog.cpp
)
ecm_qt_declare_logging_category(kmail_automaticaddcontactseditorplugin_SRCS HEADER automaticaddcontactsplugin_debug.h IDENTIFIER KMAIL_EDITOR_AUTOMATICADDCONTACTS_PLUGIN_LOG CATEGORY_NAME org.kde.pim.kmail_automaticaddcontactsplugin)
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp
new file mode 100644
index 0000000..2b13658
--- /dev/null
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp
@@ -0,0 +1,62 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "automaticaddcontactsconfiguredialog.h"
+#include "automaticaddcontactsconfigurewidget.h"
+#include <KIdentityManagement/IdentityManager>
+
+AutomaticAddContactsConfigureDialog::AutomaticAddContactsConfigureDialog(QWidget *parent)
+ : PimCommon::ConfigurePluginDialog(parent),
+ mConfigureWidget(Q_NULLPTR)
+{
+ initLayout();
+}
+
+AutomaticAddContactsConfigureDialog::~AutomaticAddContactsConfigureDialog()
+{
+
+}
+
+QWidget *AutomaticAddContactsConfigureDialog::createLayout()
+{
+ mConfigureWidget = new AutomaticAddContactsConfigureWidget(KIdentityManagement::IdentityManager::self(), this);
+ return mConfigureWidget;
+}
+
+void AutomaticAddContactsConfigureDialog::save()
+{
+ mConfigureWidget->saveSettings();
+}
+
+void AutomaticAddContactsConfigureDialog::load()
+{
+ mConfigureWidget->loadSettings();
+}
+
+
+void AutomaticAddContactsConfigureDialog::reset()
+{
+ mConfigureWidget->resetSettings();
+}
+
+QString AutomaticAddContactsConfigureDialog::helpAnchor() const
+{
+ //TODO
+ return {};
+}
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.h b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.h
new file mode 100644
index 0000000..ba48734
--- /dev/null
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef AUTOMATICADDCONTACTSCONFIGUREDIALOG_H
+#define AUTOMATICADDCONTACTSCONFIGUREDIALOG_H
+
+#include <PimCommon/ConfigurePluginDialog>
+
+class AutomaticAddContactsConfigureWidget;
+class AutomaticAddContactsConfigureDialog : public PimCommon::ConfigurePluginDialog
+{
+ Q_OBJECT
+public:
+ explicit AutomaticAddContactsConfigureDialog(QWidget *parent = Q_NULLPTR);
+ ~AutomaticAddContactsConfigureDialog();
+
+protected:
+ QWidget *createLayout() Q_DECL_OVERRIDE;
+ void save() Q_DECL_OVERRIDE;
+ void load() Q_DECL_OVERRIDE;
+ void reset() Q_DECL_OVERRIDE;
+ QString helpAnchor() const Q_DECL_OVERRIDE;
+
+private:
+ AutomaticAddContactsConfigureWidget *mConfigureWidget;
+};
+
+#endif // AUTOMATICADDCONTACTSCONFIGUREDIALOG_H
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp
index 7f6edeb..3cdd824 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp
@@ -33,6 +33,7 @@ AutomaticAddContactsConfigureWidget::AutomaticAddContactsConfigureWidget(KIdenti
: MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(im, parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ mainLayout->setMargin(0);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mConfigureTab = new AutomaticAddContactsConfigureTab(identityManager(), this);
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsinterface.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsinterface.cpp
index e5efca9..e6fab66 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsinterface.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsinterface.cpp
@@ -56,7 +56,7 @@ void AutomaticAddContactsInterface::reloadConfig()
{
mHashSettings.clear();
- KIdentityManagement::IdentityManager *im = identityManagement();
+ KIdentityManagement::IdentityManager *im = KIdentityManagement::IdentityManager::self();
KIdentityManagement::IdentityManager::ConstIterator end = im->end();
KSharedConfig::Ptr config = KSharedConfig::openConfig();
for (KIdentityManagement::IdentityManager::ConstIterator it = im->begin(); it != end; ++it) {
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.cpp
index 2005da2..9b0a292 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.cpp
@@ -20,6 +20,7 @@
#include "automaticaddcontactsplugin.h"
#include "automaticaddcontactsinterface.h"
#include "automaticaddcontactsconfigurewidget.h"
+#include "automaticaddcontactsconfiguredialog.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
@@ -49,11 +50,12 @@ bool AutomaticAddContactsPlugin::hasConfigureDialog() const
return true;
}
-MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting AutomaticAddContactsPlugin::createConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent) const
+void AutomaticAddContactsPlugin::showConfigureDialog(QWidget *parent)
{
- AutomaticAddContactsConfigureWidget *w = new AutomaticAddContactsConfigureWidget(identityManager, parent);
- MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting settings(w, i18n("Add Automatically Contacts"));
- return settings;
+ AutomaticAddContactsConfigureDialog dlg(parent);
+ dlg.exec();
}
#include "automaticaddcontactsplugin.moc"
+
+
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.h b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.h
index e3b24f7..770457d 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.h
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsplugin.h
@@ -31,7 +31,7 @@ public:
MessageComposer::PluginEditorCheckBeforeSendInterface *createInterface(QObject *parent) Q_DECL_OVERRIDE;
bool hasConfigureDialog() const Q_DECL_OVERRIDE;
- MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting createConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent) const Q_DECL_OVERRIDE;
+ void showConfigureDialog(QWidget *parent) Q_DECL_OVERRIDE;
};
#endif // AUTOMATICADDCONTACTSPLUGIN_H
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/autotests/CMakeLists.txt b/kmail/editorsendcheckplugins/automaticaddcontacts/autotests/CMakeLists.txt
index cdcd6ce..7f9a727 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/autotests/CMakeLists.txt
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/autotests/CMakeLists.txt
@@ -17,7 +17,7 @@ set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
-add_akonadi_isolated_test_advanced(automaticaddcontactsplugintest.cpp "${automaticaddcontacts_common_SRCS};../automaticaddcontactsconfigurewidget.cpp;../automaticaddcontactsconfiguretab.cpp;../automaticaddcontactstabwidget.cpp;../automaticaddcontactsjob.cpp;../automaticaddcontactsplugin.cpp;../automaticaddcontactsinterface.cpp;../automaticaddcontactsconfigurewidget.cpp" "KF5::IconThemes;KF5::MessageComposer;KF5::I18n;KF5::PimCommon;KF5::AkonadiWidgets;KF5::Contacts")
+add_akonadi_isolated_test_advanced(automaticaddcontactsplugintest.cpp "${automaticaddcontacts_common_SRCS};../automaticaddcontactsconfiguredialog.cpp;../automaticaddcontactsconfigurewidget.cpp;../automaticaddcontactsconfiguretab.cpp;../automaticaddcontactstabwidget.cpp;../automaticaddcontactsjob.cpp;../automaticaddcontactsplugin.cpp;../automaticaddcontactsinterface.cpp;../automaticaddcontactsconfigurewidget.cpp" "KF5::IconThemes;KF5::MessageComposer;KF5::I18n;KF5::PimCommon;KF5::AkonadiWidgets;KF5::Contacts")
add_akonadi_isolated_test_advanced(automaticaddcontactsconfigurewidgettest.cpp "${automaticaddcontacts_common_SRCS};../automaticaddcontactsconfiguretab.cpp;../automaticaddcontactstabwidget.cpp;../automaticaddcontactsconfigurewidget.cpp" "KF5::IconThemes;KF5::MessageComposer;KF5::I18n;KF5::PimCommon;KF5::AkonadiWidgets;KF5::Contacts")
add_akonadi_isolated_test_advanced(automaticaddcontactstabwidgettest.cpp "${automaticaddcontacts_common_SRCS};../automaticaddcontactstabwidget.cpp" "KF5::IconThemes;KF5::MessageComposer;KF5::I18n;KF5::PimCommon;KF5::AkonadiWidgets;KF5::Contacts")
add_akonadi_isolated_test_advanced(automaticaddcontactsconfiguretabtest.cpp "${automaticaddcontacts_common_SRCS};../automaticaddcontactstabwidget.cpp;../automaticaddcontactsconfiguretab.cpp" "KF5::IconThemes;KF5::MessageComposer;KF5::I18n;KF5::PimCommon;KF5::AkonadiWidgets;KF5::Contacts")
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/autotests/automaticaddcontactsplugintest.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/autotests/automaticaddcontactsplugintest.cpp
index ac2fe7e..a08d8d9 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/autotests/automaticaddcontactsplugintest.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/autotests/automaticaddcontactsplugintest.cpp
@@ -37,7 +37,6 @@ void AutomaticAddContactsPluginTest::shouldHaveDefaultValue()
AutomaticAddContactsPlugin plugin;
QVERIFY(plugin.hasConfigureDialog());
QVERIFY(plugin.createInterface(this));
- QVERIFY(plugin.createConfigureWidget(Q_NULLPTR, new QWidget()).configureWidget);
}
QTEST_MAIN(AutomaticAddContactsPluginTest)
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/CMakeLists.txt b/kmail/editorsendcheckplugins/checkbeforesend/CMakeLists.txt
index eca1b0d..f36b6c6 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/CMakeLists.txt
+++ b/kmail/editorsendcheckplugins/checkbeforesend/CMakeLists.txt
@@ -2,6 +2,7 @@ set(kmail_checkbeforesendeditorplugin_SRCS
checkbeforesendplugin.cpp
checkbeforesendinterface.cpp
configurewidget/checkbeforesendconfigurewidget.cpp
+ configurewidget/checkbeforesendconfiguredialog.cpp
duplicateemails/checkduplicateemailsdialog.cpp
duplicateemails/checkduplicateemailsjob.cpp
sendattachments/checkattachmentdialog.cpp
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/autotests/CMakeLists.txt b/kmail/editorsendcheckplugins/checkbeforesend/autotests/CMakeLists.txt
index 0bca109..f0c8ea4 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/autotests/CMakeLists.txt
+++ b/kmail/editorsendcheckplugins/checkbeforesend/autotests/CMakeLists.txt
@@ -12,7 +12,7 @@ macro(add_kmail_checkbeforesend_unittest _source _additional)
endmacro ()
-add_kmail_checkbeforesend_unittest(checkbeforesendplugintest.cpp "../sendattachments/checkattachmentjob.cpp;../sendattachments/checkattachmentdialog.cpp;../duplicateemails/checkduplicateemailsjob.cpp;../duplicateemails/checkduplicateemailsdialog.cpp;../checkbeforesendplugin.cpp;../checkbeforesendinterface.cpp;../configurewidget/checkbeforesendconfigurewidget.cpp")
+add_kmail_checkbeforesend_unittest(checkbeforesendplugintest.cpp "../configurewidget/checkbeforesendconfiguredialog.cpp;../sendattachments/checkattachmentjob.cpp;../sendattachments/checkattachmentdialog.cpp;../duplicateemails/checkduplicateemailsjob.cpp;../duplicateemails/checkduplicateemailsdialog.cpp;../checkbeforesendplugin.cpp;../checkbeforesendinterface.cpp;../configurewidget/checkbeforesendconfigurewidget.cpp")
add_kmail_checkbeforesend_unittest(checkbeforesendconfigurewidgettest.cpp "../configurewidget/checkbeforesendconfigurewidget.cpp")
add_kmail_checkbeforesend_unittest(checkduplicateemailsdialogtest.cpp "../duplicateemails/checkduplicateemailsdialog.cpp")
add_kmail_checkbeforesend_unittest(checkduplicateemailsjobtest.cpp "../duplicateemails/checkduplicateemailsjob.cpp")
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/autotests/checkbeforesendplugintest.cpp b/kmail/editorsendcheckplugins/checkbeforesend/autotests/checkbeforesendplugintest.cpp
index 32dedb0..693b3aa 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/autotests/checkbeforesendplugintest.cpp
+++ b/kmail/editorsendcheckplugins/checkbeforesend/autotests/checkbeforesendplugintest.cpp
@@ -37,7 +37,6 @@ void CheckBeforeSendPluginTest::shouldHaveDefaultValue()
CheckBeforeSendPlugin plugin;
QVERIFY(plugin.hasConfigureDialog());
QVERIFY(plugin.createInterface(this));
- QVERIFY(plugin.createConfigureWidget(Q_NULLPTR, new QWidget()).configureWidget);
}
QTEST_MAIN(CheckBeforeSendPluginTest)
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendinterface.cpp b/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendinterface.cpp
index 2d5c628..40fb40b 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendinterface.cpp
+++ b/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendinterface.cpp
@@ -58,7 +58,7 @@ bool CheckBeforeSendInterface::exec(const MessageComposer::PluginEditorCheckBefo
}
}
if (mCheckMailTransport) {
- const KIdentityManagement::Identity identity = identityManagement()->identityForUoid(params.identity());
+ const KIdentityManagement::Identity identity = KIdentityManagement::IdentityManager::self()->identityForUoid(params.identity());
if (identity.transport() != QString::number(params.transportId())) {
if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), i18n("Do you want to send the email with a different SMTP than the one defined in the current identity?"), i18n("Check SMTP server"))) {
return false;
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.cpp b/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.cpp
index 947234d..984c9a6 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.cpp
+++ b/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.cpp
@@ -20,10 +20,12 @@
#include "checkbeforesendplugin.h"
#include "checkbeforesendinterface.h"
#include "configurewidget/checkbeforesendconfigurewidget.h"
+#include "configurewidget/checkbeforesendconfiguredialog.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
+
K_PLUGIN_FACTORY_WITH_JSON(ChangeCasePluginEditorFactory, "kmail_checkbeforesendplugin.json", registerPlugin<CheckBeforeSendPlugin>();)
CheckBeforeSendPlugin::CheckBeforeSendPlugin(QObject *parent, const QList<QVariant> &)
@@ -49,11 +51,12 @@ bool CheckBeforeSendPlugin::hasConfigureDialog() const
return true;
}
-MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting CheckBeforeSendPlugin::createConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent) const
+void CheckBeforeSendPlugin::showConfigureDialog(QWidget *parent)
{
- CheckBeforeSendConfigureWidget *w = new CheckBeforeSendConfigureWidget(identityManager, parent);
- MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting settings(w, i18n("Check Before Send Email"));
- return settings;
+ CheckBeforeSendConfigureDialog dlg(parent);
+ dlg.exec();
}
#include "checkbeforesendplugin.moc"
+
+
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.h b/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.h
index 95f2419..c2aed0d 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.h
+++ b/kmail/editorsendcheckplugins/checkbeforesend/checkbeforesendplugin.h
@@ -31,7 +31,8 @@ public:
MessageComposer::PluginEditorCheckBeforeSendInterface *createInterface(QObject *parent) Q_DECL_OVERRIDE;
bool hasConfigureDialog() const Q_DECL_OVERRIDE;
- MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting createConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent) const Q_DECL_OVERRIDE;
+
+ void showConfigureDialog(QWidget *parent) Q_DECL_OVERRIDE;
};
#endif // CHECKBEFORESENDPLUGIN_H
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp
new file mode 100644
index 0000000..274bee3
--- /dev/null
+++ b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "checkbeforesendconfiguredialog.h"
+#include "checkbeforesendconfigurewidget.h"
+#include <KIdentityManagement/IdentityManager>
+
+CheckBeforeSendConfigureDialog::CheckBeforeSendConfigureDialog(QWidget *parent)
+ : PimCommon::ConfigurePluginDialog(parent)
+{
+ initLayout();
+}
+
+CheckBeforeSendConfigureDialog::~CheckBeforeSendConfigureDialog()
+{
+
+}
+
+QWidget *CheckBeforeSendConfigureDialog::createLayout()
+{
+ mConfigureWidget = new CheckBeforeSendConfigureWidget(KIdentityManagement::IdentityManager::self(), this);
+ return mConfigureWidget;
+}
+
+void CheckBeforeSendConfigureDialog::save()
+{
+ mConfigureWidget->saveSettings();
+}
+
+void CheckBeforeSendConfigureDialog::load()
+{
+ mConfigureWidget->loadSettings();
+}
+
+
+void CheckBeforeSendConfigureDialog::reset()
+{
+ mConfigureWidget->resetSettings();
+}
+
+QString CheckBeforeSendConfigureDialog::helpAnchor() const
+{
+ //TODO
+ return {};
+}
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.h b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.h
new file mode 100644
index 0000000..5c8acea
--- /dev/null
+++ b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.h
@@ -0,0 +1,42 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef CHECKBEFORESENDCONFIGUREDIALOG_H
+#define CHECKBEFORESENDCONFIGUREDIALOG_H
+
+#include <PimCommon/ConfigurePluginDialog>
+class CheckBeforeSendConfigureWidget;
+class CheckBeforeSendConfigureDialog : public PimCommon::ConfigurePluginDialog
+{
+ Q_OBJECT
+public:
+ explicit CheckBeforeSendConfigureDialog(QWidget *parent = Q_NULLPTR);
+ ~CheckBeforeSendConfigureDialog();
+
+protected:
+ QWidget *createLayout() Q_DECL_OVERRIDE;
+ void save() Q_DECL_OVERRIDE;
+ void load() Q_DECL_OVERRIDE;
+ void reset() Q_DECL_OVERRIDE;
+ QString helpAnchor() const Q_DECL_OVERRIDE;
+private:
+ CheckBeforeSendConfigureWidget *mConfigureWidget;
+};
+
+#endif // CHECKBEFORESENDCONFIGUREDIALOG_H
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp
index ea9ff64..c110cb7 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp
+++ b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp
@@ -28,6 +28,7 @@ CheckBeforeSendConfigureWidget::CheckBeforeSendConfigureWidget(KIdentityManageme
: MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(identityManager, parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ mainLayout->setMargin(0);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mCheckPlainTextMail = new QCheckBox(i18n("Send as plain text"), this);
diff --git a/kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt b/kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt
index 3ac2692..1507da1 100644
--- a/kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt
+++ b/kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt
@@ -6,7 +6,8 @@ set(kmail_confirmaddresseditorplugin_SRCS
confirmaddresswidget.cpp
confirmaddressconfiguretabwidget.cpp
confirmaddressconfiguretab.cpp
- confirmaddresscheckjob.cpp
+ confirmaddresscheckjob.cpp
+ confirmaddressconfiguredialog.cpp
)
ecm_qt_declare_logging_category(kmail_confirmaddresseditorplugin_SRCS HEADER confirmaddressplugin_debug.h IDENTIFIER KMAIL_EDITOR_CONFIRMADDRESS_PLUGIN_LOG CATEGORY_NAME org.kde.pim.kmail_confirmaddressplugin)
diff --git a/kmail/editorsendcheckplugins/confirm-address/autotests/CMakeLists.txt b/kmail/editorsendcheckplugins/confirm-address/autotests/CMakeLists.txt
index de066c1..60d7c7e 100644
--- a/kmail/editorsendcheckplugins/confirm-address/autotests/CMakeLists.txt
+++ b/kmail/editorsendcheckplugins/confirm-address/autotests/CMakeLists.txt
@@ -11,7 +11,7 @@ macro(add_kmail_confirmaddress_unittest _source _additional)
target_link_libraries( ${_name} Qt5::Test KF5::IconThemes KF5::MessageComposer KF5::I18n KF5::PimCommon)
endmacro ()
-add_kmail_confirmaddress_unittest(confirmaddressplugintest.cpp "../confirmaddressplugin.cpp;../confirmaddressinterface.cpp;../confirmaddressconfigurewidget.cpp;../confirmaddressdialog.cpp;../confirmaddresswidget.cpp;../confirmaddressconfiguretab.cpp;../confirmaddressconfiguretabwidget.cpp;../confirmaddresscheckjob.cpp")
+add_kmail_confirmaddress_unittest(confirmaddressplugintest.cpp "../confirmaddressconfiguredialog.cpp;../confirmaddressplugin.cpp;../confirmaddressinterface.cpp;../confirmaddressconfigurewidget.cpp;../confirmaddressdialog.cpp;../confirmaddresswidget.cpp;../confirmaddressconfiguretab.cpp;../confirmaddressconfiguretabwidget.cpp;../confirmaddresscheckjob.cpp")
add_kmail_confirmaddress_unittest(confirmaddressconfigurewidgettest.cpp "../confirmaddressconfigurewidget.cpp;../confirmaddressconfiguretab.cpp;../confirmaddressconfiguretabwidget.cpp")
diff --git a/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressplugintest.cpp b/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressplugintest.cpp
index fc054b8..3196db3 100644
--- a/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressplugintest.cpp
+++ b/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressplugintest.cpp
@@ -37,7 +37,6 @@ void ConfirmAddressPluginTest::shouldHaveDefaultValue()
{
ConfirmAddressPlugin plugin;
QVERIFY(plugin.hasConfigureDialog());
- QVERIFY(plugin.createConfigureWidget(Q_NULLPTR, new QWidget()).configureWidget);
QVERIFY(plugin.createInterface(this));
}
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp
new file mode 100644
index 0000000..c0ea475
--- /dev/null
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp
@@ -0,0 +1,62 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "confirmaddressconfiguredialog.h"
+#include "confirmaddressconfigurewidget.h"
+#include <KIdentityManagement/IdentityManager>
+
+ConfirmAddressConfigureDialog::ConfirmAddressConfigureDialog(QWidget *parent)
+ : PimCommon::ConfigurePluginDialog(parent),
+ mConfigureWidget(Q_NULLPTR)
+{
+ initLayout();
+}
+
+ConfirmAddressConfigureDialog::~ConfirmAddressConfigureDialog()
+{
+
+}
+
+QWidget *ConfirmAddressConfigureDialog::createLayout()
+{
+ mConfigureWidget = new ConfirmAddressConfigureWidget(KIdentityManagement::IdentityManager::self(), this);
+ return mConfigureWidget;
+}
+
+void ConfirmAddressConfigureDialog::save()
+{
+ mConfigureWidget->saveSettings();
+}
+
+void ConfirmAddressConfigureDialog::load()
+{
+ mConfigureWidget->loadSettings();
+}
+
+
+void ConfirmAddressConfigureDialog::reset()
+{
+ mConfigureWidget->resetSettings();
+}
+
+QString ConfirmAddressConfigureDialog::helpAnchor() const
+{
+ //TODO
+ return {};
+}
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.h b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.h
new file mode 100644
index 0000000..4f0d439
--- /dev/null
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.h
@@ -0,0 +1,42 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef CONFIRMADDRESSCONFIGUREDIALOG_H
+#define CONFIRMADDRESSCONFIGUREDIALOG_H
+
+#include <PimCommon/ConfigurePluginDialog>
+class ConfirmAddressConfigureWidget;
+class ConfirmAddressConfigureDialog : public PimCommon::ConfigurePluginDialog
+{
+ Q_OBJECT
+public:
+ explicit ConfirmAddressConfigureDialog(QWidget *parent = Q_NULLPTR);
+ ~ConfirmAddressConfigureDialog();
+
+protected:
+ QWidget *createLayout() Q_DECL_OVERRIDE;
+ void save() Q_DECL_OVERRIDE;
+ void load() Q_DECL_OVERRIDE;
+ void reset() Q_DECL_OVERRIDE;
+ QString helpAnchor() const Q_DECL_OVERRIDE;
+private:
+ ConfirmAddressConfigureWidget *mConfigureWidget;
+};
+
+#endif // CONFIRMADDRESSCONFIGUREDIALOG_H
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp
index 5c31f3e..08f8a87 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp
@@ -30,6 +30,7 @@ ConfirmAddressConfigureWidget::ConfirmAddressConfigureWidget(KIdentityManagement
: MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(im, parent)
{
QVBoxLayout *vboxlayout = new QVBoxLayout(this);
+ vboxlayout->setMargin(0);
vboxlayout->setObjectName(QStringLiteral("mainlayout"));
mEnable = new QCheckBox(i18n("Enable"), this);
mEnable->setObjectName(QStringLiteral("enable"));
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressinterface.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressinterface.cpp
index 6ea2f07..655ec25 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressinterface.cpp
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressinterface.cpp
@@ -111,7 +111,7 @@ void ConfirmAddressInterface::reloadConfig()
mEnabled = grp.readEntry("Enabled", false);
mHashSettings.clear();
- KIdentityManagement::IdentityManager *im = identityManagement();
+ KIdentityManagement::IdentityManager *im = KIdentityManagement::IdentityManager::self();
KIdentityManagement::IdentityManager::ConstIterator end = im->end();
for (KIdentityManagement::IdentityManager::ConstIterator it = im->begin(); it != end; ++it) {
const uint identity = (*it).uoid();
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.cpp
index 7073d3d..7ed1bff 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.cpp
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.cpp
@@ -20,6 +20,7 @@
#include "confirmaddressplugin.h"
#include "confirmaddressinterface.h"
#include "confirmaddressconfigurewidget.h"
+#include "confirmaddressconfiguredialog.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
@@ -50,11 +51,12 @@ bool ConfirmAddressPlugin::hasConfigureDialog() const
return true;
}
-MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting ConfirmAddressPlugin::createConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent) const
+void ConfirmAddressPlugin::showConfigureDialog(QWidget *parent)
{
- ConfirmAddressConfigureWidget *w = new ConfirmAddressConfigureWidget(identityManager, parent);
- MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting settings(w, i18n("Confirm Addresses"));
- return settings;
+ ConfirmAddressConfigureDialog dlg(parent);
+ dlg.exec();
}
#include "confirmaddressplugin.moc"
+
+
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.h b/kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.h
index 294429d..c83a65d 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.h
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressplugin.h
@@ -33,7 +33,7 @@ public:
MessageComposer::PluginEditorCheckBeforeSendInterface *createInterface(QObject *parent) Q_DECL_OVERRIDE;
bool hasConfigureDialog() const Q_DECL_OVERRIDE;
- MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting createConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent) const Q_DECL_OVERRIDE;
+ void showConfigureDialog(QWidget *parent) Q_DECL_OVERRIDE;
};
#endif // CONFIRMADDRESSPLUGIN_H
diff --git a/plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.cpp b/plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.cpp
index dac02eb..fc2fbb0 100644
--- a/plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.cpp
+++ b/plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.cpp
@@ -49,21 +49,10 @@ bool AdblockPluginUrlInterceptor::hasConfigureDialog() const
return true;
}
-WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting AdblockPluginUrlInterceptor::createConfigureWidget(QWidget *parent)
-{
- WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting settings;
- settings.name = i18n("AdBlock");
-
- AdBlock::AdblockPluginUrlInterceptorConfigureWidget *configureWidget = new AdBlock::AdblockPluginUrlInterceptorConfigureWidget(parent);
- settings.configureWidget = configureWidget;
- return settings;
-}
-
void AdblockPluginUrlInterceptor::showConfigureDialog(QWidget *parent)
{
- AdBlock::AdblockPluginUrlInterceptorConfigureDialog *dlg = new AdBlock::AdblockPluginUrlInterceptorConfigureDialog(parent);
- dlg->exec();
- //TODO
+ AdBlock::AdblockPluginUrlInterceptorConfigureDialog dlg(parent);
+ dlg.exec();
}
#include "adblockpluginurlinterceptor.moc"
diff --git a/plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.h b/plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.h
index 4459200..577761d 100644
--- a/plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.h
+++ b/plugins/webengineurlinterceptor/adblock/adblockpluginurlinterceptor.h
@@ -39,7 +39,6 @@ public:
void showConfigureDialog(QWidget *parent) Q_DECL_OVERRIDE;
bool hasConfigureDialog() const Q_DECL_OVERRIDE;
- WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting createConfigureWidget(QWidget *parent) Q_DECL_OVERRIDE;
};
#endif // ADBLOCKPLUGINURLINTERCEPTOR_H
diff --git a/plugins/webengineurlinterceptor/adblock/autotests/adblockpluginurlinterceptortest.cpp b/plugins/webengineurlinterceptor/adblock/autotests/adblockpluginurlinterceptortest.cpp
index 3604f08..b76cf87 100644
--- a/plugins/webengineurlinterceptor/adblock/autotests/adblockpluginurlinterceptortest.cpp
+++ b/plugins/webengineurlinterceptor/adblock/autotests/adblockpluginurlinterceptortest.cpp
@@ -38,9 +38,5 @@ void AdblockPluginUrlInterceptorTest::shouldHaveDefaultValue()
AdblockPluginUrlInterceptor w;
QVERIFY(w.createInterface(new QWebEngineView(), this));
QVERIFY(w.hasConfigureDialog());
-
- WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting settings = w.createConfigureWidget(new QWidget());
- QVERIFY(settings.configureWidget);
- QVERIFY(!settings.name.isEmpty());
}
QTEST_MAIN(AdblockPluginUrlInterceptorTest)
diff --git a/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.cpp b/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.cpp
index 7d7d0d5..fe38291 100644
--- a/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.cpp
+++ b/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.cpp
@@ -51,3 +51,15 @@ void AdblockPluginUrlInterceptorConfigureDialog::load()
{
mAdblockConfigureWidget->loadSettings();
}
+
+
+void AdBlock::AdblockPluginUrlInterceptorConfigureDialog::reset()
+{
+ mAdblockConfigureWidget->resetSettings();
+}
+
+QString AdBlock::AdblockPluginUrlInterceptorConfigureDialog::helpAnchor() const
+{
+ //TODO
+ return {};
+}
diff --git a/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.h b/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.h
index ec974b6..8512d10 100644
--- a/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.h
+++ b/plugins/webengineurlinterceptor/adblock/lib/widgets/adblockpluginurlinterceptorconfiguredialog.h
@@ -39,8 +39,11 @@ protected:
QWidget *createLayout() Q_DECL_OVERRIDE;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
+ void reset() Q_DECL_OVERRIDE;
+ QString helpAnchor() const Q_DECL_OVERRIDE;
private:
AdblockPluginUrlInterceptorConfigureWidget *mAdblockConfigureWidget;
+
};
}
#endif // ADBLOCKPLUGINURLINTERCEPTORCONFIGUREDIALOG_H
diff --git a/plugins/webengineurlinterceptor/adblock/lib/widgets/ui/settings_adblock.ui b/plugins/webengineurlinterceptor/adblock/lib/widgets/ui/settings_adblock.ui
index b877da9..41066be 100644
--- a/plugins/webengineurlinterceptor/adblock/lib/widgets/ui/settings_adblock.ui
+++ b/plugins/webengineurlinterceptor/adblock/lib/widgets/ui/settings_adblock.ui
@@ -11,6 +11,18 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
<item>
<widget class="QCheckBox" name="checkEnableAdblock">
<property name="text">
@@ -235,9 +247,14 @@
</widget>
<customwidgets>
<customwidget>
+ <class>KListWidgetSearchLine</class>
+ <extends>QLineEdit</extends>
+ <header>klistwidgetsearchline.h</header>
+ </customwidget>
+ <customwidget>
<class>KPluralHandlingSpinBox</class>
<extends>QSpinBox</extends>
- <header>KPluralHandlingSpinBox</header>
+ <header>kpluralhandlingspinbox.h</header>
</customwidget>
<customwidget>
<class>AdBlock::AdBlockListWidget</class>
@@ -245,11 +262,6 @@
<header>widgets/adblocklistwidget.h</header>
<container>1</container>
</customwidget>
- <customwidget>
- <class>KListWidgetSearchLine</class>
- <extends>KLineEdit</extends>
- <header>klistwidgetsearchline.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>