summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-23 15:23:05 (GMT)
committeraxis <qt-info@nokia.com>2010-02-23 15:23:05 (GMT)
commitf67062af3a076468442c29127cb48bb13937ce0e (patch)
treea12cd4c644fb528dd5f95cb58559732a0b8b6311 /src/corelib/io
parenta670009fd378d48ff891602ec31204614e8a476f (diff)
parentc15307e9e916aa613096275919ca91deba64454f (diff)
downloadQt-f67062af3a076468442c29127cb48bb13937ce0e.zip
Qt-f67062af3a076468442c29127cb48bb13937ce0e.tar.gz
Qt-f67062af3a076468442c29127cb48bb13937ce0e.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts: mkspecs/features/symbian/qt.prf qmake/Makefile.unix qmake/Makefile.win32 qmake/Makefile.win32-g++ qmake/Makefile.win32-g++-sh qmake/generators/symbian/initprojectdeploy_symbian.cpp src/src.pro
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qdatastream.cpp7
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue.cpp18
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp2
-rw-r--r--src/corelib/io/qprocess_symbian.cpp2
4 files changed, 23 insertions, 6 deletions
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index 7c1887e..fc35bfa 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -157,6 +157,13 @@ QT_BEGIN_NAMESPACE
data, followed by the data. Note that any encoding/decoding of
the data (apart from the length quint32) must be done by you.
+ \section1 Reading and writing Qt collection classes
+
+ The Qt collection classes can also be serialized to a QDataStream.
+ These include QList, QLinkedList, QVector, QSet, QHash, and QMap.
+ These classes have have stream operators declared as non-member of
+ the class.
+
\target Serializing Qt Classes
\section1 Reading and writing other Qt classes.
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
index 8396481..99c165e 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp
+++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
@@ -260,12 +260,22 @@ void QKqueueFileSystemWatcherEngine::run()
DEBUG() << "QKqueueFileSystemWatcherEngine: processing kevent" << kev.ident << kev.filter;
if (fd == kqpipe[0]) {
- char c;
- if (read(kqpipe[0], &c, 1) != 1) {
+ // read all pending data from the pipe
+ QByteArray ba;
+ ba.resize(kev.data);
+ if (read(kqpipe[0], ba.data(), ba.size()) != ba.size()) {
perror("QKqueueFileSystemWatcherEngine: error reading from pipe");
return;
}
- switch (c) {
+ // read the command from the buffer (but break and return on 'q')
+ char cmd = 0;
+ for (int i = 0; i < ba.size(); ++i) {
+ cmd = ba.constData()[i];
+ if (cmd == 'q')
+ break;
+ }
+ // handle the command
+ switch (cmd) {
case 'q':
DEBUG() << "QKqueueFileSystemWatcherEngine: thread received 'q', exiting...";
return;
@@ -273,7 +283,7 @@ void QKqueueFileSystemWatcherEngine::run()
DEBUG() << "QKqueueFileSystemWatcherEngine: thread received '@', continuing...";
break;
default:
- DEBUG() << "QKqueueFileSystemWatcherEngine: thread received unknow message" << c;
+ DEBUG() << "QKqueueFileSystemWatcherEngine: thread received unknow message" << cmd;
break;
}
} else {
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index eb99f27..d8b1c03 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1479,7 +1479,7 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
{
//### what to do with permissions if we don't use NTFS
// for now just add all permissions and what about exe missions ??
- // also qt_ntfs_permission_lookup is now not set by defualt ... should it ?
+ // also qt_ntfs_permission_lookup is now not set by default ... should it ?
ret |= QAbstractFileEngine::ReadOtherPerm | QAbstractFileEngine::ReadGroupPerm
| QAbstractFileEngine::ReadOwnerPerm | QAbstractFileEngine::ReadUserPerm
| QAbstractFileEngine::WriteUserPerm | QAbstractFileEngine::WriteOwnerPerm
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
index 972b0e0..34491d0 100644
--- a/src/corelib/io/qprocess_symbian.cpp
+++ b/src/corelib/io/qprocess_symbian.cpp
@@ -1002,7 +1002,7 @@ bool QProcessPrivate::waitForDeadChild()
TExitCategoryName catName = symbianProcess->ExitCategory();
qDebug() << "QProcessPrivate::waitForDeadChild() dead with exitCode"
<< exitCode << ", crashed:" << crashed
- << ", category:" << QString::fromUtf16(catName.Ptr());
+ << ", category:" << QString((const QChar *)catName.Ptr());
#endif
} else {
QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForDeadChild() not dead!");