Version: 1.1.75+ build 3400 (using KDE 4.2.2) Compiler: gcc 4.3.3 OS: Linux Installed from: Compiled From Sources When using /away and /back in order to set/unset my status on IRC as away, two AWAY commands are sent to the server instead of just one. If I once type "/away afk", Konversation will display: [Away] You are now marked as being away. [Away] You are now marked as being away. And in the raw log: << AWAY :afk << AWAY :Gone away for now When typing "/back" in order to unset the away status, Konversation displays: [Away] You are no longer marked as being away. [Away] You are not marked as being away. And the raw log: << AWAY << AWAY
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).