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();