summaryrefslogtreecommitdiffstats
path: root/framework/domain/composercontroller.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-03 20:24:09 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-03 20:24:26 +0200
commite06e1dad4a4570e5c1181d05ab6ed7a5d74c6c91 (patch)
treeef606d36ee693eff087292a1950fe122a7376f19 /framework/domain/composercontroller.cpp
parent21f7851f044cd8b6e38c821ce12d7e1b291cae27 (diff)
downloadkube-e06e1dad4a4570e5c1181d05ab6ed7a5d74c6c91.tar.gz
kube-e06e1dad4a4570e5c1181d05ab6ed7a5d74c6c91.zip
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.
Diffstat (limited to 'framework/domain/composercontroller.cpp')
-rw-r--r--framework/domain/composercontroller.cpp5
1 files changed, 4 insertions, 1 deletions
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()
185void ComposerController::saveAsDraft() 185void ComposerController::saveAsDraft()
186{ 186{
187 auto mail = assembleMessage(); 187 auto mail = assembleMessage();
188 auto currentAccountId = identityModel()->index(m_currentAccountIndex, 0).data(IdentitiesModel::AccountId).toByteArray();
189
188 Kube::Context context; 190 Kube::Context context;
189 context.setProperty("message", QVariant::fromValue(mail)); 191 context.setProperty("message", QVariant::fromValue(mail));
190 Kube::Action("org.kde.kube.actions.saveasdraft", context).execute(); 192 context.setProperty("accountId", QVariant::fromValue(currentAccountId));
193 Kube::Action("org.kde.kube.actions.save-as-draft", context).execute();
191 clear(); 194 clear();
192} 195}
193 196