Changeset View
Changeset View
Standalone View
Standalone View
effects.cpp
Show First 20 Lines • Show All 1411 Lines • ▼ Show 20 Line(s) | 1410 | if (!effectName.isNull()) { | |||
---|---|---|---|---|---|
1412 | m_effectLoader->loadEffect(effectName); | 1412 | m_effectLoader->loadEffect(effectName); | ||
1413 | } | 1413 | } | ||
1414 | } | 1414 | } | ||
1415 | 1415 | | |||
1416 | void EffectsHandlerImpl::effectsChanged() | 1416 | void EffectsHandlerImpl::effectsChanged() | ||
1417 | { | 1417 | { | ||
1418 | loaded_effects.clear(); | 1418 | loaded_effects.clear(); | ||
1419 | m_activeEffects.clear(); // it's possible to have a reconfigure and a quad rebuild between two paint cycles - bug #308201 | 1419 | m_activeEffects.clear(); // it's possible to have a reconfigure and a quad rebuild between two paint cycles - bug #308201 | ||
1420 | // qDebug() << "Recreating effects' list:"; | 1420 | | ||
1421 | for (const EffectPair & effect : effect_order) { | 1421 | loaded_effects.reserve(effect_order.count()); | ||
1422 | // qDebug() << effect.first; | 1422 | std::copy(effect_order.constBegin(), effect_order.constEnd(), | ||
1423 | loaded_effects.append(effect); | 1423 | std::back_inserter(loaded_effects)); | ||
1424 | } | 1424 | | ||
1425 | m_activeEffects.reserve(loaded_effects.count()); | 1425 | m_activeEffects.reserve(loaded_effects.count()); | ||
1426 | } | 1426 | } | ||
1427 | 1427 | | |||
1428 | QStringList EffectsHandlerImpl::activeEffects() const | 1428 | QStringList EffectsHandlerImpl::activeEffects() const | ||
1429 | { | 1429 | { | ||
1430 | QStringList ret; | 1430 | QStringList ret; | ||
1431 | for(QVector< KWin::EffectPair >::const_iterator it = loaded_effects.constBegin(), | 1431 | for(QVector< KWin::EffectPair >::const_iterator it = loaded_effects.constBegin(), | ||
1432 | end = loaded_effects.constEnd(); it != end; ++it) { | 1432 | end = loaded_effects.constEnd(); it != end; ++it) { | ||
▲ Show 20 Lines • Show All 633 Lines • Show Last 20 Lines |