summaryrefslogtreecommitdiffstats
path: root/common/modelresult.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-04 11:59:07 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-04 11:59:07 +0100
commit52f14f40f233146f76a3c1eb143deb12c6a5b2d6 (patch)
tree8059c0bc52e51c218307c28738e4844006af5a4c /common/modelresult.cpp
parentd2305f14fced3afdbda2b5a8f2a270ae91d79ae1 (diff)
downloadsink-52f14f40f233146f76a3c1eb143deb12c6a5b2d6.tar.gz
sink-52f14f40f233146f76a3c1eb143deb12c6a5b2d6.zip
Provide a way to get to the ApplicationDomainType base class
QVariant doesn't support polymorphism for non-QObject classes.
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r--common/modelresult.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/modelresult.cpp b/common/modelresult.cpp
index c7fcd49..4fd8d97 100644
--- a/common/modelresult.cpp
+++ b/common/modelresult.cpp
@@ -71,6 +71,10 @@ QVariant ModelResult<T, Ptr>::data(const QModelIndex &index, int role) const
71 Q_ASSERT(mEntities.contains(index.internalId())); 71 Q_ASSERT(mEntities.contains(index.internalId()));
72 return QVariant::fromValue(mEntities.value(index.internalId())); 72 return QVariant::fromValue(mEntities.value(index.internalId()));
73 } 73 }
74 if (role == DomainObjectBaseRole) {
75 Q_ASSERT(mEntities.contains(index.internalId()));
76 return QVariant::fromValue(mEntities.value(index.internalId()). template staticCast<Akonadi2::ApplicationDomain::ApplicationDomainType>());
77 }
74 if (role == ChildrenFetchedRole) { 78 if (role == ChildrenFetchedRole) {
75 return childrenFetched(index); 79 return childrenFetched(index);
76 } 80 }