diff --git a/ui/StatusQ/include/StatusQ/objectproxymodel.h b/ui/StatusQ/include/StatusQ/objectproxymodel.h index 6e2924eb73..ae5a6663ac 100644 --- a/ui/StatusQ/include/StatusQ/objectproxymodel.h +++ b/ui/StatusQ/include/StatusQ/objectproxymodel.h @@ -40,8 +40,7 @@ public: void setExposedRoles(const QStringList& exposedRoles); const QStringList& exposedRoles() const; - Q_INVOKABLE QObject* proxyObject(int index); - const QObject* proxyObject(int index) const; + Q_INVOKABLE QObject* proxyObject(int index) const; signals: void delegateChanged(); diff --git a/ui/StatusQ/src/objectproxymodel.cpp b/ui/StatusQ/src/objectproxymodel.cpp index ae160c9796..7d45a9827e 100644 --- a/ui/StatusQ/src/objectproxymodel.cpp +++ b/ui/StatusQ/src/objectproxymodel.cpp @@ -162,7 +162,7 @@ const QStringList& ObjectProxyModel::exposedRoles() const return m_exposedRoles; } -QObject* ObjectProxyModel::proxyObject(int index) +QObject* ObjectProxyModel::proxyObject(int index) const { if (index >= m_container.size()) return nullptr; @@ -177,7 +177,6 @@ QObject* ObjectProxyModel::proxyObject(int index) ? creationContext : m_delegate->engine()->rootContext(); auto context = new QQmlContext(parentContext); - auto rowData = new QQmlPropertyMap(context); auto model = sourceModel(); @@ -207,11 +206,6 @@ QObject* ObjectProxyModel::proxyObject(int index) return instance; } -const QObject* ObjectProxyModel::proxyObject(int index) const -{ - return const_cast(this)->proxyObject(index); -} - void ObjectProxyModel::resetInternalData() { QIdentityProxyModel::resetInternalData();