summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-10-02 21:50:54 +0200
committerMontel Laurent <[email protected]>2015-10-02 21:50:54 +0200
commit30ec9ac89ea52de3d629f2360dadeaa2c15b285c (patch)
treef3ffc68fb094e40ed52e0558013fc1b26516ae07
parent5fd640f128d7613a7fdf85bd3626233283687bcd (diff)
Move EmailAddressRequester to akonadicontact
-rw-r--r--CMakeLists.txt2
-rw-r--r--calendarsupport/CMakeLists.txt2
-rw-r--r--composereditor-ng/CMakeLists.txt2
-rw-r--r--eventviews/CMakeLists.txt2
-rw-r--r--incidenceeditor-ng/CMakeLists.txt2
-rw-r--r--kaddressbookgrantlee/CMakeLists.txt2
-rw-r--r--kdgantt2/CMakeLists.txt2
-rw-r--r--libfollowupreminder/CMakeLists.txt2
-rw-r--r--libkdepim/CMakeLists.txt2
-rw-r--r--libkdepimdbusinterfaces/CMakeLists.txt2
-rw-r--r--libkleo/CMakeLists.txt2
-rw-r--r--libksieve/CMakeLists.txt2
-rw-r--r--libsendlater/CMakeLists.txt2
-rw-r--r--mailcommon/CMakeLists.txt2
-rw-r--r--mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp6
-rw-r--r--mailcommon/src/filter/filteractions/filteractionforward.cpp6
-rw-r--r--mailcommon/src/filter/filteractions/filteractionwithaddress.cpp12
-rw-r--r--mailimporter/CMakeLists.txt2
-rw-r--r--messagecomposer/CMakeLists.txt2
-rw-r--r--messagecore/CMakeLists.txt2
-rw-r--r--messagelist/CMakeLists.txt2
-rw-r--r--messageviewer/CMakeLists.txt2
-rw-r--r--noteshared/CMakeLists.txt2
-rw-r--r--pimcommon/CMakeLists.txt2
-rw-r--r--pimcommon/src/CMakeLists.txt2
-rw-r--r--pimcommon/src/widgets/emailaddressrequester.cpp121
-rw-r--r--pimcommon/src/widgets/emailaddressrequester.h93
-rw-r--r--templateparser/CMakeLists.txt2
-rw-r--r--templateparser/src/customtemplates.cpp8
-rw-r--r--templateparser/src/ui/customtemplates_base.ui8
30 files changed, 42 insertions, 258 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f063fa..afcc3f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,7 +91,7 @@ set(KDEPIM_VERSION_NUMBER "5.0.45")
set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KCONTACTS_LIB_VERSION "4.91.0")
set(KCALENDARCORE_LIB_VERSION "4.81.0")
set(IDENTITYMANAGEMENT_LIB_VERSION "4.80.0")
diff --git a/calendarsupport/CMakeLists.txt b/calendarsupport/CMakeLists.txt
index 8a503fd..f952a47 100644
--- a/calendarsupport/CMakeLists.txt
+++ b/calendarsupport/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/composereditor-ng/CMakeLists.txt b/composereditor-ng/CMakeLists.txt
index 816a6bc..5694103 100644
--- a/composereditor-ng/CMakeLists.txt
+++ b/composereditor-ng/CMakeLists.txt
@@ -23,7 +23,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/eventviews/CMakeLists.txt b/eventviews/CMakeLists.txt
index cbe12ba..4f99670 100644
--- a/eventviews/CMakeLists.txt
+++ b/eventviews/CMakeLists.txt
@@ -23,7 +23,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
set(CALENDARUTILS_LIB_VERSION "4.80.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KCALENDARCORE_LIB_VERSION "4.81.0")
diff --git a/incidenceeditor-ng/CMakeLists.txt b/incidenceeditor-ng/CMakeLists.txt
index af177c7..e0344d6 100644
--- a/incidenceeditor-ng/CMakeLists.txt
+++ b/incidenceeditor-ng/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/kaddressbookgrantlee/CMakeLists.txt b/kaddressbookgrantlee/CMakeLists.txt
index 23ba4d3..3e36f15 100644
--- a/kaddressbookgrantlee/CMakeLists.txt
+++ b/kaddressbookgrantlee/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KCONTACTS_LIB_VERSION "4.91.0")
diff --git a/kdgantt2/CMakeLists.txt b/kdgantt2/CMakeLists.txt
index ef76663..5c4af70 100644
--- a/kdgantt2/CMakeLists.txt
+++ b/kdgantt2/CMakeLists.txt
@@ -23,7 +23,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/libfollowupreminder/CMakeLists.txt b/libfollowupreminder/CMakeLists.txt
index c2cd7af..ac7140e 100644
--- a/libfollowupreminder/CMakeLists.txt
+++ b/libfollowupreminder/CMakeLists.txt
@@ -24,7 +24,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Gui)
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
diff --git a/libkdepim/CMakeLists.txt b/libkdepim/CMakeLists.txt
index 83f3277..d7911e2 100644
--- a/libkdepim/CMakeLists.txt
+++ b/libkdepim/CMakeLists.txt
@@ -21,7 +21,7 @@ include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/libkdepimdbusinterfaces/CMakeLists.txt b/libkdepimdbusinterfaces/CMakeLists.txt
index a3d3ecd..66d7db8 100644
--- a/libkdepimdbusinterfaces/CMakeLists.txt
+++ b/libkdepimdbusinterfaces/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/libkleo/CMakeLists.txt b/libkleo/CMakeLists.txt
index 4ff15b9..4896148 100644
--- a/libkleo/CMakeLists.txt
+++ b/libkleo/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(GPGMEPP_LIB_VERSION "4.80.0")
diff --git a/libksieve/CMakeLists.txt b/libksieve/CMakeLists.txt
index f47148c..977692e 100644
--- a/libksieve/CMakeLists.txt
+++ b/libksieve/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/libsendlater/CMakeLists.txt b/libsendlater/CMakeLists.txt
index fad2730..935f949 100644
--- a/libsendlater/CMakeLists.txt
+++ b/libsendlater/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
diff --git a/mailcommon/CMakeLists.txt b/mailcommon/CMakeLists.txt
index 11ec653..04c90ba61 100644
--- a/mailcommon/CMakeLists.txt
+++ b/mailcommon/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp b/mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp
index a324790..8bf0ab3 100644
--- a/mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp
+++ b/mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp
@@ -18,7 +18,7 @@
#include "../filteractions/filteractionwithaddress.h"
#include <qtest.h>
#include <QWidget>
-#include <pimcommon/emailaddressrequester.h>
+#include <Akonadi/Contact/EmailAddressRequester>
class TestFilterActionWithAddress : public MailCommon::FilterActionWithAddress
{
@@ -56,7 +56,7 @@ void FilterActionWithAddressTest::shouldHaveDefaultValue()
TestFilterActionWithAddress filter;
QWidget *w = filter.createParamWidget(0);
QCOMPARE(w->objectName(), QStringLiteral("emailaddressrequester"));
- PimCommon::EmailAddressRequester *requester = dynamic_cast<PimCommon::EmailAddressRequester *>(w);
+ Akonadi::EmailAddressRequester *requester = dynamic_cast<Akonadi::EmailAddressRequester *>(w);
QVERIFY(requester);
QVERIFY(filter.isEmpty());
}
@@ -65,7 +65,7 @@ void FilterActionWithAddressTest::shouldAssignValue()
{
TestFilterActionWithAddress filter;
QWidget *w = filter.createParamWidget(0);
- PimCommon::EmailAddressRequester *requester = dynamic_cast<PimCommon::EmailAddressRequester *>(w);
+ Akonadi::EmailAddressRequester *requester = dynamic_cast<Akonadi::EmailAddressRequester *>(w);
filter.argsFromString(QStringLiteral("foo"));
filter.setParamWidgetValue(w);
QVERIFY(!filter.isEmpty());
diff --git a/mailcommon/src/filter/filteractions/filteractionforward.cpp b/mailcommon/src/filter/filteractions/filteractionforward.cpp
index 6aead8b..36d1654 100644
--- a/mailcommon/src/filter/filteractions/filteractionforward.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionforward.cpp
@@ -27,7 +27,7 @@
#include <PimCommon/MinimumComboBox>
#include <MessageComposer/MessageFactory>
#include <MessageComposer/MessageSender>
-#include <PimCommon/EmailAddressRequester>
+#include <Akonadi/Contact/EmailAddressRequester>
#include <MessageCore/StringUtil>
#include <TemplateParser/CustomTemplates>
#include <customtemplates_kfg.h>
@@ -97,7 +97,7 @@ QWidget *FilterActionForward::createParamWidget(QWidget *parent) const
addressEdit->setObjectName(QStringLiteral("addressEdit"));
layout->addWidget(addressEdit);
- PimCommon::EmailAddressRequester *addressRequester = qobject_cast<PimCommon::EmailAddressRequester *>(addressEdit);
+ Akonadi::EmailAddressRequester *addressRequester = qobject_cast<Akonadi::EmailAddressRequester *>(addressEdit);
Q_ASSERT(addressRequester);
KLineEdit *lineEdit = addressRequester->lineEdit();
lineEdit->setClearButtonEnabled(true);
@@ -125,7 +125,7 @@ QWidget *FilterActionForward::createParamWidget(QWidget *parent) const
templateCombo->setWhatsThis(i18n("Set the forwarding template that will be used with this filter."));
connect(templateCombo, static_cast<void (PimCommon::MinimumComboBox::*)(int)>(&PimCommon::MinimumComboBox::currentIndexChanged), this, &FilterActionForward::filterActionModified);
- connect(addressRequester, &PimCommon::EmailAddressRequester::textChanged, this, &FilterActionForward::filterActionModified);
+ connect(addressRequester, &Akonadi::EmailAddressRequester::textChanged, this, &FilterActionForward::filterActionModified);
return addressAndTemplate;
}
diff --git a/mailcommon/src/filter/filteractions/filteractionwithaddress.cpp b/mailcommon/src/filter/filteractions/filteractionwithaddress.cpp
index da3098d..6edc1e1 100644
--- a/mailcommon/src/filter/filteractions/filteractionwithaddress.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionwithaddress.cpp
@@ -19,7 +19,7 @@
#include "filteractionwithaddress.h"
-#include <PimCommon/EmailAddressRequester>
+#include <Akonadi/Contact/EmailAddressRequester>
using namespace MailCommon;
@@ -30,28 +30,28 @@ FilterActionWithAddress::FilterActionWithAddress(const QString &name, const QStr
QWidget *FilterActionWithAddress::createParamWidget(QWidget *parent) const
{
- PimCommon::EmailAddressRequester *requester = new PimCommon::EmailAddressRequester(parent);
+ Akonadi::EmailAddressRequester *requester = new Akonadi::EmailAddressRequester(parent);
requester->setText(mParameter);
requester->setObjectName(QStringLiteral("emailaddressrequester"));
requester->setText(mParameter);
- connect(requester, &PimCommon::EmailAddressRequester::textChanged, this, &FilterActionWithAddress::filterActionModified);
+ connect(requester, &Akonadi::EmailAddressRequester::textChanged, this, &FilterActionWithAddress::filterActionModified);
return requester;
}
void FilterActionWithAddress::applyParamWidgetValue(QWidget *paramWidget)
{
- mParameter = qobject_cast<PimCommon::EmailAddressRequester *>(paramWidget)->text();
+ mParameter = qobject_cast<Akonadi::EmailAddressRequester *>(paramWidget)->text();
}
void FilterActionWithAddress::setParamWidgetValue(QWidget *paramWidget) const
{
- qobject_cast<PimCommon::EmailAddressRequester *>(paramWidget)->setText(mParameter);
+ qobject_cast<Akonadi::EmailAddressRequester *>(paramWidget)->setText(mParameter);
}
void FilterActionWithAddress::clearParamWidget(QWidget *paramWidget) const
{
- qobject_cast<PimCommon::EmailAddressRequester *>(paramWidget)->clear();
+ qobject_cast<Akonadi::EmailAddressRequester *>(paramWidget)->clear();
}
diff --git a/mailimporter/CMakeLists.txt b/mailimporter/CMakeLists.txt
index 7b26caa..001ec20 100644
--- a/mailimporter/CMakeLists.txt
+++ b/mailimporter/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/messagecomposer/CMakeLists.txt b/messagecomposer/CMakeLists.txt
index 83185cb..d004f13 100644
--- a/messagecomposer/CMakeLists.txt
+++ b/messagecomposer/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/messagecore/CMakeLists.txt b/messagecore/CMakeLists.txt
index 2a09ca5..74e92b2 100644
--- a/messagecore/CMakeLists.txt
+++ b/messagecore/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/messagelist/CMakeLists.txt b/messagelist/CMakeLists.txt
index 5f3826f..1544ba9 100644
--- a/messagelist/CMakeLists.txt
+++ b/messagelist/CMakeLists.txt
@@ -23,7 +23,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/messageviewer/CMakeLists.txt b/messageviewer/CMakeLists.txt
index 0c6bdaa..2d76b43 100644
--- a/messageviewer/CMakeLists.txt
+++ b/messageviewer/CMakeLists.txt
@@ -22,7 +22,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/noteshared/CMakeLists.txt b/noteshared/CMakeLists.txt
index c1aa0e0..72107e0 100644
--- a/noteshared/CMakeLists.txt
+++ b/noteshared/CMakeLists.txt
@@ -24,7 +24,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/pimcommon/CMakeLists.txt b/pimcommon/CMakeLists.txt
index 6d1d98c..cfd1f9f 100644
--- a/pimcommon/CMakeLists.txt
+++ b/pimcommon/CMakeLists.txt
@@ -23,7 +23,7 @@ include(ECMAddTests)
include(ECMInstallIcons)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/pimcommon/src/CMakeLists.txt b/pimcommon/src/CMakeLists.txt
index 2a7cd85..9a960ed 100644
--- a/pimcommon/src/CMakeLists.txt
+++ b/pimcommon/src/CMakeLists.txt
@@ -150,7 +150,6 @@ set(libpimcommon_widgets_SRCS
widgets/customtreeview.cpp
widgets/configureimmutablewidgetutils.cpp
widgets/slidecontainer.cpp
- widgets/emailaddressrequester.cpp
widgets/annotationdialog.cpp
widgets/manageaccountwidget.cpp
widgets/kactionmenuchangecase.cpp
@@ -628,7 +627,6 @@ ecm_generate_headers(PimCommon_widgets_HEADERS
SlideContainer
ConfigureImmutableWidgetUtils
LineEditWithCompleter
- EmailAddressRequester
RenameFileDialog
SimpleStringlistEditor
ManageAccountWidget
diff --git a/pimcommon/src/widgets/emailaddressrequester.cpp b/pimcommon/src/widgets/emailaddressrequester.cpp
deleted file mode 100644
index 323184e..0000000
--- a/pimcommon/src/widgets/emailaddressrequester.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- Copyright (c) 2001 Marc Mutz <[email protected]>
-
- 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; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "emailaddressrequester.h"
-
-#include <Akonadi/Contact/EmailAddressSelectionDialog>
-#include <kiconloader.h>
-#include <klineedit.h>
-#include <KLocalizedString>
-#include <QIcon>
-
-#include <QHBoxLayout>
-#include <QPushButton>
-#include <QTreeView>
-
-using namespace PimCommon;
-
-class Q_DECL_HIDDEN PimCommon::EmailAddressRequester::Private
-{
-public:
- Private(EmailAddressRequester *qq)
- : q(qq), mLineEdit(Q_NULLPTR)
- {
- }
-
- void slotAddressBook();
-
- EmailAddressRequester *q;
- KLineEdit *mLineEdit;
-};
-
-void EmailAddressRequester::Private::slotAddressBook()
-{
- Akonadi::EmailAddressSelectionDialog dlg(q);
- dlg.view()->view()->setSelectionMode(QAbstractItemView::MultiSelection);
- if (!dlg.exec()) {
- return;
- }
-
- QStringList addressList;
- foreach (const Akonadi::EmailAddressSelection &selection, dlg.selectedAddresses()) {
- addressList << selection.quotedEmail();
- }
-
- QString text = mLineEdit->text().trimmed();
-
- if (!text.isEmpty()) {
- if (!text.endsWith(QLatin1Char(','))) {
- text += QLatin1String(", ");
- } else {
- text += QLatin1Char(' ');
- }
- }
-
- mLineEdit->setText(text + addressList.join(QStringLiteral(",")));
-}
-
-EmailAddressRequester::EmailAddressRequester(QWidget *parent)
- : QWidget(parent),
- d(new Private(this))
-{
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setSpacing(4);
- layout->setMargin(0);
-
- d->mLineEdit = new KLineEdit(this);
- d->mLineEdit->setClearButtonShown(true);
- d->mLineEdit->setTrapReturnKey(true);
- layout->addWidget(d->mLineEdit, 1);
-
- QPushButton *button = new QPushButton(this);
- button->setIcon(QIcon::fromTheme(QStringLiteral("help-contents")));
- button->setIconSize(QSize(KIconLoader::SizeSmall, KIconLoader::SizeSmall));
- button->setFixedHeight(d->mLineEdit->sizeHint().height());
- button->setToolTip(i18n("Open Address Book"));
- layout->addWidget(button);
-
- connect(button, SIGNAL(clicked()), this, SLOT(slotAddressBook()));
- connect(d->mLineEdit, &KLineEdit::textChanged, this, &EmailAddressRequester::textChanged);
-}
-
-EmailAddressRequester::~EmailAddressRequester()
-{
- delete d;
-}
-
-void EmailAddressRequester::clear()
-{
- d->mLineEdit->clear();
-}
-
-void EmailAddressRequester::setText(const QString &text)
-{
- d->mLineEdit->setText(text);
-}
-
-QString EmailAddressRequester::text() const
-{
- return d->mLineEdit->text();
-}
-
-KLineEdit *EmailAddressRequester::lineEdit() const
-{
- return d->mLineEdit;
-}
-#include "moc_emailaddressrequester.cpp"
diff --git a/pimcommon/src/widgets/emailaddressrequester.h b/pimcommon/src/widgets/emailaddressrequester.h
deleted file mode 100644
index bc4e715..0000000
--- a/pimcommon/src/widgets/emailaddressrequester.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- Copyright (c) 2001 Marc Mutz <[email protected]>
-
- 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; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#ifndef MESSAGECORE_EMAILADDRESSREQUESTER_H
-#define MESSAGECORE_EMAILADDRESSREQUESTER_H
-
-#include "pimcommon_export.h"
-
-#include <QWidget>
-
-class KLineEdit;
-
-namespace PimCommon
-{
-
-/**
- * @short A widget to input one or more email addresses.
- *
- * @author Marc Mutz <[email protected]>
- */
-class PIMCOMMON_EXPORT EmailAddressRequester : public QWidget
-{
- Q_OBJECT
-
- Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged USER true)
-
-public:
- /**
- * Creates a new email address requester.
- *
- * @param parent The parent widget.
- */
- explicit EmailAddressRequester(QWidget *parent = Q_NULLPTR);
-
- /**
- * Destroys the email address requester.
- */
- ~EmailAddressRequester();
-
- /**
- * Clears the text of the email address requester.
- */
- void clear();
-
- /**
- * Sets the @p text of the email address requester.
- */
- void setText(const QString &text);
-
- /**
- * Returns the text of the email address requester.
- */
- QString text() const;
-
- /**
- * Returns the line edit that is used by the email address requester.
- */
- KLineEdit *lineEdit() const;
-
-Q_SIGNALS:
- /**
- * This signal is emitted whenever the text of the email address requester
- * has been changed.
- */
- void textChanged();
-
-private:
- //@cond PRIVATE
- class Private;
- Private *const d;
-
- Q_PRIVATE_SLOT(d, void slotAddressBook())
- //@endcond
-};
-
-}
-
-#endif
diff --git a/templateparser/CMakeLists.txt b/templateparser/CMakeLists.txt
index 724dd86..c6e0268 100644
--- a/templateparser/CMakeLists.txt
+++ b/templateparser/CMakeLists.txt
@@ -23,7 +23,7 @@ include(ECMAddTests)
set(KF5_VERSION "5.14.0")
-set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIMLIBS_LIB_VERSION "5.0.44")
set(KDEPIM_LIB_VERSION "5.43.0")
set(QT_REQUIRED_VERSION "5.4.0")
set(KMIME_LIB_VERSION "4.87.0")
diff --git a/templateparser/src/customtemplates.cpp b/templateparser/src/customtemplates.cpp
index 1faa2f1..6535ed0 100644
--- a/templateparser/src/customtemplates.cpp
+++ b/templateparser/src/customtemplates.cpp
@@ -54,8 +54,8 @@ CustomTemplates::CustomTemplates(const QList<KActionCollection *> &actionCollect
mUi->mName->setTrapReturnKey(true);
connect(mUi->mEdit->editor(), &QPlainTextEdit::textChanged,
this, &CustomTemplates::slotTextChanged);
- connect(mUi->mToEdit, &PimCommon::EmailAddressRequester::textChanged, this, &CustomTemplates::slotTextChanged);
- connect(mUi->mCCEdit, &PimCommon::EmailAddressRequester::textChanged, this, &CustomTemplates::slotTextChanged);
+ connect(mUi->mToEdit, &Akonadi::EmailAddressRequester::textChanged, this, &CustomTemplates::slotTextChanged);
+ connect(mUi->mCCEdit, &Akonadi::EmailAddressRequester::textChanged, this, &CustomTemplates::slotTextChanged);
connect(mUi->mName, &KLineEdit::textChanged, this, &CustomTemplates::slotNameChanged);
@@ -117,8 +117,8 @@ CustomTemplates::~CustomTemplates()
{
disconnect(mUi->mEdit->editor(), &QPlainTextEdit::textChanged,
this, &CustomTemplates::slotTextChanged);
- disconnect(mUi->mToEdit, &PimCommon::EmailAddressRequester::textChanged, this, &CustomTemplates::slotTextChanged);
- disconnect(mUi->mCCEdit, &PimCommon::EmailAddressRequester::textChanged, this, &CustomTemplates::slotTextChanged);
+ disconnect(mUi->mToEdit, &Akonadi::EmailAddressRequester::textChanged, this, &CustomTemplates::slotTextChanged);
+ disconnect(mUi->mCCEdit, &Akonadi::EmailAddressRequester::textChanged, this, &CustomTemplates::slotTextChanged);
delete mUi;
mUi = Q_NULLPTR;
}
diff --git a/templateparser/src/ui/customtemplates_base.ui b/templateparser/src/ui/customtemplates_base.ui
index cc7153f..84c4035 100644
--- a/templateparser/src/ui/customtemplates_base.ui
+++ b/templateparser/src/ui/customtemplates_base.ui
@@ -169,7 +169,7 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="PimCommon::EmailAddressRequester" name="mToEdit" native="true">
+ <widget class="Akonadi::EmailAddressRequester" name="mToEdit" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
@@ -185,7 +185,7 @@
</widget>
</item>
<item>
- <widget class="PimCommon::EmailAddressRequester" name="mCCEdit" native="true">
+ <widget class="Akonadi::EmailAddressRequester" name="mCCEdit" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
@@ -327,9 +327,9 @@
<header>templatesinsertcommand.h</header>
</customwidget>
<customwidget>
- <class>PimCommon::EmailAddressRequester</class>
+ <class>Akonadi::EmailAddressRequester</class>
<extends>QWidget</extends>
- <header>PimCommon/EmailAddressRequester</header>
+ <header>Akonadi/Contact/EmailAddressRequester</header>
<container>1</container>
</customwidget>
</customwidgets>