Skip to content

Commit 3500e7b

Browse files
author
Vincent Raman
committed
Adapted QT demo to ack change
1 parent df7638e commit 3500e7b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

examples/QT/SioChatDemo/mainwindow.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void MainWindow::RemoveListItem(QListWidgetItem* item)
137137
}
138138

139139

140-
void MainWindow::OnNewMessage(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp)
140+
void MainWindow::OnNewMessage(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp)
141141
{
142142

143143
if(data->get_flag() == message::flag_object)
@@ -152,7 +152,7 @@ void MainWindow::OnNewMessage(std::string const& name,message::ptr const& data,b
152152
}
153153
}
154154

155-
void MainWindow::OnUserJoined(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp)
155+
void MainWindow::OnUserJoined(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp)
156156
{
157157
if(data->get_flag() == message::flag_object)
158158
{
@@ -181,7 +181,7 @@ void MainWindow::OnUserJoined(std::string const& name,message::ptr const& data,b
181181

182182
}
183183

184-
void MainWindow::OnUserLeft(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp)
184+
void MainWindow::OnUserLeft(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp)
185185
{
186186
if(data->get_flag() == message::flag_object)
187187
{
@@ -209,7 +209,7 @@ void MainWindow::OnUserLeft(std::string const& name,message::ptr const& data,boo
209209
}
210210
}
211211

212-
void MainWindow::OnTyping(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp)
212+
void MainWindow::OnTyping(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp)
213213
{
214214
if(m_typingItem == NULL)
215215
{
@@ -223,7 +223,7 @@ void MainWindow::OnTyping(std::string const& name,message::ptr const& data,bool
223223
}
224224
}
225225

226-
void MainWindow::OnStopTyping(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp)
226+
void MainWindow::OnStopTyping(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp)
227227
{
228228
if(m_typingItem != NULL)
229229
{
@@ -232,7 +232,7 @@ void MainWindow::OnStopTyping(std::string const& name,message::ptr const& data,b
232232
}
233233
}
234234

235-
void MainWindow::OnLogin(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp)
235+
void MainWindow::OnLogin(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp)
236236
{
237237
Q_EMIT RequestToggleInputs(true);
238238
int numUser = data->get_map()["numUsers"]->get_int();

examples/QT/SioChatDemo/mainwindow.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ private Q_SLOTS:
4141
void NicknameAccept();
4242
void NicknameCancelled();
4343
private:
44-
void OnNewMessage(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp);
45-
void OnUserJoined(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp);
46-
void OnUserLeft(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp);
47-
void OnTyping(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp);
48-
void OnStopTyping(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp);
49-
void OnLogin(std::string const& name,message::ptr const& data,bool hasAck,message::ptr &ack_resp);
44+
void OnNewMessage(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp);
45+
void OnUserJoined(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp);
46+
void OnUserLeft(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp);
47+
void OnTyping(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp);
48+
void OnStopTyping(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp);
49+
void OnLogin(std::string const& name,message::ptr const& data,bool hasAck,message::list &ack_resp);
5050
void OnConnected(std::string const& nsp);
5151
void OnClosed(client::close_reason const& reason);
5252
void OnFailed();

0 commit comments

Comments
 (0)