[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:14:20 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=b444c4c
The following commit has been merged in the master branch:
commit b444c4c93480c96b0d44cee1887859ff715f0731
Author: Martin Klapetek <mklapetek at kde.org>
Date: Fri Jan 3 18:46:34 2014 +0100
Fix context menu in kpeople mode
Reviewed-by: David Edmundson
---
context-menu.cpp | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/context-menu.cpp b/context-menu.cpp
index 998522f..00795d7 100644
--- a/context-menu.cpp
+++ b/context-menu.cpp
@@ -46,6 +46,7 @@
#include <kpeople/widgets/persondetailsdialog.h>
#include <kpeople/global.h>
#include <kpeople/personsmodel.h>
+#include <kpeople/persondata.h>
#endif
#include "dialogs/remove-contact-dialog.h"
@@ -103,10 +104,12 @@ KMenu* ContextMenu::contactContextMenu(const QModelIndex &index)
if (KTp::kpeopleEnabled()) {
#ifdef HAVE_KPEOPLE
- menu->addActions(
- KPeople::actionsForPerson(index.data(KPeople::PersonsModel::PersonVCardRole).value<KABC::Addressee>(),
- index.data(KPeople::PersonsModel::ContactsVCardRole).value<KABC::AddresseeList>(),
- menu));
+ if (index.parent().isValid()) {
+ menu->addActions(KPeople::actionsForPerson(index.data(KTp::ContactVCardRole).value<KABC::Addressee>(), KABC::AddresseeList(), menu));
+ } else {
+ KPeople::PersonData p(index.data(KTp::PersonIdRole).toString());
+ menu->addActions(KPeople::actionsForPerson(p.person(), p.contacts(), menu));
+ }
#endif
} else {
//must be a QAction because menu->addAction returns QAction, breaks compilation otherwise
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list