From 228184f93b4d39e1aca9e53fde8e576f71b90c93 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 28 Aug 2017 13:35:35 +0200 Subject: Examples: Fix coding style issues Change-Id: Ifdd0a9117bc354c342728949e45d1ac431495ef4 Reviewed-by: Milian Wolff --- examples/webchannel/chatserver-cpp/chatserver.cpp | 10 +++++----- examples/webchannel/chatserver-cpp/chatserver.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'examples/webchannel/chatserver-cpp') 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); } diff --git a/examples/webchannel/chatserver-cpp/chatserver.h b/examples/webchannel/chatserver-cpp/chatserver.h index 74b571d..9bc8026 100644 --- a/examples/webchannel/chatserver-cpp/chatserver.h +++ b/examples/webchannel/chatserver-cpp/chatserver.h @@ -70,17 +70,17 @@ public: public: //a user logs in with the given username - Q_INVOKABLE bool login(const QString& userName); + Q_INVOKABLE bool login(const QString &userName); //the user logs out, will be removed from userlist immediately - Q_INVOKABLE bool logout(const QString& userName); + Q_INVOKABLE bool logout(const QString &userName); //a user sends a message to all other users - Q_INVOKABLE bool sendMessage(const QString& user, const QString& msg); + Q_INVOKABLE bool sendMessage(const QString &user, const QString &msg); //response of the keep alive signal from a client. // This is used to detect disconnects. - Q_INVOKABLE void keepAliveResponse(const QString& user); + Q_INVOKABLE void keepAliveResponse(const QString &user); QStringList userList() const; @@ -97,7 +97,7 @@ signals: private: QStringList m_userList; QStringList m_stillAliveUsers; - QTimer* m_keepAliveCheckTimer; + QTimer *m_keepAliveCheckTimer; }; #endif // CHATSERVER_H -- cgit v1.2.1