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


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

The following commit has been merged in the master branch:
commit bf8be09ac207ea24eb104f96c101b5e7cbf75a5e
Author: Lasath Fernando <kde at lasath.org>
Date:   Sat Jan 14 23:53:59 2012 +1100

    Rename Conversation::model to Conversation::messages
    
    And remove useless commented out code.
---
 KTp/Declarative/conversation.cpp        | 26 ++++++--------------------
 KTp/Declarative/conversation.h          |  6 +++---
 KTp/Declarative/conversations-model.cpp |  6 +++---
 3 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/KTp/Declarative/conversation.cpp b/KTp/Declarative/conversation.cpp
index 5d48948..89cd4e8 100644
--- a/KTp/Declarative/conversation.cpp
+++ b/KTp/Declarative/conversation.cpp
@@ -27,9 +27,8 @@
 class Conversation::ConversationPrivate
 {
 public:
-    MessagesModel *model;
+    MessagesModel *messages;
     ConversationTarget *target;
-//     Tp::AccountPtr account;
 };
 
 Conversation::Conversation(const Tp::TextChannelPtr& channel, const Tp::AccountPtr& account, QObject *parent) :
@@ -38,13 +37,10 @@ Conversation::Conversation(const Tp::TextChannelPtr& channel, const Tp::AccountP
 {
     kDebug();
 
-    d->model = new MessagesModel(this);
-    d->model->setTextChannel(channel);
+    d->messages = new MessagesModel(this);
+    d->messages->setTextChannel(channel);
 
     d->target = new ConversationTarget(channel->targetContact(), this);
-
-//     connect(model(), SIGNAL(unreadCountChanged(int)), SLOT(onUnreadMessagesChanged()));
-//     d->account = account;
 }
 
 Conversation::Conversation(QObject *parent) : QObject(parent)
@@ -53,26 +49,16 @@ Conversation::Conversation(QObject *parent) : QObject(parent)
     Q_ASSERT(false);
 }
 
-MessagesModel *Conversation::model() const
+MessagesModel* Conversation::messages() const
 {
-    return d->model;
+    return d->messages;
 }
 
-ConversationTarget *Conversation::target() const
+ConversationTarget* Conversation::target() const
 {
     return d->target;
 }
 
-// void Conversation::onUnreadMessagesChanged()
-// {
-//     enqueSelf();
-// }
-// 
-// void Conversation::selfDequed()
-// {
-//     Q_EMIT popoutRequested();
-// }
-
 Conversation::~Conversation()
 {
     kDebug();
diff --git a/KTp/Declarative/conversation.h b/KTp/Declarative/conversation.h
index 9538c3f..565b28a 100644
--- a/KTp/Declarative/conversation.h
+++ b/KTp/Declarative/conversation.h
@@ -37,9 +37,9 @@ class KDE_TELEPATHY_CHAT_EXPORT Conversation : public QObject
 Q_OBJECT
 
 // Q_PROPERTY(ConversationTarget *target READ target CONSTANT);
-Q_PROPERTY(ConversationTarget *target READ target CONSTANT);
+Q_PROPERTY(ConversationTarget* target READ target CONSTANT);
 //TODO: rename this to messages
-Q_PROPERTY(MessagesModel *model READ model CONSTANT);
+Q_PROPERTY(MessagesModel* messages READ messages CONSTANT);
 
 public:
     Conversation(const Tp::TextChannelPtr &channel, const Tp::AccountPtr &account, QObject *parent = 0);
@@ -47,7 +47,7 @@ public:
     virtual ~Conversation();
 
     //FIXME: rename model to messages
-    MessagesModel* model() const;
+    MessagesModel* messages() const;
     ConversationTarget* target() const;
 
 private:
diff --git a/KTp/Declarative/conversations-model.cpp b/KTp/Declarative/conversations-model.cpp
index ba2c9eb..332d76a 100644
--- a/KTp/Declarative/conversations-model.cpp
+++ b/KTp/Declarative/conversations-model.cpp
@@ -62,15 +62,15 @@ void ConversationsModel::onInconmingConversation(Conversation *newConvo)
 {
     //check if conversation's channel is already being handled, if so replace it
     bool handled = false;
-    Tp::TextChannelPtr newChannel = newConvo->model()->textChannel();
+    Tp::TextChannelPtr newChannel = newConvo->messages()->textChannel();
     if (!newChannel->targetHandleType() == Tp::HandleTypeNone) {
 
         //loop through all conversations checking for matches
         Q_FOREACH(Conversation *convo, d->conversations) {
             if (convo->target()->id() == newChannel->targetId() &&
-                    convo->model()->textChannel()->targetHandleType() == newChannel->targetHandleType()) {
+                    convo->messages()->textChannel()->targetHandleType() == newChannel->targetHandleType()) {
 
-                convo->model()->setTextChannel(newChannel);
+                convo->messages()->setTextChannel(newChannel);
                 newConvo->deleteLater();
                 handled = true;
                 break;

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list