diff --git a/ui/StatusQ/include/StatusQ/leftjoinmodel.h b/ui/StatusQ/include/StatusQ/leftjoinmodel.h index 43b656867a..8d96c2d257 100644 --- a/ui/StatusQ/include/StatusQ/leftjoinmodel.h +++ b/ui/StatusQ/include/StatusQ/leftjoinmodel.h @@ -2,8 +2,9 @@ #include #include +#include -class LeftJoinModel : public QAbstractListModel +class LeftJoinModel : public QAbstractListModel, public QQmlParserStatus { Q_OBJECT @@ -38,6 +39,9 @@ public: QHash roleNames() const override; QVariant data(const QModelIndex& index, int role) const override; + void classBegin() override; + void componentComplete() override; + signals: void leftModelChanged(); void rightModelChanged(); diff --git a/ui/StatusQ/src/leftjoinmodel.cpp b/ui/StatusQ/src/leftjoinmodel.cpp index 62db8a6c30..3617478068 100644 --- a/ui/StatusQ/src/leftjoinmodel.cpp +++ b/ui/StatusQ/src/leftjoinmodel.cpp @@ -271,6 +271,16 @@ QVariant LeftJoinModel::data(const QModelIndex& index, int role) const return match.first().data(role - m_rightModelRolesOffset); } +void LeftJoinModel::classBegin() +{ +} + +void LeftJoinModel::componentComplete() +{ + if (!m_initialized) + initializeIfReady(false); +} + void LeftJoinModel::setLeftModel(QAbstractItemModel* model) { if (m_leftModel == model)