From 15658e336e73987796734f2dba55367afa4d0e6c Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Fri, 17 Sep 2010 06:39:20 +0000 Subject: don't send two packets instead of one to change the presence to available with status online --- examples/GuiClient/mainDialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/GuiClient/mainDialog.cpp') diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp index 5e463ef7..2e8e360b 100644 --- a/examples/GuiClient/mainDialog.cpp +++ b/examples/GuiClient/mainDialog.cpp @@ -287,10 +287,11 @@ void mainDialog::presenceTypeChanged(QXmppPresence::Type presenceType) m_xmppClient.disconnectFromServer(); showSignInPageAfterUserDisconnection(); } - else + else if(presenceType == QXmppPresence::Available) { QXmppPresence newPresence = m_xmppClient.clientPresence(); newPresence.setType(presenceType); + newPresence.status().setType(QXmppPresence::Status::Online); m_xmppClient.setClientPresence(newPresence); } m_statusWidget.setStatusText( -- cgit v1.2.3