<table><tr><td style="">aacid created this revision.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8964" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Bug #1: If you call show() or setVisible() after animatedHide() nothing would happen</p>

<p>This is because animatedHide() does<br />
        d->content->move(0, -d->content->height());<br />
so it's moving the contents outside the view. To fix that we what the Show event<br />
and if the height or the contents position are not the "correct" ones we set them.<br />
There's an exception for that which is when show comes from animatedShow() so we<br />
use a guard variable for that.</p>

<p>Also added a test for this</p>

<p>Bug #2: If you call animatedShow() while animation for animatedHide() was running things would break</p>

<p>This is because animationShow() was did. If hideAnimmation running, stop it,<br />
then if visible and no animation running, asume we're done. The problem is that isVisible is not<br />
enough for "it's totally visible", now we also check for height and content pos to be the fully<br />
visible one before saying it's done and doing an early return.</p>

<p>There was a test for this already, but the test wasn't good enough since it was only checking for<br />
visible and not for height and content position.</p>

<p>Along with this i also improved the tests making the visible/not visible checks more thorough<br />
and replacing some busy waits with QTRY_VERIFY</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Tests pass<br />
Now in okular the message widgets show correctly after calling show() on them after the user pressed the [x]</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R236 KWidgetsAddons</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8964" rel="noreferrer">https://phabricator.kde.org/D8964</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/kmessagewidgetautotest.cpp<br />
autotests/kmessagewidgetautotest.h<br />
src/kmessagewidget.cpp</div></div></div><br /><div><strong>To: </strong>aacid<br /><strong>Cc: </strong>Frameworks<br /></div>