From df0944281200b923a1734615aff8d212c0ecd735 Mon Sep 17 00:00:00 2001 From: feiyangqingyun Date: Mon, 16 Dec 2019 13:38:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nettool/api/tcpserver.cpp | 4 ++++ nettool/api/tcpserver.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/nettool/api/tcpserver.cpp b/nettool/api/tcpserver.cpp index 1eb3aac..a526995 100644 --- a/nettool/api/tcpserver.cpp +++ b/nettool/api/tcpserver.cpp @@ -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); diff --git a/nettool/api/tcpserver.h b/nettool/api/tcpserver.h index b650b6d..0c5327d 100644 --- a/nettool/api/tcpserver.h +++ b/nettool/api/tcpserver.h @@ -42,7 +42,11 @@ private: QList 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();