qDBusRegisterMetaType<Quad>();
qDBusRegisterMetaType<QList<Quad> >();
+
+ QHash<int, QByteArray> roles;
+ roles.insert(Item, "item");
+
+ setRoleNames(roles);
}
PostCaptureModel::~PostCaptureModel() {
delete m_connection; m_connection = 0;
}
-QHash<int, QByteArray> PostCaptureModel::roleNames() const {
- QHash<int, QByteArray> roles;
- roles.insert(Item, "item");
- return roles;
-}
-
void PostCaptureModel::reload() {
delete m_connection; m_connection = 0;
}
}
+#if defined(QT5)
+QHash<int, QByteArray> PostCaptureModel::roleNames() const {
+ return m_roles;
+}
+
+void PostCaptureModel::setRoleNames(const QHash<int, QByteArray>& roles) {
+ m_roles = roles;
+}
+#endif
+
PostCaptureModelItem::PostCaptureModelItem(const QSparqlResultRow& row, QObject *parent) :
QObject(parent) {