[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:06:28 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=85a73ed
The following commit has been merged in the master branch:
commit 85a73eddabc548b610d9e0b9361a5303da8af1d3
Author: Alin M Elena <alinm.elena at gmail.com>
Date: Fri Mar 1 17:54:19 2013 +0000
I think I did a mess this fixes the previous commit
---
KTp/Models/contacts-list-model.cpp | 2 +-
KTp/contact.cpp | 6 +++---
KTp/contact.h | 4 ++--
KTp/types.h | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/KTp/Models/contacts-list-model.cpp b/KTp/Models/contacts-list-model.cpp
index 22d8e12..8c68581 100644
--- a/KTp/Models/contacts-list-model.cpp
+++ b/KTp/Models/contacts-list-model.cpp
@@ -51,7 +51,7 @@ KTp::ContactsListModel::ContactsListModel(QObject *parent) :
roles[KTp::ContactClientTypesRole]= "clientTypes";
roles[KTp::ContactAvatarPathRole]= "avatar";
- roles[KTp::ContactAvatarPixmapRole]="avatarQPixmap";
+ roles[KTp::ContactAvatarPixmapRole]="avatarPixmap";
roles[KTp::ContactGroupsRole]= "groups";
roles[KTp::ContactPresenceMessageRole]= "presenceMessage";
roles[KTp::ContactPresenceTypeRole]= "presenceType";
diff --git a/KTp/contact.cpp b/KTp/contact.cpp
index d9ad096..8a0982d 100644
--- a/KTp/contact.cpp
+++ b/KTp/contact.cpp
@@ -34,7 +34,7 @@ KTp::Contact::Contact(Tp::ContactManager *manager, const Tp::ReferencedHandles &
: Tp::Contact(manager, handle, requestedFeatures, attributes)
{
connect(manager->connection().data(), SIGNAL(destroyed()), SIGNAL(invalidated()));
- connect(manager->connection().data(), SIGNAL(invalidated(Tp::DBusProxy*, QString, QString)), SIGNAL(invalidated()));
+ connect(manager->connection().data(), SIGNAL(invalidated(Tp::DBusProxy*,QString,QString)), SIGNAL(invalidated()));
}
KTp::Presence KTp::Contact::presence() const
@@ -102,14 +102,14 @@ QStringList KTp::Contact::clientTypes() const
QPixmap KTp::Contact::avatarPixmap()
{
- QString file = Tp::Contact::avatarData().fileName;
+ QString file = avatarData().fileName;
QPixmap avatar;
if (file.isEmpty()) {
avatar = KIconLoader::global()->loadIcon(QLatin1String("im-user"), KIconLoader::NoGroup, 96);
} else {
avatar.load(file);
}
- if (Tp::Contact::presence().type() == Tp::ConnectionPresenceTypeOffline) {
+ if (presence().type() == Tp::ConnectionPresenceTypeOffline) {
avatarToGray(avatar);
}
return avatar;
diff --git a/KTp/contact.h b/KTp/contact.h
index 7b84c22..0986f42 100644
--- a/KTp/contact.h
+++ b/KTp/contact.h
@@ -44,12 +44,12 @@ public:
//Overridden as a workaround for upstream bug https://bugs.freedesktop.org/show_bug.cgi?id=55883
QStringList clientTypes() const;
- /** Returns the pixmap of an avatar coloured according to the presence*/
+ /** Returns the pixmap of an avatar coloured to gray if contact online*/
QPixmap avatarPixmap();
Q_SIGNALS:
void invalidated();
-
+
private:
void avatarToGray(QPixmap &avatar);
diff --git a/KTp/types.h b/KTp/types.h
index 3239118..82ccbb6 100644
--- a/KTp/types.h
+++ b/KTp/types.h
@@ -51,6 +51,7 @@ namespace KTp
//contact/person roles
ContactClientTypesRole = Qt::UserRole + 2000, ///< stringlist. See Tp::Contact::ClientTypes
ContactAvatarPathRole, ///<string. path to avatar file
+ ContactAvatarPixmapRole, ///< QPixmap the pixmap that shall be use as avatar image
ContactGroupsRole, ///< stringlist. of all groups contact is in
ContactPresenceNameRole,
@@ -70,7 +71,6 @@ namespace KTp
ContactCanAudioCallRole, ///< bool. You and contact can both audio call
ContactCanVideoCallRole, ///< bool. You and contact can both video call
ContactTubesRole, ///< stringlist. common supported dbus + stream services between you and contact
- ContactAvatarPixmapRole, ///< QPixmap the pixmap that shall be use as avatar image
//heading roles
HeaderTotalUsersRole = Qt::UserRole + 3000,
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list