diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-14 18:04:06 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-14 18:04:06 +0100 |
commit | e86e1f06d2b730c14c90d4c78719a47f3e5350fc (patch) | |
tree | 7e6337a45a25ad5ac7ba581ee292f3bd4b68a97f /common/modelresult.cpp | |
parent | 175a49d623a5e37c1c20c80ed7f2077222f3c593 (diff) | |
download | sink-e86e1f06d2b730c14c90d4c78719a47f3e5350fc.tar.gz sink-e86e1f06d2b730c14c90d4c78719a47f3e5350fc.zip |
Hide Query::parentProperty
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r-- | common/modelresult.cpp | 6 |
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) | |||
50 | template <class T, class Ptr> | 50 | template <class T, class Ptr> |
51 | qint64 ModelResult<T, Ptr>::parentId(const Ptr &value) | 51 | qint64 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 | |||
149 | template <class T, class Ptr> | 149 | template <class T, class Ptr> |
150 | bool ModelResult<T, Ptr>::hasChildren(const QModelIndex &parent) const | 150 | bool 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 |