Commit a7d1b0d9 authored by David Edmundson's avatar David Edmundson Committed by David Edmundson
Browse files

[ksgrd] Correctly handle monitors list changing

If ksgrd changes the monitors then all IDs are invalid.
This can happen when a new device is plugged in and removed.

SensorObjects can remain valid and are re-matched up.
parent 757cedae
......@@ -96,6 +96,7 @@ void KSGRDIface::unsubscribe(const QString &sensorPath)
void KSGRDIface::updateMonitorsList()
KSGRD::SensorMgr->sendRequest(QStringLiteral("localhost"), QStringLiteral("monitors"), (KSGRD::SensorClient *)this, -1);
......@@ -218,6 +219,10 @@ void KSGRDIface::onSensorUpdated(int id, const QList<QByteArray> &answer)
if (answer.isEmpty() || id > m_sensorIds.count()) {
const QString sensorName =;
if (sensorName.isEmpty()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment