From 3c1ea4e7a775168cb1158095727e49e6f2e353de Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee <elv1313@gmail.com> Date: Sun, 20 Dec 2015 10:28:06 -0500 Subject: [PATCH] uam: Support "viewChatHistory" for Person with multiple numbers It was forgotten in the previous commits Change-Id: Id85e46b74f99e0fbe2672f1ec177b660cfdd9670 Tuleap: #190 --- src/actionextenderdefault.cpp | 5 +++++ src/actionextenderdefault.h | 1 + src/interfaces/actionextenderi.h | 1 + src/useractionmodel.cpp | 5 ++++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/actionextenderdefault.cpp b/src/actionextenderdefault.cpp index 470ff690..5e68a279 100644 --- a/src/actionextenderdefault.cpp +++ b/src/actionextenderdefault.cpp @@ -31,6 +31,11 @@ void ActionExtenderDefault::viewChatHistory(ContactMethod* cm) Q_UNUSED(cm) } +void ActionExtenderDefault::viewChatHistory(Person* p) +{ + Q_UNUSED(p) +} + void ActionExtenderDefault::copyInformation(QMimeData* data) { Q_UNUSED(data) diff --git a/src/actionextenderdefault.h b/src/actionextenderdefault.h index f687d982..6ddf55d3 100644 --- a/src/actionextenderdefault.h +++ b/src/actionextenderdefault.h @@ -37,6 +37,7 @@ public: virtual void editPerson(Person* p) override; virtual void viewChatHistory(ContactMethod* cm) override; + virtual void viewChatHistory(Person* p) override; virtual void copyInformation(QMimeData* data) override; virtual bool warnDeletePerson(Person* p) override; virtual bool warnDeleteCall(Call* c) override; diff --git a/src/interfaces/actionextenderi.h b/src/interfaces/actionextenderi.h index 83f53d7f..bf9bcde7 100644 --- a/src/interfaces/actionextenderi.h +++ b/src/interfaces/actionextenderi.h @@ -49,6 +49,7 @@ public: virtual void editPerson(Person* p) = 0; virtual void viewChatHistory(ContactMethod* cm) = 0; + virtual void viewChatHistory(Person* p) = 0; virtual void copyInformation(QMimeData* data) = 0; virtual bool warnDeletePerson(Person* p) = 0; virtual bool warnDeleteCall(Call* c) = 0; diff --git a/src/useractionmodel.cpp b/src/useractionmodel.cpp index 329ec1e3..e9496ea0 100644 --- a/src/useractionmodel.cpp +++ b/src/useractionmodel.cpp @@ -1080,7 +1080,10 @@ bool UserActionModel::execute(const UserActionModel::Action action) const UserActions::bookmark(cm); break; case UserActionModel::Action::VIEW_CHAT_HISTORY : - GlobalInstances::actionExtender().viewChatHistory(cm); + if (p) + GlobalInstances::actionExtender().viewChatHistory(p); + else + GlobalInstances::actionExtender().viewChatHistory(cm); break; case UserActionModel::Action::ADD_CONTACT_METHOD: UserActions::addToPerson(p); -- GitLab