[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9
Maximiliano Curia
maxy at moszumanska.debian.org
Mon May 9 09:04:42 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=83b1ac0
The following commit has been merged in the master branch:
commit 83b1ac025f946c1ef4e7437d04487f49ee0ae06a
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Thu Dec 1 14:48:08 2011 +0100
Make Accounts model return KTp::Presence as well
Reviewed-by: David Edmundson
---
KTelepathy/Models/accounts-model.cpp | 1 +
KTelepathy/Models/accounts-model.h | 1 +
KTelepathy/Models/contact-model-item.cpp | 3 +++
KTelepathy/presence.h | 2 ++
4 files changed, 7 insertions(+)
diff --git a/KTelepathy/Models/accounts-model.cpp b/KTelepathy/Models/accounts-model.cpp
index 355ee95..7086330 100644
--- a/KTelepathy/Models/accounts-model.cpp
+++ b/KTelepathy/Models/accounts-model.cpp
@@ -100,6 +100,7 @@ AccountsModel::AccountsModel(const Tp::AccountManagerPtr &am, QObject *parent)
roles[ConnectionStatusReasonRole] = "connectionStatusReason";
roles[AliasRole] = "aliasName";
roles[AvatarRole] = "avatar";
+ roles[PresenceRole] = "presence";
roles[PresenceStatusRole] = "presenceStatus";
roles[PresenceTypeRole] = "presenceType";
roles[PresenceMessageRole] = "presenceMessage";
diff --git a/KTelepathy/Models/accounts-model.h b/KTelepathy/Models/accounts-model.h
index 12f2438..d96487b 100644
--- a/KTelepathy/Models/accounts-model.h
+++ b/KTelepathy/Models/accounts-model.h
@@ -73,6 +73,7 @@ public:
// contact roles
AliasRole,
+ PresenceRole,
PresenceStatusRole,
PresenceTypeRole,
PresenceMessageRole,
diff --git a/KTelepathy/Models/contact-model-item.cpp b/KTelepathy/Models/contact-model-item.cpp
index d87e21f..e66ae6b 100644
--- a/KTelepathy/Models/contact-model-item.cpp
+++ b/KTelepathy/Models/contact-model-item.cpp
@@ -23,6 +23,7 @@
#include "contact-model-item.h"
#include "accounts-model.h"
#include "../service-availability-checker.h"
+#include "presence.h"
#include <QImage>
@@ -107,6 +108,8 @@ QVariant ContactModelItem::data(int role) const
case Qt::DisplayRole:
case AccountsModel::AliasRole:
return mPriv->mContact->alias();
+ case AccountsModel::PresenceRole:
+ return QVariant::fromValue(KTp::Presence(mPriv->mContact->presence()));
case AccountsModel::PresenceStatusRole:
return mPriv->mContact->presence().status();
case AccountsModel::PresenceTypeRole:
diff --git a/KTelepathy/presence.h b/KTelepathy/presence.h
index 41baef7..7542b90 100644
--- a/KTelepathy/presence.h
+++ b/KTelepathy/presence.h
@@ -48,4 +48,6 @@ public:
}
+Q_DECLARE_METATYPE(KTp::Presence);
+
#endif // PRESENCE_H
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list