summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-30 06:56:46 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-30 06:56:46 (GMT)
commite90b4891bc1bbbba6e15d6fbb323db72c6bfadb2 (patch)
tree718e1ae2472613ae3bb850ff8c545609f8960519
parent46d0dc249ed2e1de8b327d0399f25aaf2cbec6bb (diff)
Adapt to new api
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp2
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.cpp13
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.h2
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp6
-rw-r--r--kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.h2
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp3
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp4
-rw-r--r--kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.h2
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp2
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.cpp4
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.h2
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp6
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h2
13 files changed, 20 insertions, 30 deletions
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp
index 9345a9a..53084b4 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguredialog.cpp
@@ -37,7 +37,7 @@ AutomaticAddContactsConfigureDialog::~AutomaticAddContactsConfigureDialog()
QWidget *AutomaticAddContactsConfigureDialog::createLayout()
{
- mConfigureWidget = new AutomaticAddContactsConfigureWidget(KIdentityManagement::IdentityManager::self(), this);
+ mConfigureWidget = new AutomaticAddContactsConfigureWidget(this);
return mConfigureWidget;
}
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.cpp
index a2c0b81..b55d49f 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.cpp
@@ -27,7 +27,7 @@
#include <KIdentityManagement/IdentityManager>
#include <KIdentityManagement/Identity>
-AutomaticAddContactsConfigureTab::AutomaticAddContactsConfigureTab(KIdentityManagement::IdentityManager *identityManagement, QWidget *parent)
+AutomaticAddContactsConfigureTab::AutomaticAddContactsConfigureTab(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *mainLayout = new QHBoxLayout(this);
@@ -36,7 +36,7 @@ AutomaticAddContactsConfigureTab::AutomaticAddContactsConfigureTab(KIdentityMana
mTabWidget = new QTabWidget(this);
mTabWidget->setObjectName(QStringLiteral("tabwidget"));
mainLayout->addWidget(mTabWidget);
- initTab(identityManagement);
+ initTab(KIdentityManagement::IdentityManager::self());
}
AutomaticAddContactsConfigureTab::~AutomaticAddContactsConfigureTab()
@@ -46,11 +46,6 @@ AutomaticAddContactsConfigureTab::~AutomaticAddContactsConfigureTab()
void AutomaticAddContactsConfigureTab::initTab(KIdentityManagement::IdentityManager *identityManager)
{
- bool needToDeleteIdentity = false;
- if (!identityManager) {
- needToDeleteIdentity = true;
- identityManager = new KIdentityManagement::IdentityManager(true);
- }
KIdentityManagement::IdentityManager::ConstIterator end = identityManager->end();
for (KIdentityManagement::IdentityManager::ConstIterator it = identityManager->begin(); it != end; ++it) {
AutomaticAddContactsTabWidget *w = new AutomaticAddContactsTabWidget(this);
@@ -59,10 +54,6 @@ void AutomaticAddContactsConfigureTab::initTab(KIdentityManagement::IdentityMana
w->setIdentity((*it).uoid());
mListTabWidget.append(w);
}
- if (needToDeleteIdentity) {
- delete identityManager;
- identityManager = Q_NULLPTR;
- }
}
void AutomaticAddContactsConfigureTab::loadSettings()
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.h b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.h
index dd8d5e2..2e46e74 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.h
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfiguretab.h
@@ -34,7 +34,7 @@ class AutomaticAddContactsConfigureTab : public QWidget
{
Q_OBJECT
public:
- explicit AutomaticAddContactsConfigureTab(KIdentityManagement::IdentityManager *identityManagement, QWidget *parent = Q_NULLPTR);
+ explicit AutomaticAddContactsConfigureTab(QWidget *parent = Q_NULLPTR);
~AutomaticAddContactsConfigureTab();
void loadSettings();
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp
index 3cdd824..9efe723 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.cpp
@@ -29,14 +29,14 @@
#include <KConfigGroup>
#include <KSharedConfig>
-AutomaticAddContactsConfigureWidget::AutomaticAddContactsConfigureWidget(KIdentityManagement::IdentityManager *im, QWidget *parent)
- : MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(im, parent)
+AutomaticAddContactsConfigureWidget::AutomaticAddContactsConfigureWidget(QWidget *parent)
+ : MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setMargin(0);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
- mConfigureTab = new AutomaticAddContactsConfigureTab(identityManager(), this);
+ mConfigureTab = new AutomaticAddContactsConfigureTab(this);
mConfigureTab->setObjectName(QStringLiteral("configuretab"));
mainLayout->addWidget(mConfigureTab);
connect(mConfigureTab, &AutomaticAddContactsConfigureTab::configureChanged, this, &AutomaticAddContactsConfigureWidget::configureChanged);
diff --git a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.h b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.h
index 8286ec4..443af88 100644
--- a/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.h
+++ b/kmail/editorsendcheckplugins/automaticaddcontacts/automaticaddcontactsconfigurewidget.h
@@ -27,7 +27,7 @@ class AutomaticAddContactsConfigureWidget : public MessageComposer::PluginEditor
{
Q_OBJECT
public:
- explicit AutomaticAddContactsConfigureWidget(KIdentityManagement::IdentityManager *im, QWidget *parent = Q_NULLPTR);
+ explicit AutomaticAddContactsConfigureWidget(QWidget *parent = Q_NULLPTR);
~AutomaticAddContactsConfigureWidget();
void loadSettings() Q_DECL_OVERRIDE;
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp
index fd6898a..7996c4b 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp
+++ b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfiguredialog.cpp
@@ -19,7 +19,6 @@
#include "checkbeforesendconfiguredialog.h"
#include "checkbeforesendconfigurewidget.h"
-#include <KIdentityManagement/IdentityManager>
#include <KLocalizedString>
CheckBeforeSendConfigureDialog::CheckBeforeSendConfigureDialog(QWidget *parent)
@@ -36,7 +35,7 @@ CheckBeforeSendConfigureDialog::~CheckBeforeSendConfigureDialog()
QWidget *CheckBeforeSendConfigureDialog::createLayout()
{
- mConfigureWidget = new CheckBeforeSendConfigureWidget(KIdentityManagement::IdentityManager::self(), this);
+ mConfigureWidget = new CheckBeforeSendConfigureWidget(this);
return mConfigureWidget;
}
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp
index c110cb7..a15bcd5 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp
+++ b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.cpp
@@ -24,8 +24,8 @@
#include <KConfigGroup>
#include <KSharedConfig>
-CheckBeforeSendConfigureWidget::CheckBeforeSendConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent)
- : MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(identityManager, parent)
+CheckBeforeSendConfigureWidget::CheckBeforeSendConfigureWidget(QWidget *parent)
+ : MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setMargin(0);
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.h b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.h
index 4c9e50d..596162c 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.h
+++ b/kmail/editorsendcheckplugins/checkbeforesend/configurewidget/checkbeforesendconfigurewidget.h
@@ -28,7 +28,7 @@ class CheckBeforeSendConfigureWidget : public MessageComposer::PluginEditorCheck
{
Q_OBJECT
public:
- explicit CheckBeforeSendConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent = Q_NULLPTR);
+ explicit CheckBeforeSendConfigureWidget(QWidget *parent = Q_NULLPTR);
~CheckBeforeSendConfigureWidget();
void loadSettings() Q_DECL_OVERRIDE;
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp
index d83fb15..0f76c88 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguredialog.cpp
@@ -37,7 +37,7 @@ ConfirmAddressConfigureDialog::~ConfirmAddressConfigureDialog()
QWidget *ConfirmAddressConfigureDialog::createLayout()
{
- mConfigureWidget = new ConfirmAddressConfigureWidget(KIdentityManagement::IdentityManager::self(), this);
+ mConfigureWidget = new ConfirmAddressConfigureWidget(this);
return mConfigureWidget;
}
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.cpp
index 2e69df9..d52720c 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.cpp
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.cpp
@@ -24,7 +24,7 @@
#include <KIdentityManagement/IdentityManager>
#include <KIdentityManagement/Identity>
-ConfirmAddressConfigureTab::ConfirmAddressConfigureTab(KIdentityManagement::IdentityManager *identityManagement, QWidget *parent)
+ConfirmAddressConfigureTab::ConfirmAddressConfigureTab(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
@@ -35,7 +35,7 @@ ConfirmAddressConfigureTab::ConfirmAddressConfigureTab(KIdentityManagement::Iden
mTabWidget->setObjectName(QStringLiteral("tabwidget"));
mainLayout->addWidget(mTabWidget);
- initTab(identityManagement);
+ initTab(KIdentityManagement::IdentityManager::self());
}
ConfirmAddressConfigureTab::~ConfirmAddressConfigureTab()
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.h b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.h
index a4d1581..0b7d6b2 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.h
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretab.h
@@ -33,7 +33,7 @@ class ConfirmAddressConfigureTab : public QWidget
{
Q_OBJECT
public:
- explicit ConfirmAddressConfigureTab(KIdentityManagement::IdentityManager *identityManagement, QWidget *parent = Q_NULLPTR);
+ explicit ConfirmAddressConfigureTab(QWidget *parent = Q_NULLPTR);
~ConfirmAddressConfigureTab();
void loadSettings(const KConfigGroup &grp);
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp
index 08f8a87..a6d45c1 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp
@@ -26,8 +26,8 @@
#include <KSharedConfig>
#include <QRegularExpression>
-ConfirmAddressConfigureWidget::ConfirmAddressConfigureWidget(KIdentityManagement::IdentityManager *im, QWidget *parent)
- : MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(im, parent)
+ConfirmAddressConfigureWidget::ConfirmAddressConfigureWidget(QWidget *parent)
+ : MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(parent)
{
QVBoxLayout *vboxlayout = new QVBoxLayout(this);
vboxlayout->setMargin(0);
@@ -37,7 +37,7 @@ ConfirmAddressConfigureWidget::ConfirmAddressConfigureWidget(KIdentityManagement
vboxlayout->addWidget(mEnable);
connect(mEnable, &QCheckBox::clicked, this, &ConfirmAddressConfigureWidget::slotEnableChanged);
- mConfirmAddressConfigureTab = new ConfirmAddressConfigureTab(identityManager(), this);
+ mConfirmAddressConfigureTab = new ConfirmAddressConfigureTab(this);
mConfirmAddressConfigureTab->setObjectName(QStringLiteral("confirmaddresstab"));
connect(mConfirmAddressConfigureTab, &ConfirmAddressConfigureTab::configureChanged, this, &ConfirmAddressConfigureWidget::configureChanged);
vboxlayout->addWidget(mConfirmAddressConfigureTab);
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h
index 6e76210..3df521a 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h
@@ -28,7 +28,7 @@ class ConfirmAddressConfigureWidget : public MessageComposer::PluginEditorCheckB
{
Q_OBJECT
public:
- explicit ConfirmAddressConfigureWidget(KIdentityManagement::IdentityManager *im, QWidget *parent = Q_NULLPTR);
+ explicit ConfirmAddressConfigureWidget(QWidget *parent = Q_NULLPTR);
~ConfirmAddressConfigureWidget();
void loadSettings() Q_DECL_OVERRIDE;