Changeset View
Changeset View
Standalone View
Standalone View
dataengines/systemmonitor/systemmonitor.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 75 | { | |||
---|---|---|---|---|---|
76 | DataEngine::SourceDict sources = containerDict(); | 76 | DataEngine::SourceDict sources = containerDict(); | ||
77 | DataEngine::SourceDict::iterator it = sources.begin(); | 77 | DataEngine::SourceDict::iterator it = sources.begin(); | ||
78 | 78 | | |||
79 | m_waitingFor = 0; | 79 | m_waitingFor = 0; | ||
80 | 80 | | |||
81 | while (it != sources.end()) { | 81 | while (it != sources.end()) { | ||
82 | m_waitingFor++; | 82 | m_waitingFor++; | ||
83 | QString sensorName = it.key(); | 83 | QString sensorName = it.key(); | ||
84 | KSGRD::SensorMgr->sendRequest( QStringLiteral("localhost"), sensorName, (KSGRD::SensorClient*)this, -1); | 84 | const int index = m_sensors.indexOf(sensorName); | ||
85 | KSGRD::SensorMgr->sendRequest( QStringLiteral("localhost"), sensorName, (KSGRD::SensorClient*)this, index); | ||||
85 | ++it; | 86 | ++it; | ||
86 | } | 87 | } | ||
87 | } | 88 | } | ||
88 | 89 | | |||
89 | void SystemMonitorEngine::answerReceived(int id, const QList<QByteArray> &answer) | 90 | void SystemMonitorEngine::answerReceived(int id, const QList<QByteArray> &answer) | ||
90 | { | 91 | { | ||
91 | if (id < -1) { | 92 | if (id < -1) { | ||
92 | if (answer.isEmpty() || m_sensors.count() <= (-id - 2)) { | 93 | if (answer.isEmpty() || m_sensors.count() <= (-id - 2)) { | ||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |