[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [ruqola] src: Add more debug
From:       Montel Laurent <null () kde ! org>
Date:       2017-08-31 21:29:50
Message-ID: E1dnX26-000696-Im () code ! kde ! org
[Download RAW message or body]

Git commit 36a2611f01ead6d03ba4a05b01166edd576d5c4e by Montel Laurent.
Committed on 31/08/2017 at 20:22.
Pushed by mlaurent into branch 'master'.

Add more debug

M  +3    -1    src/usermodel.cpp

https://commits.kde.org/ruqola/36a2611f01ead6d03ba4a05b01166edd576d5c4e

diff --git a/src/usermodel.cpp b/src/usermodel.cpp
index 3bd84d5..9c1a260 100644
--- a/src/usermodel.cpp
+++ b/src/usermodel.cpp
@@ -29,6 +29,7 @@ UsersModel::UsersModel(QObject *parent)
 
 UsersModel::~UsersModel()
 {
+    qDebug() << "UsersModel::~UsersModel() "<< mUsers.count();
     qDeleteAll(mUsers);
 }
 
@@ -79,9 +80,11 @@ void UsersModel::addUser(User *user)
     qCDebug(RUQOLA_LOG) << " User added " << user;
     //TODO verify if duplicate ?
     int pos = mUsers.size();
+    qDebug() << "addUser mUsers before"<<mUsers.count();
     beginInsertRows(QModelIndex(), pos, pos);
     mUsers.append(user);
     //TODO emit signal that we added element
+    qDebug() << "addUser mUsers after"<<mUsers.count();
     endInsertRows();
 }
 
@@ -94,7 +97,6 @@ void UsersModel::updateUser(const QJsonObject &array)
             const QJsonObject fields = array.value(QStringLiteral("fields")).toObject();
             const QString newStatus = fields.value(QStringLiteral("status")).toString();
             user->setStatus(newStatus);
-            //mUsers.replace(i, user);
             Q_EMIT dataChanged(createIndex(1, 1), createIndex(i, 1));
             break;
         }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic