Fixes examples/tests to use qinptr in QTcpServer::incomingConnection.
authorJonas M. Gastal <jgastal@profusion.mobi>
Wed, 11 Jan 2012 15:06:14 +0000 (13:06 -0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 13 Jan 2012 19:55:00 +0000 (20:55 +0100)
This is a fix for problems introduced by bf7f170.

Change-Id: If5dd8e031ef2efea578b3efb188c2e950e1ba41a
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
14 files changed:
dist/changes-5.0.0
doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
examples/network/network-chat/server.cpp
examples/network/network-chat/server.h
examples/network/threadedfortuneserver/fortuneserver.cpp
examples/network/threadedfortuneserver/fortuneserver.h
examples/network/torrent/torrentserver.cpp
examples/network/torrent/torrentserver.h
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
tests/auto/network/socket/qtcpsocket/stressTest/Test.h
tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
tests/baselineserver/src/baselineserver.cpp
tests/baselineserver/src/baselineserver.h

index f45e112..e870943 100644 (file)
@@ -155,6 +155,8 @@ information about a particular change.
 - QAbstractSocket's connectToHost() and disconnectFromHost() are now virtual and
   connectToHostImplementation() and disconnectFromHostImplementation() don't exist.
 
+- QTcpServer::incomingConnection() now takes a qintptr instead of an int.
+
 
 ****************************************************************************
 *                           General                                        *
index 0088a0f..24365a3 100644 (file)
@@ -47,7 +47,7 @@ socket->connectToHostEncrypted("imap.example.com", 993);
 
 
 //! [1]
-void SslServer::incomingConnection(int socketDescriptor)
+void SslServer::incomingConnection(qintptr socketDescriptor)
 {
     QSslSocket *serverSocket = new QSslSocket;
     if (serverSocket->setSocketDescriptor(socketDescriptor)) {
index 5f545d3..f27cfa3 100644 (file)
@@ -49,7 +49,7 @@ Server::Server(QObject *parent)
     listen(QHostAddress::Any);
 }
 
-void Server::incomingConnection(int socketDescriptor)
+void Server::incomingConnection(qintptr socketDescriptor)
 {
     Connection *connection = new Connection(this);
     connection->setSocketDescriptor(socketDescriptor);
index feb57dc..8222bd3 100644 (file)
@@ -56,7 +56,7 @@ signals:
     void newConnection(Connection *connection);
 
 protected:
-    void incomingConnection(int socketDescriptor);
+    void incomingConnection(qintptr socketDescriptor);
 };
 
 #endif
index 90fba14..9363497 100644 (file)
@@ -58,7 +58,7 @@ FortuneServer::FortuneServer(QObject *parent)
 //! [0]
 
 //! [1]
-void FortuneServer::incomingConnection(int socketDescriptor)
+void FortuneServer::incomingConnection(qintptr socketDescriptor)
 {
     QString fortune = fortunes.at(qrand() % fortunes.size());
     FortuneThread *thread = new FortuneThread(socketDescriptor, fortune, this);
index 470e868..8d1a6ed 100644 (file)
@@ -53,7 +53,7 @@ public:
     FortuneServer(QObject *parent = 0);
 
 protected:
-    void incomingConnection(int socketDescriptor);
+    void incomingConnection(qintptr socketDescriptor);
 
 private:
     QStringList fortunes;
index b9f76c4..ecc7ba0 100644 (file)
@@ -61,7 +61,7 @@ void TorrentServer::removeClient(TorrentClient *client)
     clients.removeAll(client);
 }
 
-void TorrentServer::incomingConnection(int socketDescriptor)
+void TorrentServer::incomingConnection(qintptr socketDescriptor)
 {
     PeerWireClient *client =
        new PeerWireClient(ConnectionManager::instance()->clientId(), this);
index abe48f8..fd939ae 100644 (file)
@@ -58,7 +58,7 @@ public:
     void removeClient(TorrentClient *client);
 
 protected:
-    void incomingConnection(int socketDescriptor);
+    void incomingConnection(qintptr socketDescriptor);
 
 private slots:
     void removeClient();
index a20a576..6fae97d 100644 (file)
@@ -485,7 +485,7 @@ public:
     }
 
 protected:
-    void incomingConnection(int socketDescriptor)
+    void incomingConnection(qintptr socketDescriptor)
     {
         //qDebug() << "incomingConnection" << socketDescriptor << "doSsl:" << doSsl << "ipv6:" << ipv6;
         if (!doSsl) {
@@ -807,7 +807,7 @@ public:
             return nextPendingConnection();
         }
     }
-    virtual void incomingConnection(int socketDescriptor)
+    virtual void incomingConnection(qintptr socketDescriptor)
     {
 #ifndef QT_NO_OPENSSL
         if (doSsl) {
@@ -4277,7 +4277,7 @@ class SslServer : public QTcpServer {
     Q_OBJECT
 public:
     SslServer() : socket(0) {};
-    void incomingConnection(int socketDescriptor) {
+    void incomingConnection(qintptr socketDescriptor) {
         QSslSocket *serverSocket = new QSslSocket;
         serverSocket->setParent(this);
 
index e17a167..a112966 100644 (file)
@@ -107,7 +107,7 @@ My4Server::My4Server(QObject *parent)
 }
 
 //------------------------------------------------------------------------------
-void My4Server::incomingConnection(int socketId)
+void My4Server::incomingConnection(qintptr socketId)
 {
     m_socket = new My4Socket(this);
     m_socket->setSocketDescriptor(socketId);
index c619454..3adcbe4 100644 (file)
@@ -69,7 +69,7 @@ public:
     My4Server(QObject *parent = 0);
 
 protected:
-    void incomingConnection(int socket);
+    void incomingConnection(qintptr socket);
 
 private slots:
     void stopServer();
index 73d3754..c2c234f 100644 (file)
@@ -912,7 +912,7 @@ public:
     QString m_certFile;
 
 protected:
-    void incomingConnection(int socketDescriptor)
+    void incomingConnection(qintptr socketDescriptor)
     {
         socket = new QSslSocket(this);
         socket->setProtocol(protocol);
@@ -1332,7 +1332,7 @@ void tst_QSslSocket::wildcard()
 class SslServer2 : public QTcpServer
 {
 protected:
-    void incomingConnection(int socketDescriptor)
+    void incomingConnection(qintptr socketDescriptor)
     {
         QSslSocket *socket = new QSslSocket(this);
         socket->ignoreSslErrors();
@@ -1558,7 +1558,7 @@ public:
     QSslSocket *socket;
 
 protected:
-    void incomingConnection(int socketDescriptor)
+    void incomingConnection(qintptr socketDescriptor)
     {
         socket = new QSslSocket(this);
         connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
@@ -1730,7 +1730,7 @@ public:
     QSslSocket *socket;
 
 protected:
-    void incomingConnection(int socketDescriptor)
+    void incomingConnection(qintptr socketDescriptor)
     {
         socket = new QSslSocket(this);
 
index 533ed5d..7adc335 100644 (file)
@@ -101,7 +101,7 @@ QString BaselineServer::settingsFilePath()
     return settingsFile;
 }
 
-void BaselineServer::incomingConnection(int socketDescriptor)
+void BaselineServer::incomingConnection(qintptr socketDescriptor)
 {
     QString runId = QDateTime::currentDateTime().toString(QLS("MMMdd-hhmmss"));
     if (runId == lastRunId) {
index b9b08b2..a6065cc 100644 (file)
@@ -69,7 +69,7 @@ public:
     static QString settingsFilePath();
 
 protected:
-    void incomingConnection(int socketDescriptor);
+    void incomingConnection(qintptr socketDescriptor);
 
 private slots:
     void heartbeat();