summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-12 18:30:24 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-12 18:30:24 (GMT)
commit2044890bb807dc5879d7cbb1863c56c64249c3ef (patch)
tree33b400e53b71ccd6ac5ea0da41cb9285aafaa988 /src
parent0ef6bb1dfadf8e83f20e2282ff4a73a466b3de87 (diff)
parent1db8232bd50874b3db16031b9c8ef13984bf32dd (diff)
downloadQt-2044890bb807dc5879d7cbb1863c56c64249c3ef.zip
Qt-2044890bb807dc5879d7cbb1863c56c64249c3ef.tar.gz
Qt-2044890bb807dc5879d7cbb1863c56c64249c3ef.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: 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. Removed QtDeclarative.dll deployment from qt.iby in 4.6 branch. Don't build QtXmlPatterns' command line tools on Symbian.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qprocess.cpp18
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp8
-rw-r--r--src/multimedia/audio/qaudioinput.cpp18
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp10
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp29
-rw-r--r--src/network/socket/qtcpserver.cpp10
-rw-r--r--src/network/socket/qtcpsocket.cpp10
-rw-r--r--src/network/socket/qudpsocket.cpp10
-rw-r--r--src/network/ssl/qsslsocket.cpp10
-rw-r--r--src/s60installs/qt.iby1
10 files changed, 113 insertions, 11 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 12a992a..af1fc82 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -551,6 +551,16 @@ void QProcessPrivate::Channel::clear()
interpreter itself (\c{cmd.exe} on some Windows systems), and ask
the interpreter to execute the desired command.
+ \section1 Symbian Platform Security Requirements
+
+ On Symbian, processes which use the functions kill() or terminate()
+ must have the \c PowerMgmt platform security capability. If the client
+ process lacks this capability, these functions will fail.
+
+ Platform security capabilities are added via the
+ \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY}
+ qmake variable.
+
\sa QBuffer, QFile, QTcpSocket
*/
@@ -2006,9 +2016,13 @@ void QProcess::start(const QString &program, OpenMode mode)
event loop does not handle the WM_CLOSE message, can only be terminated by
calling kill().
+ On Symbian, this function requires platform security capability
+ \c PowerMgmt. If absent, the process will panic with KERN-EXEC 46.
+
\note Terminating running processes from other processes will typically
cause a panic in Symbian due to platform security.
+ \sa \l {Symbian Platform Security Requirements}
\sa kill()
*/
void QProcess::terminate()
@@ -2023,6 +2037,10 @@ void QProcess::terminate()
On Windows, kill() uses TerminateProcess, and on Unix and Mac OS X, the
SIGKILL signal is sent to the process.
+ On Symbian, this function requires platform security capability
+ \c PowerMgmt. If absent, the process will panic with KERN-EXEC 46.
+
+ \sa \l {Symbian Platform Security Requirements}
\sa terminate()
*/
void QProcess::kill()
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index ca44264..8c96057 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -570,7 +570,13 @@ void QSelectThread::updateActivatedNotifiers(QSocketNotifier::Type type, fd_set
* check if socket is in exception set
* then signal RequestComplete for it
*/
- qWarning("exception on %d", i.key()->socket());
+ qWarning("exception on %d [will close the socket handle - hack]", i.key()->socket());
+ // quick fix; there is a bug
+ // when doing read on socket
+ // errors not preoperly mapped
+ // after offline-ing the device
+ // on some devices we do get exception
+ ::close(i.key()->socket());
toRemove.append(i.key());
TRequestStatus *status = i.value();
QEventDispatcherSymbian::RequestComplete(d->threadData->symbian_thread_handle, status, KErrNone);
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index 10bab01..c99e870 100644
--- a/src/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
@@ -146,6 +146,20 @@ QT_BEGIN_NAMESPACE
\snippet doc/src/snippets/audio/main.cpp 0
\sa QAudioOutput, QAudioDeviceInfo
+
+ \section1 Symbian Platform Security Requirements
+
+ On Symbian, processes which use this class must have the
+ \c UserEnvironment platform security capability. If the client
+ process lacks this capability, calls to either overload of start()
+ will fail.
+ This failure is indicated by the QAudioInput object setting
+ its error() value to \l{QAudio::OpenError} and then emitting a
+ \l{stateChanged()}{stateChanged}(\l{QAudio::StoppedState}) signal.
+
+ Platform security capabilities are added via the
+ \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY}
+ qmake variable.
*/
/*!
@@ -197,6 +211,8 @@ QAudioInput::~QAudioInput()
If a problem occurs during this process the error() is set to QAudio::OpenError,
state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
+ \sa {Symbian Platform Security Requirements}
+
\sa QIODevice
*/
@@ -217,6 +233,8 @@ void QAudioInput::start(QIODevice* device)
If a problem occurs during this process the error() is set to QAudio::OpenError,
state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
+ \sa {Symbian Platform Security Requirements}
+
\sa QIODevice
*/
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 03b7192..acf894c 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -138,6 +138,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/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 9a2c349..354c944 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 9623570..7ad471c 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
*/
diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby
index ec019e2..595734d 100644
--- a/src/s60installs/qt.iby
+++ b/src/s60installs/qt.iby
@@ -19,7 +19,6 @@ file=ABI_DIR\BUILD_DIR\QtWebKit.dll SHARED_LIB_DIR\QtWebKit.dll
file=ABI_DIR\BUILD_DIR\phonon.dll SHARED_LIB_DIR\phonon.dll
file=ABI_DIR\BUILD_DIR\QtMultimedia.dll SHARED_LIB_DIR\QtMultimedia.dll
file=ABI_DIR\BUILD_DIR\QtXmlPatterns.dll SHARED_LIB_DIR\QtXmlPatterns.dll
-file=ABI_DIR\BUILD_DIR\QtDeclarative.dll SHARED_LIB_DIR\QtDeclarative.dll
// imageformats
file=ABI_DIR\BUILD_DIR\qgif.dll SHARED_LIB_DIR\qgif.dll