Skip to content
Commit 8c70600f authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[effects] Clean up effect_order in unloadAllEffects

Summary:
EffectsHandlerImpl::unloadAllEffects can be very useful when writing
tests, e.g.:

    auto effectsImpl = qobect_cast<EffectsHandlerImpl *>(effects);
    QVERIFY(effectsImpl);

    effectsImpl->unloadAllEffects();
    QVERIFY(effectsImpl->loadEffect(QStringLiteral("kwin5_effect_foobar")));

but because unloadAllEffects doesn't clean up effect_order, the old
effects can be re-added back into loaded_effects when a new effect is
loaded. Such behavior can result in a segfault.

Test Plan: Existing tests pass.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17283
parent 3ad9ac72
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment