Commit 2dfd3205 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Port KAbc -> KContacts

REVIEW: 121015
parent 8125cd53
......@@ -145,7 +145,7 @@ target_link_libraries(kalarm_bin
KF5::AlarmCalendar
KF5::CalendarCore
KF5::CalendarUtils
KF5::Abc
KF5::Contacts
KF5::Mime
KF5::IdentityManagement
KF5::MailTransport
......
......@@ -28,7 +28,7 @@
#include <AkonadiCore/entitydisplayattribute.h>
#include <AkonadiCore/itemfetchscope.h>
#include <AkonadiCore/session.h>
#include <kabc/addressee.h>
#include <kcontacts/addressee.h>
#include <kglobal.h>
#include <QLocale>
......@@ -65,7 +65,7 @@ BirthdayModel* BirthdayModel::instance()
recorder->fetchCollection(true);
recorder->setItemFetchScope(scope);
recorder->setCollectionMonitored(Akonadi::Collection::root());
recorder->setMimeTypeMonitored(KABC::Addressee::mimeType(), true);
recorder->setMimeTypeMonitored(KContacts::Addressee::mimeType(), true);
mInstance = new BirthdayModel(recorder);
}
......
......@@ -22,7 +22,7 @@
#include "lineedit.h"
#include <libkdepim/misc/maillistdrag.h>
#include <kabc/vcarddrag.h>
#include <kcontacts/vcarddrag.h>
#include <KCalUtils/kcalutils/icaldrag.h>
#include <kurl.h>
......@@ -108,7 +108,7 @@ void LineEdit::dragEnterEvent(QDragEnterEvent* e)
ok = (data->hasText()
|| KUrl::List::canDecode(data)
|| (mType != Url && KPIM::MailList::canDecode(data))
|| (mType == Emails && KABC::VCardDrag::canDecode(data)));
|| (mType == Emails && KContacts::VCardDrag::canDecode(data)));
if (ok)
e->accept(rect());
else
......@@ -121,7 +121,7 @@ void LineEdit::dropEvent(QDropEvent* e)
QString newText;
QStringList newEmails;
KUrl::List files;
KABC::Addressee::List addrList;
KContacts::Addressee::List addrList;
if (mType != Url
&& KPIM::MailList::canDecode(data))
......@@ -138,10 +138,10 @@ void LineEdit::dropEvent(QDropEvent* e)
}
// This must come before KUrl
else if (mType == Emails
&& KABC::VCardDrag::canDecode(data) && KABC::VCardDrag::fromMimeData(data, addrList))
&& KContacts::VCardDrag::canDecode(data) && KContacts::VCardDrag::fromMimeData(data, addrList))
{
// KAddressBook entries
for (KABC::Addressee::List::Iterator it = addrList.begin(); it != addrList.end(); ++it)
for (KContacts::Addressee::List::Iterator it = addrList.begin(); it != addrList.end(); ++it)
{
QString em((*it).fullEmail());
if (!em.isEmpty())
......
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