Commit 6740db7a authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[autotests] Use unloadAllEffects

Test Plan: The tests still pass.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18383
parent 8877dff7
......@@ -185,12 +185,11 @@ void ScriptedEffectsTest::init()
void ScriptedEffectsTest::cleanup()
{
Test::destroyWaylandConnection();
auto *e = static_cast<EffectsHandlerImpl*>(effects);
while (!e->loadedEffects().isEmpty()) {
const QString effect = e->loadedEffects().first();
e->unloadEffect(effect);
QVERIFY(!e->isEffectLoaded(effect));
}
auto effectsImpl = static_cast<EffectsHandlerImpl *>(effects);
effectsImpl->unloadAllEffects();
QVERIFY(effectsImpl->loadedEffects().isEmpty());
KWin::VirtualDesktopManager::self()->setCurrent(1);
}
......
......@@ -96,12 +96,10 @@ void WobblyWindowsShadeTest::init()
void WobblyWindowsShadeTest::cleanup()
{
Test::destroyWaylandConnection();
EffectsHandlerImpl *e = static_cast<EffectsHandlerImpl*>(effects);
while (!e->loadedEffects().isEmpty()) {
const QString effect = e->loadedEffects().first();
e->unloadEffect(effect);
QVERIFY(!e->isEffectLoaded(effect));
}
auto effectsImpl = static_cast<EffectsHandlerImpl *>(effects);
effectsImpl->unloadAllEffects();
QVERIFY(effectsImpl->loadedEffects().isEmpty());
}
struct XcbConnectionDeleter
......
Markdown is supported
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