[SCM] ktp-common-internals packaging branch, master, updated. debian/16.04.2-1-111-g6e00b1c

Maximiliano Curia maxy at moszumanska.debian.org
Tue Sep 12 14:08:55 UTC 2017


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

The following commit has been merged in the master branch:
commit 1c6ebe036bfd641c7f147faabc1b76fe2d32c762
Author: Martin Klapetek <mklapetek at kde.org>
Date:   Wed Feb 10 22:14:29 2016 -0500

    [declarative] Move the channel setup to setTextChannel
    
    Since Conversation allows to be constructed as an empty object with
    setting the text channel later, all the setup must be also done later
    
    Reviewed-by: Alexandr Akulich <akulichalexander at gmail.com>
---
 KTp/Declarative/conversation.cpp | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/KTp/Declarative/conversation.cpp b/KTp/Declarative/conversation.cpp
index 14eb328..6199cac 100644
--- a/KTp/Declarative/conversation.cpp
+++ b/KTp/Declarative/conversation.cpp
@@ -71,17 +71,6 @@ Conversation::Conversation(const Tp::TextChannelPtr &channel,
     d->pausedStateTimer = new QTimer(this);
     d->pausedStateTimer->setSingleShot(true);
     connect(d->pausedStateTimer, SIGNAL(timeout()), this, SLOT(onChatPausedTimerExpired()));
-
-    if (channel->targetContact().isNull()) {
-        d->isGroupChat = true;
-    } else {
-        d->isGroupChat = false;
-        d->targetContact = KTp::ContactPtr::qObjectCast(channel->targetContact());
-
-        connect(d->targetContact.constData(), SIGNAL(aliasChanged(QString)), SIGNAL(titleChanged()));
-        connect(d->targetContact.constData(), SIGNAL(presenceChanged(Tp::Presence)), SIGNAL(presenceIconChanged()));
-        connect(d->targetContact.constData(), SIGNAL(avatarDataChanged(Tp::AvatarData)), SIGNAL(avatarChanged()));
-    }
 }
 
 Conversation::Conversation(QObject *parent) : QObject(parent)
@@ -97,6 +86,21 @@ void Conversation::setTextChannel(const Tp::TextChannelPtr& channel)
         connect(channel.data(), SIGNAL(invalidated(Tp::DBusProxy*,QString,QString)),
                 SLOT(onChannelInvalidated(Tp::DBusProxy*,QString,QString)));
         Q_EMIT validityChanged(d->valid);
+
+        if (channel->targetContact().isNull()) {
+            d->isGroupChat = true;
+        } else {
+            d->isGroupChat = false;
+            d->targetContact = KTp::ContactPtr::qObjectCast(channel->targetContact());
+
+            connect(d->targetContact.constData(), SIGNAL(aliasChanged(QString)), SIGNAL(titleChanged()));
+            connect(d->targetContact.constData(), SIGNAL(presenceChanged(Tp::Presence)), SIGNAL(presenceIconChanged()));
+            connect(d->targetContact.constData(), SIGNAL(avatarDataChanged(Tp::AvatarData)), SIGNAL(avatarChanged()));
+        }
+
+        Q_EMIT avatarChanged();
+        Q_EMIT titleChanged();
+        Q_EMIT presenceIconChanged();
     }
 }
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list