From ec92f856854a35bd888b883802a1ef618cc9f69c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 21 Nov 2015 02:29:57 +0100 Subject: Don't try to fetch more once the parent is fetched. We're not doing partial fetches yet --- common/modelresult.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/modelresult.cpp b/common/modelresult.cpp index 1abcc62..5b9e24f 100644 --- a/common/modelresult.cpp +++ b/common/modelresult.cpp @@ -104,7 +104,7 @@ template bool ModelResult::canFetchMore(const QModelIndex &parent) const { qDebug() << "Can fetch more: " << parent << mEntityChildrenFetched.value(parent.internalId()); - return mEntityChildrenFetched.value(parent.internalId()); + return !mEntityChildrenFetched.value(parent.internalId(), false); } template @@ -133,7 +133,7 @@ void ModelResult::add(const Ptr &value) } } if (mEntities.contains(childId)) { - qWarning() << "Entity already in model " << value->identifier(); + Warning() << "Entity already in model " << value->identifier(); return; } qDebug() << "Inserting rows " << index << parent; -- cgit v1.2.3