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 ++- examples/GuiClient/statusWidget.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/GuiClient') 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( diff --git a/examples/GuiClient/statusWidget.cpp b/examples/GuiClient/statusWidget.cpp index e6e9e1f9..e3e47940 100644 --- a/examples/GuiClient/statusWidget.cpp +++ b/examples/GuiClient/statusWidget.cpp @@ -69,7 +69,6 @@ void statusWidget::presenceMenuTriggered() if(action == actionAvailable) { emit presenceTypeChanged(QXmppPresence::Available); - emit presenceStatusTypeChanged(QXmppPresence::Status::Online); icon = "green"; } else if(action == actionBusy) -- cgit v1.2.3