Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 083dbf09 authored by Laurent Montel's avatar Laurent Montel 😁

improve++

parent 74302daa
......@@ -17,11 +17,13 @@
#include "attachmentvcardfromaddressbookjob.h"
#include <KLocalizedString>
using namespace MessageComposer;
AttachmentVcardFromAddressBookJob::AttachmentVcardFromAddressBookJob(QObject *parent)
: MessageCore::AttachmentLoadJob(parent)
AttachmentVcardFromAddressBookJob::AttachmentVcardFromAddressBookJob(Akonadi::Item::Id id, QObject *parent)
: MessageCore::AttachmentLoadJob(parent),
mId(id)
{
}
......@@ -31,3 +33,16 @@ AttachmentVcardFromAddressBookJob::~AttachmentVcardFromAddressBookJob()
}
void AttachmentVcardFromAddressBookJob::doStart()
{
Akonadi::Item item(id);
if (item.isValid()) {
} else {
//TODO define error message
q->setError( KJob::UserDefinedError );
//q->setErrorText( msg );
q->emitResult();
}
}
......@@ -19,14 +19,21 @@
#define ATTACHMENTVCARDFROMADDRESSBOOKJOB_H
#include "messagecore/attachment/attachmentloadjob.h"
#include <Akonadi/Item>
namespace MessageComposer {
class AttachmentVcardFromAddressBookJob : public MessageCore::AttachmentLoadJob
{
Q_OBJECT
public:
explicit AttachmentVcardFromAddressBookJob(QObject *parent = 0);
explicit AttachmentVcardFromAddressBookJob(Akonadi::Item::Id id, QObject *parent = 0);
~AttachmentVcardFromAddressBookJob();
protected slots:
virtual void doStart();
private:
Akonadi::Item::Id mId;
};
}
#endif // ATTACHMENTVCARDFROMADDRESSBOOKJOB_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