From 0b8850f85f420fcb08643463afe01b026e58dde5 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 30 Nov 2015 15:58:23 +0100 Subject: Less debug output --- common/modelresult.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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::parentId(const Ptr &value) template int ModelResult::rowCount(const QModelIndex &parent) const { - qDebug() << "row count " << mTree[getIdentifier(parent)].size(); return mTree[getIdentifier(parent)].size(); } template int ModelResult::columnCount(const QModelIndex &parent) const { - qDebug() << "porperty count " << mPropertyColumns.size(); return mPropertyColumns.size(); } template QVariant ModelResult::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::hasChildren(const QModelIndex &parent) const template bool ModelResult::canFetchMore(const QModelIndex &parent) const { - qDebug() << "Can fetch more: " << parent << mEntityChildrenFetched.contains(parent.internalId()); return !mEntityChildrenFetched.contains(parent.internalId()); } template void ModelResult::fetchMore(const QModelIndex &parent) { - qDebug() << "Fetch more: " << parent; fetchEntities(parent); } @@ -146,7 +141,6 @@ void ModelResult::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::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::setEmitter(const typename Akonadi2::ResultEmitter 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() << ChildrenFetchedRole); @@ -242,7 +236,7 @@ void ModelResult::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); -- cgit v1.2.3