properly init LogsModel

This commit is contained in:
Michael Zanetti 2018-10-04 14:36:54 +02:00
parent 6e0291c7e2
commit 71d475e29a
3 changed files with 7 additions and 3 deletions

View File

@ -81,7 +81,7 @@ private slots:
void newLogEntryReceived(const QVariantMap &data);
protected:
Engine *m_engine;
Engine *m_engine = nullptr;
QList<LogEntry*> m_list;
QString m_deviceId;
QStringList m_typeIds;

View File

@ -75,8 +75,10 @@ Page {
MouseArea {
anchors.fill: parent
anchors.margins: -app.margins / 2
onClicked: pageStack.push(Qt.resolvedUrl("StateLogPage.qml"),
onClicked: {
pageStack.push(Qt.resolvedUrl("StateLogPage.qml"),
{device: root.device, stateType: stateType})
}
}
}

View File

@ -31,7 +31,9 @@ Page {
engine: _engine
deviceId: root.device.id
live: true
Component.onCompleted: update()
Component.onCompleted: {
update()
}
typeIds: [root.stateType.id]
}