This is a slightly tricky one, as I haven't found a 100% guaranteed way to reproduce it, but the way outlined below nearly always seems to work for me. The example: If I set a gabble/jabber account to presence state "invisible", it sometimes appears on the presence applet as that, even though gabble/jabber doesn't support the status invisible, and MC cascades to Busy instead. Reproduce: Set a gabble/jabber account to "online". Once it has come online, set it to "invisible". This may stay at invisible, or change quickly to "busy". If it stays at "invisible", you can see the bug already :). If it changes to "busy", then set it to "invisible" again. This time it normally stays at "invisible" even though the account is actually set to "busy".
Using a timer to set up a timeout for the updating presence msg. Sometimes when we try to set up an invalid presence status (like some xmpp server that doesn't supports invisible presence) the data engine will not emit any presence changed signal and the applet will wait forever for that signal. This timer will avoid this blocking situation. So when it timeouts the applet will return to the last presence status. BUG: 203344 BUG: 203345 M +17 -1 presencewidget.cpp M +2 -0 presencewidget.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1010985