[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:53 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=ef89f12

The following commit has been merged in the master branch:
commit ef89f12022013b3506bc905579f8da8e5edeaedd
Author: Lasath Fernando <kde at lasath.org>
Date:   Sat Jan 14 00:57:42 2012 +1100

    Removes property ConversationTarget::presenceIconSource
    
    - Changes presenceIcon property from type KIcon to QIcon.
    - Replaces usage of presenceIconSource with presenceIcon in QML code.
    - Removes all methods related to presenceIconSource.
---
 KTp/Declarative/conversation-target.cpp | 37 +--------------------------------
 KTp/Declarative/conversation-target.h   |  9 ++------
 2 files changed, 3 insertions(+), 43 deletions(-)

diff --git a/KTp/Declarative/conversation-target.cpp b/KTp/Declarative/conversation-target.cpp
index 9e1b86f..2d6e844 100644
--- a/KTp/Declarative/conversation-target.cpp
+++ b/KTp/Declarative/conversation-target.cpp
@@ -65,48 +65,13 @@ QString ConversationTarget::nick() const
     return d->contact->alias();
 }
 
-KIcon ConversationTarget::presenceIcon() const
+QIcon ConversationTarget::presenceIcon() const
 {
     return KTp::Presence(d->contact->presence()).icon();
 }
 
-QString ConversationTarget::presenceIconSource() const
-{
-    return iconSourceForPresence(d->contact->presence().type());
-}
-
-QString ConversationTarget::iconSourceForPresence(Tp::ConnectionPresenceType presence)
-{
-    QString iconName;
-
-    switch (presence) {
-        case Tp::ConnectionPresenceTypeAvailable:
-            iconName = QLatin1String("user-online");
-            break;
-        case Tp::ConnectionPresenceTypeAway:
-            iconName = QLatin1String("user-away");
-            break;
-        case Tp::ConnectionPresenceTypeExtendedAway:
-            iconName = QLatin1String("user-away-extended");
-            break;
-        case Tp::ConnectionPresenceTypeHidden:
-            iconName = QLatin1String("user-invisible");
-            break;
-        case Tp::ConnectionPresenceTypeBusy:
-            iconName = QLatin1String("user-busy");
-            break;
-        default:
-            iconName = QLatin1String("user-offline");
-            break;
-    }
-
-    return iconName;
-}
-
-
 void ConversationTarget::onPresenceChanged(const Tp::Presence&)
 {
-    Q_EMIT presenceIconSourceChanged(presenceIconSource());
     Q_EMIT presenceIconChanged(presenceIcon());
 }
 
diff --git a/KTp/Declarative/conversation-target.h b/KTp/Declarative/conversation-target.h
index 47c686b..858388e 100644
--- a/KTp/Declarative/conversation-target.h
+++ b/KTp/Declarative/conversation-target.h
@@ -34,8 +34,7 @@ class KDE_TELEPATHY_CHAT_EXPORT ConversationTarget : public QObject
 
     Q_PROPERTY(QIcon avatar READ avatar NOTIFY avatarChanged);
     Q_PROPERTY(QString nick READ nick NOTIFY nickChanged);
-    Q_PROPERTY(KIcon presenceIcon READ presenceIcon NOTIFY presenceIconChanged);
-    Q_PROPERTY(QString presenceIconSource READ presenceIconSource NOTIFY presenceIconSourceChanged);
+    Q_PROPERTY(QIcon presenceIcon READ presenceIcon NOTIFY presenceIconChanged);
     Q_PROPERTY(QString id READ id)
 
 public:
@@ -45,19 +44,15 @@ public:
     QIcon   avatar() const;
     QString id() const;
     QString nick() const;
-    KIcon   presenceIcon() const;
-    QString presenceIconSource() const;
+    QIcon   presenceIcon() const;
 
     Tp::ContactPtr contact() const;
     void setContact(const Tp::ContactPtr &contact);
 
-    static QString iconSourceForPresence(Tp::ConnectionPresenceType presence);
-
 Q_SIGNALS:
     void avatarChanged(QIcon avatar);
     void nickChanged(QString nick);
     void presenceIconChanged(QIcon icon);
-    void presenceIconSourceChanged(QString source);
 
     void contactChanged(Tp::ContactPtr contact);
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list