Use new KPeople API to initiate conversations.

wilder-5.17
Eike Hein 11 years ago
parent b0c50b2fb3
commit e7c19aeec7
  1. 20
      recentcontactsmodel.cpp

@ -102,11 +102,25 @@ bool RecentContactsModel::trigger(int row, const QString &actionId, const QVaria
const QList<QAction *> actionList = KPeople::actionsForPerson(id, this);
foreach(const QAction *action, actionList) {
qDebug() << action << action->text();
if (!actionList.isEmpty()) {
QAction *chat = 0;
foreach (QAction *action, actionList) {
const QVariant &actionType = action->property("actionType");
if (!actionType.isNull() && actionType.toInt() == KPeople::ActionType::TextChatAction) {
chat = action;
}
}
if (chat) {
chat->trigger();
return true;
}
}
return true;
return false;
} else if (actionId == "forget") {
forget(row);

Loading…
Cancel
Save