From e06e1dad4a4570e5c1181d05ab6ed7a5d74c6c91 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 3 May 2016 20:24:09 +0200 Subject: A save-as-draft action & action results This patch introduces tracking of actions, so they can be tested. It also provides a save-as-draft action, that looks for the draft folder, and stores the mail accordingly. --- framework/domain/composercontroller.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'framework/domain/composercontroller.cpp') diff --git a/framework/domain/composercontroller.cpp b/framework/domain/composercontroller.cpp index bca90d33..0cf61442 100644 --- a/framework/domain/composercontroller.cpp +++ b/framework/domain/composercontroller.cpp @@ -185,9 +185,12 @@ void ComposerController::send() void ComposerController::saveAsDraft() { auto mail = assembleMessage(); + auto currentAccountId = identityModel()->index(m_currentAccountIndex, 0).data(IdentitiesModel::AccountId).toByteArray(); + Kube::Context context; context.setProperty("message", QVariant::fromValue(mail)); - Kube::Action("org.kde.kube.actions.saveasdraft", context).execute(); + context.setProperty("accountId", QVariant::fromValue(currentAccountId)); + Kube::Action("org.kde.kube.actions.save-as-draft", context).execute(); clear(); } -- cgit v1.2.3