| Summary: | two AWAY commands are sent to the server with /away and /back | ||
|---|---|---|---|
| Product: | [Applications] konversation | Reporter: | larvid |
| Component: | general | Assignee: | Konversation Bugs <konversation-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | hein |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Bug Depends on: | |||
| Bug Blocks: | 187307 | ||
| Attachments: | fixes the bug by adding checks | ||
|
Description
larvid
2009-04-11 20:53:10 UTC
Created attachment 32883 [details]
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.
Fixed in SVN rev 955470 (using a simpler approach that just takes care of the underlying porting fallout - the behavior of the toggled(bool) signal for toggle actions has effectively changed between KDE 3 and 4; triggered(bool) is the right one to use here now). |