summaryrefslogtreecommitdiffstats
path: root/common/modelresult.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-14 18:04:06 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-14 18:04:06 +0100
commite86e1f06d2b730c14c90d4c78719a47f3e5350fc (patch)
tree7e6337a45a25ad5ac7ba581ee292f3bd4b68a97f /common/modelresult.cpp
parent175a49d623a5e37c1c20c80ed7f2077222f3c593 (diff)
downloadsink-e86e1f06d2b730c14c90d4c78719a47f3e5350fc.tar.gz
sink-e86e1f06d2b730c14c90d4c78719a47f3e5350fc.zip
Hide Query::parentProperty
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r--common/modelresult.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/modelresult.cpp b/common/modelresult.cpp
index 7565eea..16e3857 100644
--- a/common/modelresult.cpp
+++ b/common/modelresult.cpp
@@ -50,8 +50,8 @@ static qint64 getIdentifier(const QModelIndex &idx)
50template <class T, class Ptr> 50template <class T, class Ptr>
51qint64 ModelResult<T, Ptr>::parentId(const Ptr &value) 51qint64 ModelResult<T, Ptr>::parentId(const Ptr &value)
52{ 52{
53 if (!mQuery.parentProperty.isEmpty()) { 53 if (!mQuery.parentProperty().isEmpty()) {
54 const auto identifier = value->getProperty(mQuery.parentProperty).toByteArray(); 54 const auto identifier = value->getProperty(mQuery.parentProperty()).toByteArray();
55 if (!identifier.isEmpty()) { 55 if (!identifier.isEmpty()) {
56 return qHash(T(value->resourceInstanceIdentifier(), identifier, 0, QSharedPointer<Sink::ApplicationDomain::BufferAdaptor>())); 56 return qHash(T(value->resourceInstanceIdentifier(), identifier, 0, QSharedPointer<Sink::ApplicationDomain::BufferAdaptor>()));
57 } 57 }
@@ -149,7 +149,7 @@ QModelIndex ModelResult<T, Ptr>::parent(const QModelIndex &index) const
149template <class T, class Ptr> 149template <class T, class Ptr>
150bool ModelResult<T, Ptr>::hasChildren(const QModelIndex &parent) const 150bool ModelResult<T, Ptr>::hasChildren(const QModelIndex &parent) const
151{ 151{
152 if (mQuery.parentProperty.isEmpty() && parent.isValid()) { 152 if (mQuery.parentProperty().isEmpty() && parent.isValid()) {
153 return false; 153 return false;
154 } 154 }
155 //Figure out whether we have children 155 //Figure out whether we have children