Commit 43f98283 authored by Laurent Montel's avatar Laurent Montel 😁

Continue to fix 424184

CCBUG: 424184
parent e5fd88a2
Pipeline #34466 passed with stage
in 89 minutes and 24 seconds
......@@ -438,11 +438,24 @@ void KMReaderMainWin::initializeAkonadiStandardAction()
};
for (Akonadi::StandardMailActionManager::Type mailAction : mailActions) {
mAkonadiStandardActionManager->createAction(mailAction);
QAction *act = mAkonadiStandardActionManager->createAction(mailAction);
mAkonadiStandardActionManager->interceptAction(mailAction);
connect(act, &QAction::triggered, this, &KMReaderMainWin::slotMarkMailAs);
}
}
void KMReaderMainWin::slotMarkMailAs()
{
const QAction *action = qobject_cast<QAction *>(sender());
Q_ASSERT(action);
const QByteArray typeStr = action->data().toByteArray();
mAkonadiStandardActionManager->markItemsAs(typeStr, {mMsgActions->currentItem()}, false);
}
void KMReaderMainWin::setupAccel()
{
if (!kmkernel->xmlGuiInstanceName().isEmpty()) {
......
......@@ -106,6 +106,7 @@ private:
void updateButtons();
void slotToggleMenubar(bool dontShowWarning);
void initializeAkonadiStandardAction();
void slotMarkMailAs();
QVector<KMime::Message::Ptr> mListMessage;
int mCurrentMessageIndex = 0;
......
......@@ -775,6 +775,11 @@ void MessageActions::slotExportToPdf()
}
}
Akonadi::Item MessageActions::currentItem() const
{
return mCurrentItem;
}
QAction *MessageActions::exportToPdfAction() const
{
return mExportToPdfAction;
......
......@@ -92,6 +92,8 @@ public:
void setExportToPdfAction(QAction *exportToPdfAction);
void fillAkonadiStandardAction(Akonadi::StandardMailActionManager *akonadiStandardActionManager);
Q_REQUIRED_RESULT Akonadi::Item currentItem() const;
Q_SIGNALS:
// This signal is emitted when a reply is triggered and the
// action has finished.
......
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