Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/effects/wobbly_shade_test.cpp
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | |||||
91 | void WobblyWindowsShadeTest::init() | 91 | void WobblyWindowsShadeTest::init() | ||
92 | { | 92 | { | ||
93 | QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); | 93 | QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); | ||
94 | } | 94 | } | ||
95 | 95 | | |||
96 | void WobblyWindowsShadeTest::cleanup() | 96 | void WobblyWindowsShadeTest::cleanup() | ||
97 | { | 97 | { | ||
98 | Test::destroyWaylandConnection(); | 98 | Test::destroyWaylandConnection(); | ||
99 | EffectsHandlerImpl *e = static_cast<EffectsHandlerImpl*>(effects); | 99 | | ||
100 | while (!e->loadedEffects().isEmpty()) { | 100 | auto effectsImpl = static_cast<EffectsHandlerImpl *>(effects); | ||
101 | const QString effect = e->loadedEffects().first(); | 101 | effectsImpl->unloadAllEffects(); | ||
102 | e->unloadEffect(effect); | 102 | QVERIFY(effectsImpl->loadedEffects().isEmpty()); | ||
103 | QVERIFY(!e->isEffectLoaded(effect)); | | |||
104 | } | | |||
105 | } | 103 | } | ||
106 | 104 | | |||
107 | struct XcbConnectionDeleter | 105 | struct XcbConnectionDeleter | ||
108 | { | 106 | { | ||
109 | static inline void cleanup(xcb_connection_t *pointer) | 107 | static inline void cleanup(xcb_connection_t *pointer) | ||
110 | { | 108 | { | ||
111 | xcb_disconnect(pointer); | 109 | xcb_disconnect(pointer); | ||
112 | } | 110 | } | ||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |