Skip to content

Commit

Permalink
style: Code format clean[009312]
Browse files Browse the repository at this point in the history
  • Loading branch information
Greedysky committed Mar 23, 2024
1 parent 9d4c92c commit 94bac56
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions TTKModule/TTKNetwork/TTKSocket/tcpclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ private Q_SLOTS:
void disConnect();

private:
using QTcpSocket::readData;

int m_clientID;

};
Expand Down
5 changes: 4 additions & 1 deletion TTKModule/TTKNetwork/TTKSocket/tcpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ void TcpServer::closeAllClient()
client->close();
}
}

#if TTK_QT_VERSION_CHECK(5,0,0)
void TcpServer::incomingConnection(qintptr handle)
#else
void TcpServer::incomingConnection(int handle)
#endif
{
TcpClient *client = new TcpClient(handle, this);
client->setSocketDescriptor(handle);
Expand Down
6 changes: 5 additions & 1 deletion TTKModule/TTKNetwork/TTKSocket/tcpserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ private Q_SLOTS:
void clientDisConnectChanged(const ClientData &pair);

private:
void incomingConnection(int handle);
#if TTK_QT_VERSION_CHECK(5,0,0)
virtual void incomingConnection(qintptr handle) override;
#else
virtual void incomingConnection(int handle) override;
#endif

QList<TcpClient*> m_clientList;

Expand Down

0 comments on commit 94bac56

Please sign in to comment.