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


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

The following commit has been merged in the master branch:
commit 5e1d7f95094d08872d8e67039194825817a204ff
Author: Lasath Fernando <kde at lasath.org>
Date:   Tue Dec 6 11:45:10 2011 +1100

    Fixed binding loop for ConversationDelegate.size
---
 KTp/Declarative/messages-model.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/KTp/Declarative/messages-model.cpp b/KTp/Declarative/messages-model.cpp
index bc85936..e377a84 100644
--- a/KTp/Declarative/messages-model.cpp
+++ b/KTp/Declarative/messages-model.cpp
@@ -96,7 +96,7 @@ void MessagesModel::setTextChannel(Tp::TextChannelPtr channel)
 
 void MessagesModel::onMessageReceived(Tp::ReceivedMessage message)
 {
-    kDebug();
+    kDebug() << "unreadMessagesCount = " << d->textChannel->messageQueue().size();
     int length = rowCount();
     beginInsertRows(QModelIndex(), length, length);
 
@@ -131,12 +131,9 @@ void MessagesModel::onMessageSent(Tp::Message message, Tp::MessageSendingFlags f
 
 QVariant MessagesModel::data(const QModelIndex& index, int role) const
 {
-    kDebug();
     QVariant result;
 
-    if(!index.isValid()) {
-        kError() << "Attempting to access data at invalid index (" << index << ")";
-    } else {
+    if(index.row() < d->messages.size()) {
         MessageItem* requestedData = &d->messages[index.row()];
 
         switch(role) {
@@ -153,6 +150,8 @@ QVariant MessagesModel::data(const QModelIndex& index, int role) const
                 result = requestedData->time;
                 break;
         };
+    } else {
+        kError() << "Attempting to access data at invalid index (" << index << ")";
     }
 
     return result;

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list