Skip to content
Snippets Groups Projects
Commit 10272bdb authored by Pierre Lamot's avatar Pierre Lamot Committed by Hugo Beauzée-Luyssen
Browse files

qt: directly binds to the mainInterface in ServicesDiscoveryModel

parent 1de95357
No related branches found
No related tags found
1 merge request!968qml: merge MainContext and MainInterface
......@@ -279,7 +279,7 @@ Widgets.PageLoader {
ServicesDiscoveryModel {
id: discoveryModel
ctx: mainctx
ctx: mainInterface
}
SortFilterProxyModel {
......
......@@ -127,7 +127,7 @@ int ServicesDiscoveryModel::getCount() const
return static_cast<int>( m_items.size() );
}
void ServicesDiscoveryModel::setCtx(QmlMainContext* ctx)
void ServicesDiscoveryModel::setCtx(MainInterface* ctx)
{
if (ctx) {
m_ctx = ctx;
......
......@@ -31,7 +31,7 @@
#include <vlc_addons.h>
#include <vlc_cxx_helpers.hpp>
#include <util/qml_main_context.hpp>
#include <maininterface/main_interface.hpp>
#include <memory>
......@@ -41,7 +41,7 @@ class ServicesDiscoveryModel : public QAbstractListModel
public:
Q_PROPERTY(QmlMainContext* ctx READ getCtx WRITE setCtx NOTIFY ctxChanged FINAL)
Q_PROPERTY(MainInterface* ctx READ getCtx WRITE setCtx NOTIFY ctxChanged FINAL)
Q_PROPERTY(bool parsingPending READ getParsingPending NOTIFY parsingPendingChanged FINAL)
Q_PROPERTY(int count READ getCount NOTIFY countChanged FINAL)
......@@ -73,9 +73,9 @@ public:
QHash<int, QByteArray> roleNames() const override;
int rowCount(const QModelIndex& parent = {}) const override;
void setCtx(QmlMainContext* ctx);
void setCtx(MainInterface* ctx);
inline QmlMainContext* getCtx() const { return m_ctx; }
inline MainInterface* getCtx() const { return m_ctx; }
inline bool getParsingPending() const { return m_parsingPending; }
int getCount() const;
......@@ -116,7 +116,7 @@ private:
};
std::vector<Item> m_items;
QmlMainContext* m_ctx = nullptr;
MainInterface* m_ctx = nullptr;
addons_manager_t* m_manager = nullptr;
bool m_parsingPending = false;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment