[Konversation-devel] [Bug 189401] two AWAY commands are sent to the server with /away and /back

Travis McHenry wordsizzle at gmail.com
Fri Apr 17 07:37:47 CEST 2009


https://bugs.kde.org/show_bug.cgi?id=189401





--- Comment #1 from Travis McHenry <wordsizzle gmail com>  2009-04-17 07:31:47 ---
Created an attachment (id=32883)
 --> (http://bugs.kde.org/attachment.cgi?id=32883)
fixes the bug by adding checks

Took me awhile to track this down, I made notes to help so I'll just copy those
to explain what I saw/did.

on /away:
setAway emits awayState
connect(server, SIGNAL(awayState(bool)), this,
SIGNAL(connectionChangedAwayState(bool)));
connect(m_connectionManager, SIGNAL(connectionChangedAwayState(bool)),
m_awayManager, SLOT(updateGlobalAwayAction(bool)));
updateGlobalAwayAction runs: awayAction->setChecked(true);
connect(awayAction, SIGNAL(toggled(bool)),
KonversationApplication::instance()->getAwayManager(),
SLOT(toggleGlobalAway(bool)));
toggleGlobalAway runs: requestAll(un)Away();
which calls setAway again.

Explanation: When the checkbox is updated with the new state, it runs the
action as if the user asked for it.

Solution: Add checks to toggleGlobalAway.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Konversation-devel mailing list