summaryrefslogtreecommitdiffstats
path: root/src/network/socket
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-12 13:55:57 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-12 13:55:57 (GMT)
commit41cbfc5c8e6644ab21e92860db95b2e8da9aba6a (patch)
tree3629877036a08414a969d6f2693d7f5970dd62c3 /src/network/socket
parent47760d59d57f548d5816ae43e456c86e01146491 (diff)
parentbd11cdf472674af3b00d7d64c64023adbf5ee725 (diff)
downloadQt-41cbfc5c8e6644ab21e92860db95b2e8da9aba6a.zip
Qt-41cbfc5c8e6644ab21e92860db95b2e8da9aba6a.tar.gz
Qt-41cbfc5c8e6644ab21e92860db95b2e8da9aba6a.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (158 commits) qdoc: Yet another revision of the top doc page. Doc: Update on web template Added QDateTime::msecsTo() Doc: Fixed tables and images for the new docs qdoc: Yet another revision of the top doc page. Revert "Improve QUrl handling of local file paths" Revert "[QNAM FTP] Check for the "ftp" scheme case-insensitively" Revert "QUrl::fromLocalFile: fix silly mistake: it's fromNativeSeparators, not to" Revert "Use QUrl::isLocalFile and fix the scheme checking in local URLs." qdoc: Another revision of the top doc page. Doc correction to css Doc: Updates to the html template and javascript tst_SuiteTest: Fix a meaningless switch statement My 4.7.0 changelog entries. qdoc: Fixed annotated list generation to use <td>, not <th>. Doc: Tuning search script qdoc: Reorganized examples panel. Doc: Chages to search feature, css and table order QtDeclarative: avoid waiting for a network load on URIs with empty schemes. QtDeclarative: RFC 3986 requires schemes to be considered case-insensitively ...
Diffstat (limited to 'src/network/socket')
-rw-r--r--src/network/socket/qtcpserver.cpp18
-rw-r--r--src/network/socket/qtcpserver.h1
2 files changed, 18 insertions, 1 deletions
diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp
index 932126d..55f926d 100644
--- a/src/network/socket/qtcpserver.cpp
+++ b/src/network/socket/qtcpserver.cpp
@@ -562,7 +562,7 @@ QTcpSocket *QTcpServer::nextPendingConnection()
to the other thread and create the QTcpSocket object there and
use its setSocketDescriptor() method.
- \sa newConnection(), nextPendingConnection()
+ \sa newConnection(), nextPendingConnection(), addPendingConnection()
*/
void QTcpServer::incomingConnection(int socketDescriptor)
{
@@ -572,6 +572,22 @@ void QTcpServer::incomingConnection(int socketDescriptor)
QTcpSocket *socket = new QTcpSocket(this);
socket->setSocketDescriptor(socketDescriptor);
+ addPendingConnection(socket);
+}
+
+/*!
+ This function is called by QTcpServer::incomingConnection()
+ to add a socket to the list of pending incoming connections.
+
+ \note Don't forget to call this member from reimplemented
+ incomingConnection() if you do not want to break the
+ Pending Connections mechanism.
+
+ \sa incomingConnection()
+ \since 4.7
+*/
+void QTcpServer::addPendingConnection(QTcpSocket* socket)
+{
d_func()->pendingConnections.append(socket);
}
diff --git a/src/network/socket/qtcpserver.h b/src/network/socket/qtcpserver.h
index 7aebffe..b206678 100644
--- a/src/network/socket/qtcpserver.h
+++ b/src/network/socket/qtcpserver.h
@@ -93,6 +93,7 @@ public:
protected:
virtual void incomingConnection(int handle);
+ void addPendingConnection(QTcpSocket* socket);
Q_SIGNALS:
void newConnection();