diff --git a/autotests/integration/effects/scripted_effects_test.cpp b/autotests/integration/effects/scripted_effects_test.cpp --- a/autotests/integration/effects/scripted_effects_test.cpp +++ b/autotests/integration/effects/scripted_effects_test.cpp @@ -90,6 +90,7 @@ public: ScriptedEffectWithDebugSpy(); bool load(const QString &name); + using AnimationEffect::AniMap; using AnimationEffect::state; signals: void testOutput(const QString &data); @@ -298,7 +299,7 @@ QCOMPARE(workspace()->activeClient(), c); { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 1); QCOMPARE(state.firstKey(), c->effectWindow()); const auto &animationsForWindow = state.first().first; @@ -324,7 +325,7 @@ c->setMinimized(true); { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 1); const auto &animationsForWindow = state.first().first; QCOMPARE(animationsForWindow.count(), animationCount); @@ -343,7 +344,7 @@ } c->setMinimized(false); { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 0); } } @@ -667,7 +668,7 @@ // initially, the test animation is at the source position { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 1); QCOMPARE(state.firstKey(), c->effectWindow()); const QList animations = state.first().first; @@ -689,7 +690,7 @@ QCOMPARE(effectOutputSpy.first().first(), QStringLiteral("ok")); { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 1); QCOMPARE(state.firstKey(), c->effectWindow()); const QList animations = state.first().first; @@ -704,10 +705,10 @@ QFETCH(bool, shouldTerminate); if (shouldTerminate) { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 0); } else { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 1); QCOMPARE(state.firstKey(), c->effectWindow()); const QList animations = state.first().first; @@ -744,7 +745,7 @@ // initially, the test animation should be at the start position { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 1); QCOMPARE(state.firstKey(), c->effectWindow()); const QList animations = state.first().first; @@ -757,7 +758,7 @@ QTest::qWait(250); { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 1); QCOMPARE(state.firstKey(), c->effectWindow()); const QList animations = state.first().first; @@ -777,7 +778,7 @@ QCOMPARE(effectOutputSpy.first().first(), QStringLiteral("ok")); { - const AnimationEffect::AniMap state = effect->state(); + const auto state = effect->state(); QCOMPARE(state.count(), 1); QCOMPARE(state.firstKey(), c->effectWindow()); const QList animations = state.first().first; diff --git a/libkwineffects/kwinanimationeffect.h b/libkwineffects/kwinanimationeffect.h --- a/libkwineffects/kwinanimationeffect.h +++ b/libkwineffects/kwinanimationeffect.h @@ -110,8 +110,6 @@ Q_OBJECT public: - typedef QMap< EffectWindow*, QPair, QRect> > AniMap; - enum Anchor { Left = 1<<0, Top = 1<<1, Right = 1<<2, Bottom = 1<<3, Horizontal = Left|Right, Vertical = Top|Bottom, Mouse = 1<<4 }; Q_ENUM(Anchor) @@ -376,7 +374,14 @@ virtual void genericAnimation( EffectWindow *w, WindowPaintData &data, float progress, uint meta ) {Q_UNUSED(w); Q_UNUSED(data); Q_UNUSED(progress); Q_UNUSED(meta);} - //Internal for unit tests + /** + * @internal + **/ + typedef QMap, QRect> > AniMap; + + /** + * @internal + **/ AniMap state() const; private: