diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-17 06:39:20 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-17 06:39:20 +0000 |
| commit | 15658e336e73987796734f2dba55367afa4d0e6c (patch) | |
| tree | 6620aaf0b14729b7a43d000c3dd415b829139237 /examples/GuiClient | |
| parent | fa9a7cc8c1a657642af21da3c6f45cacf96b17a3 (diff) | |
| download | qxmpp-15658e336e73987796734f2dba55367afa4d0e6c.tar.gz | |
don't send two packets instead of one to change the presence to available with status online
Diffstat (limited to 'examples/GuiClient')
| -rw-r--r-- | examples/GuiClient/mainDialog.cpp | 3 | ||||
| -rw-r--r-- | examples/GuiClient/statusWidget.cpp | 1 |
2 files changed, 2 insertions, 2 deletions
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) |
