Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
feiyangqingyun committed Dec 16, 2019
1 parent a36e06a commit ff16b64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nettool/api/tcpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ TcpServer::TcpServer(QObject *parent) : QTcpServer(parent)
{
}

#if (QT_VERSION > QT_VERSION_CHECK(5,0,0))
void TcpServer::incomingConnection(qintptr handle)
#else
void TcpServer::incomingConnection(int handle)
#endif
{
TcpClient *client = new TcpClient(this);
client->setSocketDescriptor(handle);
Expand Down
4 changes: 4 additions & 0 deletions nettool/api/tcpserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ class TcpServer : public QTcpServer
QList<TcpClient *> clients;

protected:
#if (QT_VERSION > QT_VERSION_CHECK(5,0,0))
void incomingConnection(qintptr handle);
#else
void incomingConnection(int handle);
#endif

private slots:
void disconnected();
Expand Down

0 comments on commit ff16b64

Please sign in to comment.