akonadi/kmime
20 #include "movecommand_p.h"
23 #include <akonadi/itemmovejob.h>
24 #include <akonadi/itemdeletejob.h>
26 MoveCommand::MoveCommand(
const Akonadi::Collection& destFolder,
27 const QList<Akonadi::Item> &msgList,
29 ) : CommandBase( parent )
31 mDestFolder = destFolder;
35 void MoveCommand::execute()
37 if ( mMessages.isEmpty() ) {
41 if ( mDestFolder.isValid() ) {
42 Akonadi::ItemMoveJob *job =
new Akonadi::ItemMoveJob( mMessages, mDestFolder,
this );
43 connect( job, SIGNAL(result(KJob*)),
this, SLOT(slotMoveResult(KJob*)) );
46 Akonadi::ItemDeleteJob *job =
new Akonadi::ItemDeleteJob( mMessages,
this );
47 connect( job, SIGNAL(result(KJob*)),
this, SLOT(slotMoveResult(KJob*)) );
51 void MoveCommand::slotMoveResult(KJob* job)
55 Util::showJobError(job);
62 #include "moc_movecommand_p.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:55 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.