aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient/mainDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/GuiClient/mainDialog.cpp')
-rw-r--r--examples/GuiClient/mainDialog.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp
index 75b74424..d6c8e24b 100644
--- a/examples/GuiClient/mainDialog.cpp
+++ b/examples/GuiClient/mainDialog.cpp
@@ -738,3 +738,16 @@ void mainDialog::presenceReceived(const QXmppPresence& presence)
QMessageBox::information(this, "Contact Subscription", message.arg(from),
QMessageBox::Ok);
}
+
+void mainDialog::action_removeContact(const QString& bareJid)
+{
+ // TODO: check valid bareJid
+
+ QXmppRosterIq remove;
+ remove.setType(QXmppIq::Set);
+ QXmppRosterIq::Item itemRemove;
+ itemRemove.setSubscriptionType(QXmppRosterIq::Item::Remove);
+ itemRemove.setBareJid(bareJid);
+ remove.addItem(itemRemove);
+ m_xmppClient.sendPacket(remove);
+}