diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-11-21 02:29:57 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-11-21 02:29:57 +0100 |
commit | ec92f856854a35bd888b883802a1ef618cc9f69c (patch) | |
tree | 2efa724741e2ccb4fe2e96b6d7d9e918ba436b8e /common/modelresult.cpp | |
parent | 0b967e06a1a50c1f540b941d381680cdf3ac4706 (diff) | |
download | sink-ec92f856854a35bd888b883802a1ef618cc9f69c.tar.gz sink-ec92f856854a35bd888b883802a1ef618cc9f69c.zip |
Don't try to fetch more once the parent is fetched.
We're not doing partial fetches yet
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r-- | common/modelresult.cpp | 4 |
1 files 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<class T, class Ptr> | |||
104 | bool ModelResult<T, Ptr>::canFetchMore(const QModelIndex &parent) const | 104 | bool ModelResult<T, Ptr>::canFetchMore(const QModelIndex &parent) const |
105 | { | 105 | { |
106 | qDebug() << "Can fetch more: " << parent << mEntityChildrenFetched.value(parent.internalId()); | 106 | qDebug() << "Can fetch more: " << parent << mEntityChildrenFetched.value(parent.internalId()); |
107 | return mEntityChildrenFetched.value(parent.internalId()); | 107 | return !mEntityChildrenFetched.value(parent.internalId(), false); |
108 | } | 108 | } |
109 | 109 | ||
110 | template<class T, class Ptr> | 110 | template<class T, class Ptr> |
@@ -133,7 +133,7 @@ void ModelResult<T, Ptr>::add(const Ptr &value) | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | if (mEntities.contains(childId)) { | 135 | if (mEntities.contains(childId)) { |
136 | qWarning() << "Entity already in model " << value->identifier(); | 136 | Warning() << "Entity already in model " << value->identifier(); |
137 | return; | 137 | return; |
138 | } | 138 | } |
139 | qDebug() << "Inserting rows " << index << parent; | 139 | qDebug() << "Inserting rows " << index << parent; |