Changeset View
Changeset View
Standalone View
Standalone View
src/plasma/dataengine.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | 122 | d->connectSource(s, visualization, pollingInterval, intervalAlignment, | |||
---|---|---|---|---|---|
123 | !newSource || pollingInterval > 0); | 123 | !newSource || pollingInterval > 0); | ||
124 | //qCDebug(LOG_PLASMA) << " ==> source connected"; | 124 | //qCDebug(LOG_PLASMA) << " ==> source connected"; | ||
125 | } | 125 | } | ||
126 | } | 126 | } | ||
127 | 127 | | |||
128 | void DataEngine::connectAllSources(QObject *visualization, uint pollingInterval, | 128 | void DataEngine::connectAllSources(QObject *visualization, uint pollingInterval, | ||
129 | Plasma::Types::IntervalAlignment intervalAlignment) const | 129 | Plasma::Types::IntervalAlignment intervalAlignment) const | ||
130 | { | 130 | { | ||
131 | foreach (DataContainer *s, d->sources) { | 131 | for (DataContainer *s : qAsConst(d->sources)) { | ||
132 | d->connectSource(s, visualization, pollingInterval, intervalAlignment); | 132 | d->connectSource(s, visualization, pollingInterval, intervalAlignment); | ||
133 | } | 133 | } | ||
134 | } | 134 | } | ||
135 | 135 | | |||
136 | void DataEngine::disconnectSource(const QString &source, QObject *visualization) const | 136 | void DataEngine::disconnectSource(const QString &source, QObject *visualization) const | ||
137 | { | 137 | { | ||
138 | DataContainer *s = d->source(source, false); | 138 | DataContainer *s = d->source(source, false); | ||
139 | 139 | | |||
▲ Show 20 Lines • Show All 242 Lines • ▼ Show 20 Line(s) | 377 | while (it.hasNext()) { | |||
382 | } | 382 | } | ||
383 | } | 383 | } | ||
384 | 384 | | |||
385 | d->scheduleSourcesUpdated(); | 385 | d->scheduleSourcesUpdated(); | ||
386 | } | 386 | } | ||
387 | 387 | | |||
388 | void DataEngine::forceImmediateUpdateOfAllVisualizations() | 388 | void DataEngine::forceImmediateUpdateOfAllVisualizations() | ||
389 | { | 389 | { | ||
390 | foreach (DataContainer *source, d->sources) { | 390 | for (DataContainer *source : qAsConst(d->sources)) { | ||
391 | if (source->isUsed()) { | 391 | if (source->isUsed()) { | ||
392 | source->forceImmediateUpdate(); | 392 | source->forceImmediateUpdate(); | ||
393 | } | 393 | } | ||
394 | } | 394 | } | ||
395 | } | 395 | } | ||
396 | 396 | | |||
397 | Package DataEngine::package() const | 397 | Package DataEngine::package() const | ||
398 | { | 398 | { | ||
▲ Show 20 Lines • Show All 246 Lines • Show Last 20 Lines |