Skip to content

Commit 63dcadc

Browse files
committed
update tutorial picture
1 parent e1030f4 commit 63dcadc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/QT/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Demo clip](https://cldup.com/5Lozg7laKG.gif)
1+
![Demo shot](https://cldup.com/K2wREmuErz.png)
22

33
In this tutorial we’ll learn how to create a QT chat application that communicates with a [Socket.IO Node.JS chat server](https://github.com/Automattic/socket.io/tree/master/examples/chat).
44

examples/QT/SioChatDemo/mainwindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ void MainWindow::OnNewMessage(std::string const& name,message::ptr const& data,b
132132
if(data->get_flag() == message::flag_object)
133133
{
134134
std::string msg = data->get_map()["message"]->get_string();
135-
std::string name = data->get_map()["username"]->get_string();
136-
QString label = QString::fromUtf8(name.data(),name.length());
135+
std::string username = data->get_map()["username"]->get_string();
136+
QString label = QString::fromUtf8(username.data(),username.length());
137137
label.append(':');
138138
label.append(QString::fromUtf8(msg.data(),msg.length()));
139139
QListWidgetItem *item= new QListWidgetItem(label);

0 commit comments

Comments
 (0)