Changeset View
Changeset View
Standalone View
Standalone View
dataengines/systemmonitor/systemmonitor.cpp
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | 45 | | |||
46 | void SystemMonitorEngine::updateMonitorsList() | 46 | void SystemMonitorEngine::updateMonitorsList() | ||
47 | { | 47 | { | ||
48 | KSGRD::SensorMgr->sendRequest(QStringLiteral("localhost"), QStringLiteral("monitors"), (KSGRD::SensorClient*)this, -1); | 48 | KSGRD::SensorMgr->sendRequest(QStringLiteral("localhost"), QStringLiteral("monitors"), (KSGRD::SensorClient*)this, -1); | ||
49 | } | 49 | } | ||
50 | 50 | | |||
51 | QStringList SystemMonitorEngine::sources() const | 51 | QStringList SystemMonitorEngine::sources() const | ||
52 | { | 52 | { | ||
53 | #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) | ||||
53 | return m_sensors.toList(); | 54 | return m_sensors.toList(); | ||
55 | #else | ||||
56 | return QList<QString>(m_sensors.begin(), m_sensors.end()); | ||||
57 | #endif | ||||
54 | } | 58 | } | ||
55 | 59 | | |||
56 | bool SystemMonitorEngine::sourceRequestEvent(const QString &name) | 60 | bool SystemMonitorEngine::sourceRequestEvent(const QString &name) | ||
57 | { | 61 | { | ||
58 | setData(name, DataEngine::Data()); | 62 | setData(name, DataEngine::Data()); | ||
59 | return true; | 63 | return true; | ||
60 | } | 64 | } | ||
61 | 65 | | |||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |