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

List:       kde-commits
Subject:    [akonadi-next/develop] common: Less debug output
From:       Christian Mollekopf <chrigi_1 () fastmail ! fm>
Date:       2015-11-30 17:52:54
Message-ID: E1a3SdC-0003TI-D9 () scm ! kde ! org
[Download RAW message or body]

Git commit 0b8850f85f420fcb08643463afe01b026e58dde5 by Christian Mollekopf.
Committed on 30/11/2015 at 14:58.
Pushed by cmollekopf into branch 'develop'.

Less debug output

M  +3    -9    common/modelresult.cpp

http://commits.kde.org/akonadi-next/0b8850f85f420fcb08643463afe01b026e58dde5

diff --git a/common/modelresult.cpp b/common/modelresult.cpp
index e2a05f8..c7fcd49 100644
--- a/common/modelresult.cpp
+++ b/common/modelresult.cpp
@@ -55,21 +55,18 @@ qint64 ModelResult<T, Ptr>::parentId(const Ptr &value)
 template<class T, class Ptr>
 int ModelResult<T, Ptr>::rowCount(const QModelIndex &parent) const
 {
-    qDebug() << "row count " << mTree[getIdentifier(parent)].size();
     return mTree[getIdentifier(parent)].size();
 }
 
 template<class T, class Ptr>
 int ModelResult<T, Ptr>::columnCount(const QModelIndex &parent) const
 {
-    qDebug() << "porperty count " << mPropertyColumns.size();
     return mPropertyColumns.size();
 }
 
 template<class T, class Ptr>
 QVariant ModelResult<T, Ptr>::data(const QModelIndex &index, int role) const
 {
-    qDebug() << index;
     if (role == DomainObjectRole) {
         Q_ASSERT(mEntities.contains(index.internalId()));
         return QVariant::fromValue(mEntities.value(index.internalId()));
@@ -128,14 +125,12 @@ bool ModelResult<T, Ptr>::hasChildren(const QModelIndex &parent) const
 template<class T, class Ptr>
 bool ModelResult<T, Ptr>::canFetchMore(const QModelIndex &parent) const
 {
-    qDebug() << "Can fetch more: " << parent << mEntityChildrenFetched.contains(parent.internalId());
     return !mEntityChildrenFetched.contains(parent.internalId());
 }
 
 template<class T, class Ptr>
 void ModelResult<T, Ptr>::fetchMore(const QModelIndex &parent)
 {
-    qDebug() << "Fetch more: " << parent;
     fetchEntities(parent);
 }
 
@@ -146,7 +141,6 @@ void ModelResult<T, Ptr>::add(const Ptr &value)
     const auto id = parentId(value);
     //Ignore updates we get before the initial fetch is done
     if (!mEntityChildrenFetched.contains(id)) {
-        qDebug() << "Children not yet fetched";
         return;
     }
     auto parent = createIndexFromId(id);
@@ -178,7 +172,7 @@ void ModelResult<T, Ptr>::remove(const Ptr &value)
     auto childId = qHash(value->identifier());
     auto id = parentId(value);
     auto parent = createIndexFromId(id);
-    qDebug() << "Removed entity" << childId;
+    // qDebug() << "Removed entity" << childId;
     auto index = mTree[id].indexOf(qHash(value->identifier()));
     beginRemoveRows(parent, index, index);
     mEntities.remove(childId);
@@ -218,7 +212,7 @@ void ModelResult<T, Ptr>::setEmitter(const typename Akonadi2::ResultEmitter<Ptr>
         this->remove(value);
     });
     emitter->onInitialResultSetComplete([this](const Ptr &parent) {
-        qint64 parentId = parent ? qHash(parent->identifier()) : 0;
+        const qint64 parentId = parent ? qHash(parent->identifier()) : 0;
         const auto parentIndex = createIndexFromId(parentId);
         mEntityChildrenFetchComplete.insert(parentId);
         emit dataChanged(parentIndex, parentIndex, QVector<int>() << ChildrenFetchedRole);
@@ -242,7 +236,7 @@ void ModelResult<T, Ptr>::modify(const Ptr &value)
         return;
     }
     auto parent = createIndexFromId(id);
-    qDebug() << "Modified entity" << childId;
+    // qDebug() << "Modified entity" << childId;
     auto i = mTree[id].indexOf(childId);
     mEntities.remove(childId);
     mEntities.insert(childId, value);

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

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