[Konversation-devel] Review Request 126436: Fix "Close All Open Queries" action

Eike Hein hein at kde.org
Sun Dec 20 23:08:19 UTC 2015



> On Dec. 20, 2015, 10:16 p.m., Eike Hein wrote:
> > Thank you for a comprehensive patch description!
> 
> Anselmo L. S. Melo wrote:
>     Thanks! Should I push this patch to branch 1.6, then merge to master?

Yep!


- Eike


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126436/#review89785
-----------------------------------------------------------


On Dec. 20, 2015, 8:18 p.m., Anselmo L. S. Melo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126436/
> -----------------------------------------------------------
> 
> (Updated Dec. 20, 2015, 8:18 p.m.)
> 
> 
> Review request for Konversation, Eli MacKenzie, Edward Baker, and Eike Hein.
> 
> 
> Repository: konversation
> 
> 
> Description
> -------
> 
> After the first use of "Close All Open Queries", the enabled state of
> this action becomes inconsistent. This happens because:
> 
> When "Close All Open Queries" is executed
>  - closeQueries() sets m_queryViewCount to zero
>  - cleanupAfterClose() is called by each query that is being closed.
>    This slot decrements m_queryViewCount.
> 
> So, with n open queries, closeQueries() sets m_queryViewCount to zero,
> then n calls to cleanupAfterClose() decrements m_queryViewCount, resulting
> in a negative value. After that, "Close All Open Queries" enabled state
> is not properly updated anymore.
> 
> This patch removes the m_queryViewCount = 0 from closeQueries(), leaving
> the task of updating this counter to cleanupAfterClose().
> 
> 
> Diffs
> -----
> 
>   src/viewer/viewcontainer.cpp 8a384542412be05f8c858d5ba502f5238d4834bf 
> 
> Diff: https://git.reviewboard.kde.org/r/126436/diff/
> 
> 
> Testing
> -------
> 
> Opened and closed queries several times, closing them individually and also using "Close All Open Queries". With debug messages added to the code, I could verify that m_queryViewCount was being properly updated.
> 
> 
> Thanks,
> 
> Anselmo L. S. Melo
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konversation-devel/attachments/20151220/0f404ff2/attachment-0001.html>


More information about the Konversation-devel mailing list