Merge remote-tracking branch 'origin/Applications/19.08'

wilder
Laurent Montel 7 years ago
commit 6fe0ea75a5
  1. 4
      src/kmcommands.cpp
  2. 2
      src/kmcommands.h
  3. 6
      src/kmmainwidget.cpp
  4. 2
      src/searchdialog/searchwindow.cpp

@ -1765,9 +1765,9 @@ KMSaveAttachmentsCommand::KMSaveAttachmentsCommand(QWidget *parent, const Akonad
fetchScope().fetchFullPayload(true);
}
KMSaveAttachmentsCommand::KMSaveAttachmentsCommand(QWidget *parent, const Akonadi::Item::List &msgs)
KMSaveAttachmentsCommand::KMSaveAttachmentsCommand(QWidget *parent, const Akonadi::Item::List &msgs, MessageViewer::Viewer *viewer)
: KMCommand(parent, msgs)
, mViewer(nullptr)
, mViewer(viewer)
{
fetchScope().fetchFullPayload(true);
}

@ -309,7 +309,7 @@ public:
@param parent The parent widget of the command used for message boxes.
@param msgs The messages of which the attachments should be saved.
*/
KMSaveAttachmentsCommand(QWidget *parent, const Akonadi::Item::List &msgs);
KMSaveAttachmentsCommand(QWidget *parent, const Akonadi::Item::List &msgs, MessageViewer::Viewer *viewer);
private:
Result execute() override;

@ -2349,7 +2349,7 @@ void KMMainWidget::slotSaveAttachments()
dummyItem.setPayload<KMime::Message::Ptr>(mMsgView->message().payload<KMime::Message::Ptr>());
saveCommand = new KMSaveAttachmentsCommand(this, dummyItem, mMsgView->viewer());
} else {
saveCommand = new KMSaveAttachmentsCommand(this, selectedMessages);
saveCommand = new KMSaveAttachmentsCommand(this, selectedMessages, mMsgView->viewer());
}
saveCommand->start();
@ -3851,9 +3851,7 @@ void KMMainWidget::updateMessageActionsDelayed()
} else if (single_actions) {
actionList << mMsgActions->editAsNewAction();
}
if (single_actions) {
actionList << mSaveAttachmentsAction;
}
actionList << mSaveAttachmentsAction;
if (mCurrentCollection.isValid() && FolderArchive::FolderArchiveUtil::resourceSupportArchiving(mCurrentCollection.resource())) {
actionList << mArchiveAction;
}

@ -838,7 +838,7 @@ void SearchWindow::slotSaveMsg()
void SearchWindow::slotSaveAttachments()
{
KMSaveAttachmentsCommand *saveCommand = new KMSaveAttachmentsCommand(this, selectedMessages());
KMSaveAttachmentsCommand *saveCommand = new KMSaveAttachmentsCommand(this, selectedMessages(), nullptr);
saveCommand->start();
}

Loading…
Cancel
Save