Merge remote-tracking branch 'origin/KDE/4.14'

Conflicts:
	kmail/kmreadermainwin.cpp
wilder-work
Montel Laurent 11 years ago
commit da06eca70e
  1. 34
      kmreadermainwin.cpp
  2. 1
      kmreadermainwin.h

@ -388,31 +388,35 @@ void KMReaderMainWin::slotMoveItem(QAction *action)
{
if (action) {
const QModelIndex index = action->data().value<QModelIndex>();
const Akonadi::Collection collection = index.data(Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
const Akonadi::Collection collection = index.data( Akonadi::EntityTreeModel::CollectionRole ).value<Akonadi::Collection>();
copyOrMoveItem(collection, true);
}
}
if (mMsg.isValid()) {
Akonadi::ItemMoveJob *job = new Akonadi::ItemMoveJob(mMsg, collection, this);
connect(job, SIGNAL(result(KJob*)), this, SLOT(slotCopyMoveResult(KJob*)));
void KMReaderMainWin::copyOrMoveItem(const Akonadi::Collection &collection, bool move)
{
if ( mMsg.isValid() ) {
if (move) {
Akonadi::ItemMoveJob *job = new Akonadi::ItemMoveJob( mMsg, collection,this );
connect( job, SIGNAL(result(KJob*)), this, SLOT(slotCopyMoveResult(KJob*)) );
} else {
Akonadi::ItemCreateJob *job = new Akonadi::ItemCreateJob(mMsg, collection, this);
connect(job, SIGNAL(result(KJob*)), this, SLOT(slotCopyMoveResult(KJob*)));
Akonadi::ItemCopyJob *job = new Akonadi::ItemCopyJob( mMsg, collection,this );
connect( job, SIGNAL(result(KJob*)), this, SLOT(slotCopyMoveResult(KJob*)) );
}
}
else
{
Akonadi::ItemCreateJob *job = new Akonadi::ItemCreateJob( mMsg, collection, this );
connect( job, SIGNAL(result(KJob*)), this, SLOT(slotCopyMoveResult(KJob*)) );
}
}
void KMReaderMainWin::slotCopyItem(QAction *action)
{
if (action) {
const QModelIndex index = action->data().value<QModelIndex>();
const Akonadi::Collection collection = index.data(Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
if (mMsg.isValid()) {
Akonadi::ItemCopyJob *job = new Akonadi::ItemCopyJob(mMsg, collection, this);
connect(job, &Akonadi::ItemCopyJob::result, this, &KMReaderMainWin::slotCopyMoveResult);
} else {
Akonadi::ItemCreateJob *job = new Akonadi::ItemCreateJob(mMsg, collection, this);
connect(job, &Akonadi::ItemCopyJob::result, this, &KMReaderMainWin::slotCopyMoveResult);
}
const Akonadi::Collection collection = index.data( Akonadi::EntityTreeModel::CollectionRole ).value<Akonadi::Collection>();
copyOrMoveItem(collection, false);
}
}

@ -81,6 +81,7 @@ private Q_SLOTS:
void slotMoveItem(QAction *action);
private:
void copyOrMoveItem(const Akonadi::Collection &collection, bool move);
Akonadi::Collection parentCollection() const;
void initKMReaderMainWin();
void setupAccel();

Loading…
Cancel
Save