diff options
Diffstat (limited to 'framework/domain/mailcontroller.cpp')
-rw-r--r-- | framework/domain/mailcontroller.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/framework/domain/mailcontroller.cpp b/framework/domain/mailcontroller.cpp index 0163d41e..a65c2692 100644 --- a/framework/domain/mailcontroller.cpp +++ b/framework/domain/mailcontroller.cpp | |||
@@ -28,18 +28,12 @@ using namespace Sink::ApplicationDomain; | |||
28 | 28 | ||
29 | MailController::MailController() | 29 | MailController::MailController() |
30 | : Kube::Controller(), | 30 | : Kube::Controller(), |
31 | action_markAsRead{new Kube::ControllerAction}, | 31 | action_markAsRead{new Kube::ControllerAction{this, &MailController::markAsRead}}, |
32 | action_markAsImportant{new Kube::ControllerAction}, | 32 | action_markAsImportant{new Kube::ControllerAction{this, &MailController::markAsImportant}}, |
33 | action_moveToTrash{new Kube::ControllerAction}, | 33 | action_moveToTrash{new Kube::ControllerAction{this, &MailController::moveToTrash}}, |
34 | action_restoreFromTrash{new Kube::ControllerAction}, | 34 | action_restoreFromTrash{new Kube::ControllerAction{this, &MailController::restoreFromTrash}}, |
35 | action_remove{new Kube::ControllerAction} | 35 | action_remove{new Kube::ControllerAction{this, &MailController::remove}} |
36 | { | 36 | { |
37 | QObject::connect(markAsReadAction(), &Kube::ControllerAction::triggered, this, &MailController::markAsRead); | ||
38 | QObject::connect(markAsImportantAction(), &Kube::ControllerAction::triggered, this, &MailController::markAsImportant); | ||
39 | QObject::connect(moveToTrashAction(), &Kube::ControllerAction::triggered, this, &MailController::moveToTrash); | ||
40 | QObject::connect(restoreFromTrashAction(), &Kube::ControllerAction::triggered, this, &MailController::restoreFromTrash); | ||
41 | QObject::connect(removeAction(), &Kube::ControllerAction::triggered, this, &MailController::remove); | ||
42 | |||
43 | QObject::connect(this, &MailController::mailChanged, &MailController::updateActions); | 37 | QObject::connect(this, &MailController::mailChanged, &MailController::updateActions); |
44 | updateActions(); | 38 | updateActions(); |
45 | } | 39 | } |