diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-14 03:47:08 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-14 03:47:08 (GMT) |
commit | 4af9cc043370846c52ec21cf874696ee650394c1 (patch) | |
tree | d3ac24631fb9e759e399042c65000fa5f0ee6ea9 /src/network | |
parent | 0def696a8d569f0895010706fb989e78b25c13c1 (diff) | |
parent | d2d4be2901ef1e377ea77b447632fe29d3adac33 (diff) | |
download | Qt-4af9cc043370846c52ec21cf874696ee650394c1.zip Qt-4af9cc043370846c52ec21cf874696ee650394c1.tar.gz Qt-4af9cc043370846c52ec21cf874696ee650394c1.tar.bz2 |
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration:
Revert change 07c347f54 from 4.6.
Implement some changes to the AIX xlC mkspec suggested by IBM.
Fixed app freeze if switching to offline in middle of HTTP transaction.
Document Symbian platform security requirements on Qt APIs
Fixed app freeze if switching to offline in middle of HTTP transaction.
CSS: fixes border only affecting the first widget.
Removed QtDeclarative.dll deployment from qt.iby in 4.6 branch.
fix closing state in QLocalSocket on Windows
Fix segfault, if QPixmap::loadFromData() fails
Don't build QtXmlPatterns' command line tools on Symbian.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 10 | ||||
-rw-r--r-- | src/network/socket/qlocalsocket_win.cpp | 10 | ||||
-rw-r--r-- | src/network/socket/qnativesocketengine_unix.cpp | 29 | ||||
-rw-r--r-- | src/network/socket/qtcpserver.cpp | 10 | ||||
-rw-r--r-- | src/network/socket/qtcpsocket.cpp | 10 | ||||
-rw-r--r-- | src/network/socket/qudpsocket.cpp | 10 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket.cpp | 10 |
7 files changed, 79 insertions, 10 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 197d89e..90afd2c 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -141,6 +141,16 @@ static void ensureInitialized() can be: \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 1 + \section1 Symbian Platform Security Requirements + + On Symbian, processes which use this class must have the + \c NetworkServices platform security capability. If the client + process lacks this capability, operations will result in a panic. + + Platform security capabilities are added via the + \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} + qmake variable. + \sa QNetworkRequest, QNetworkReply, QNetworkProxy */ diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 3283bf2..5f46ecb 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ -#include "qlocalsocket.h" #include "qlocalsocket_p.h" #include <private/qthread_p.h> @@ -425,6 +424,15 @@ bool QLocalSocket::flush() void QLocalSocket::disconnectFromServer() { Q_D(QLocalSocket); + + // Are we still connected? + if (!isValid()) { + // If we have unwritten data, the pipeWriter is still present. + // It must be destroyed before close() to prevent an infinite loop. + delete d->pipeWriter; + d->pipeWriter = 0; + } + flush(); if (d->pipeWriter && d->pipeWriter->bytesToWrite() != 0) { d->state = QLocalSocket::ClosingState; diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index 6c800fe..d155357 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -601,10 +601,15 @@ bool QNativeSocketEnginePrivate::nativeHasPendingDatagrams() const // Peek 0 bytes into the next message. The size of the message may // well be 0, so we can't check recvfrom's return value. ssize_t readBytes; +#ifdef Q_OS_SYMBIAN + char c; + readBytes = ::recvfrom(socketDescriptor, &c, 1, MSG_PEEK, &storage.a, &storageSize); +#else do { char c; readBytes = ::recvfrom(socketDescriptor, &c, 1, MSG_PEEK, &storage.a, &storageSize); } while (readBytes == -1 && errno == EINTR); +#endif // If there's no error, or if our buffer was too small, there must be a // pending datagram. @@ -661,11 +666,17 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxS sz = sizeof(aa); ssize_t recvFromResult = 0; +#ifdef Q_OS_SYMBIAN + char c; + recvFromResult = ::recvfrom(socketDescriptor, maxSize ? data : &c, maxSize ? maxSize : 1, + 0, &aa.a, &sz); +#else do { char c; recvFromResult = ::recvfrom(socketDescriptor, maxSize ? data : &c, maxSize ? maxSize : 1, 0, &aa.a, &sz); } while (recvFromResult == -1 && errno == EINTR); +#endif if (recvFromResult == -1) { setError(QAbstractSocket::NetworkError, ReceiveDatagramErrorString); @@ -832,17 +843,17 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len) // ignore the SIGPIPE signal qt_ignore_sigpipe(); - // loop while ::write() returns -1 and errno == EINTR, in case - // of an interrupting signal. ssize_t writtenBytes; - do { #ifdef Q_OS_SYMBIAN - writtenBytes = ::write(socketDescriptor, data, len); + // Symbian does not support signals natively and Open C returns EINTR when moving to offline + writtenBytes = ::write(socketDescriptor, data, len); #else + // loop while ::write() returns -1 and errno == EINTR, in case + // of an interrupting signal. + do { writtenBytes = qt_safe_write(socketDescriptor, data, len); -#endif - // writtenBytes = QT_WRITE(socketDescriptor, data, len); ### TODO S60: Should this line be removed or the one above it? } while (writtenBytes < 0 && errno == EINTR); +#endif if (writtenBytes < 0) { switch (errno) { @@ -882,13 +893,13 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxSize) } ssize_t r = 0; - do { #ifdef Q_OS_SYMBIAN - r = ::read(socketDescriptor, data, maxSize); + r = ::read(socketDescriptor, data, maxSize); #else + do { r = qt_safe_read(socketDescriptor, data, maxSize); -#endif } while (r == -1 && errno == EINTR); +#endif if (r < 0) { r = -1; diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp index 404eee7..932126d 100644 --- a/src/network/socket/qtcpserver.cpp +++ b/src/network/socket/qtcpserver.cpp @@ -79,6 +79,16 @@ use waitForNewConnection(), which blocks until either a connection is available or a timeout expires. + \section1 Symbian Platform Security Requirements + + On Symbian, processes which use this class must have the + \c NetworkServices platform security capability. If the client + process lacks this capability, it will lead to a panic. + + Platform security capabilities are added via the + \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} + qmake variable. + \sa QTcpSocket, {Fortune Server Example}, {Threaded Fortune Server Example}, {Loopback Example}, {Torrent Example} */ diff --git a/src/network/socket/qtcpsocket.cpp b/src/network/socket/qtcpsocket.cpp index b1c7c1c..70852a5 100644 --- a/src/network/socket/qtcpsocket.cpp +++ b/src/network/socket/qtcpsocket.cpp @@ -60,6 +60,16 @@ \bold{Note:} TCP sockets cannot be opened in QIODevice::Unbuffered mode. + \section1 Symbian Platform Security Requirements + + On Symbian, processes which use this class must have the + \c NetworkServices platform security capability. If the client + process lacks this capability, it will result in a panic. + + Platform security capabilities are added via the + \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} + qmake variable. + \sa QTcpServer, QUdpSocket, QFtp, QNetworkAccessManager, {Fortune Server Example}, {Fortune Client Example}, {Threaded Fortune Server Example}, {Blocking Fortune Client Example}, diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp index e208904..d5366d3 100644 --- a/src/network/socket/qudpsocket.cpp +++ b/src/network/socket/qudpsocket.cpp @@ -86,6 +86,16 @@ \l{network/broadcastreceiver}{Broadcast Receiver} examples illustrate how to use QUdpSocket in applications. + \section1 Symbian Platform Security Requirements + + On Symbian, processes which use this class must have the + \c NetworkServices platform security capability. If the client + process lacks this capability, operations will result in a panic. + + Platform security capabilities are added via the + \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} + qmake variable. + \sa QTcpSocket */ diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 86b11b9..0918539 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -156,6 +156,16 @@ is being encrypted and encryptedBytesWritten() will get emitted as soon as data has been written to the TCP socket. + \section1 Symbian Platform Security Requirements + + On Symbian, processes which use this class must have the + \c NetworkServices platform security capability. If the client + process lacks this capability, operations will fail. + + Platform security capabilities are added via the + \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} + qmake variable. + \sa QSslCertificate, QSslCipher, QSslError */ |