Changeset View
Changeset View
Standalone View
Standalone View
src/plasma/dataengine.cpp
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 131 | d->connectSource(s, visualization, pollingInterval, intervalAlignment, | |||
---|---|---|---|---|---|
132 | !newSource || pollingInterval > 0); | 132 | !newSource || pollingInterval > 0); | ||
133 | //qCDebug(LOG_PLASMA) << " ==> source connected"; | 133 | //qCDebug(LOG_PLASMA) << " ==> source connected"; | ||
134 | } | 134 | } | ||
135 | } | 135 | } | ||
136 | 136 | | |||
137 | void DataEngine::connectAllSources(QObject *visualization, uint pollingInterval, | 137 | void DataEngine::connectAllSources(QObject *visualization, uint pollingInterval, | ||
138 | Plasma::Types::IntervalAlignment intervalAlignment) const | 138 | Plasma::Types::IntervalAlignment intervalAlignment) const | ||
139 | { | 139 | { | ||
140 | foreach (DataContainer *s, d->sources) { | 140 | for (DataContainer *s : qAsConst(d->sources)) { | ||
141 | d->connectSource(s, visualization, pollingInterval, intervalAlignment); | 141 | d->connectSource(s, visualization, pollingInterval, intervalAlignment); | ||
142 | } | 142 | } | ||
143 | } | 143 | } | ||
144 | 144 | | |||
145 | void DataEngine::disconnectSource(const QString &source, QObject *visualization) const | 145 | void DataEngine::disconnectSource(const QString &source, QObject *visualization) const | ||
146 | { | 146 | { | ||
147 | DataContainer *s = d->source(source, false); | 147 | DataContainer *s = d->source(source, false); | ||
148 | 148 | | |||
▲ Show 20 Lines • Show All 242 Lines • ▼ Show 20 Line(s) | 386 | while (it.hasNext()) { | |||
391 | } | 391 | } | ||
392 | } | 392 | } | ||
393 | 393 | | |||
394 | d->scheduleSourcesUpdated(); | 394 | d->scheduleSourcesUpdated(); | ||
395 | } | 395 | } | ||
396 | 396 | | |||
397 | void DataEngine::forceImmediateUpdateOfAllVisualizations() | 397 | void DataEngine::forceImmediateUpdateOfAllVisualizations() | ||
398 | { | 398 | { | ||
399 | foreach (DataContainer *source, d->sources) { | 399 | for (DataContainer *source : qAsConst(d->sources)) { | ||
400 | if (source->isUsed()) { | 400 | if (source->isUsed()) { | ||
401 | source->forceImmediateUpdate(); | 401 | source->forceImmediateUpdate(); | ||
402 | } | 402 | } | ||
403 | } | 403 | } | ||
404 | } | 404 | } | ||
405 | 405 | | |||
406 | Package DataEngine::package() const | 406 | Package DataEngine::package() const | ||
407 | { | 407 | { | ||
▲ Show 20 Lines • Show All 246 Lines • Show Last 20 Lines |