diff options
Diffstat (limited to 'examples/webchannel/chatserver-cpp/chatserver.cpp')
-rw-r--r-- | examples/webchannel/chatserver-cpp/chatserver.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/webchannel/chatserver-cpp/chatserver.cpp b/examples/webchannel/chatserver-cpp/chatserver.cpp index 0678dc5..beee713 100644 --- a/examples/webchannel/chatserver-cpp/chatserver.cpp +++ b/examples/webchannel/chatserver-cpp/chatserver.cpp @@ -57,7 +57,7 @@ ChatServer::ChatServer(QObject *parent) : QObject(parent) { - QTimer* t = new QTimer(this); + QTimer *t = new QTimer(this); connect(t, &QTimer::timeout, this, &ChatServer::sendKeepAlive); t->start(10000); @@ -71,7 +71,7 @@ ChatServer::~ChatServer() {} -bool ChatServer::login(const QString& userName) +bool ChatServer::login(const QString &userName) { //stop keepAliveCheck, when a new user logged in if (m_keepAliveCheckTimer->isActive()) { @@ -91,7 +91,7 @@ bool ChatServer::login(const QString& userName) return true; } -bool ChatServer::logout(const QString& userName) +bool ChatServer::logout(const QString &userName) { if (!m_userList.contains(userName)) { return false; @@ -103,7 +103,7 @@ bool ChatServer::logout(const QString& userName) } } -bool ChatServer::sendMessage(const QString& user, const QString& msg) +bool ChatServer::sendMessage(const QString &user, const QString &msg) { if (m_userList.contains(user)) { emit newMessage(QTime::currentTime().toString("HH:mm:ss"), user, msg); @@ -128,7 +128,7 @@ void ChatServer::checkKeepAliveResponses() emit userListChanged(); } -void ChatServer::keepAliveResponse(const QString& user) +void ChatServer::keepAliveResponse(const QString &user) { m_stillAliveUsers.append(user); } |