[Konversation-devel] Review Request 126436: Fix "Close All Open Queries" action
Anselmo L. S. Melo
anselmolsm at gmail.com
Sun Dec 20 23:24:00 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126436/
-----------------------------------------------------------
(Updated Dec. 20, 2015, 11:24 p.m.)
Status
------
This change has been marked as submitted.
Review request for Konversation, Eli MacKenzie, Edward Baker, and Eike Hein.
Changes
-------
Submitted with commit 359d7cf6dcc597a73cedd53e938cee3255525e92 by Anselmo L. S. Melo to branch 1.6.
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/71a1ca2a/attachment.html>
More information about the Konversation-devel
mailing list