akonadi/kmime
21 #include "movecommand_p.h"
24 #include <akonadi/itemmovejob.h>
25 #include <akonadi/itemdeletejob.h>
27 MoveCommand::MoveCommand(
const Akonadi::Collection& destFolder,
28 const QList<Akonadi::Item> &msgList,
30 ) : CommandBase( parent )
32 mDestFolder = destFolder;
36 void MoveCommand::execute()
38 if ( mMessages.isEmpty() ) {
42 if ( mDestFolder.isValid() ) {
43 Akonadi::ItemMoveJob *job =
new Akonadi::ItemMoveJob( mMessages, mDestFolder,
this );
44 connect( job, SIGNAL(result(KJob*)),
this, SLOT(slotMoveResult(KJob*)) );
47 Akonadi::ItemDeleteJob *job =
new Akonadi::ItemDeleteJob( mMessages,
this );
48 connect( job, SIGNAL(result(KJob*)),
this, SLOT(slotMoveResult(KJob*)) );
52 void MoveCommand::slotMoveResult(KJob* job)
56 Util::showJobError(job);
63 #include "moc_movecommand_p.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:54 by
doxygen 1.8.5 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.