summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-16 19:30:00 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-16 19:30:00 (GMT)
commit95d3bd3fc993d7c8c1fe92960c617a3392d87f66 (patch)
tree80fc13bd368c31c74d9b821155780f10081a380b /src/corelib
parent090827712933e587eb9308aabca49fc01a371f0e (diff)
parent90d398e5bef2a66ab944e1cc191c1ad6569e321a (diff)
downloadQt-95d3bd3fc993d7c8c1fe92960c617a3392d87f66.zip
Qt-95d3bd3fc993d7c8c1fe92960c617a3392d87f66.tar.gz
Qt-95d3bd3fc993d7c8c1fe92960c617a3392d87f66.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (201 commits) Fix an issue with the error signal in a callWithCallback not being Add skeleton changes file for 4.6.3. Fixed compiler warning about making the same class a friend twice New test cases for the QScriptString. Fix a deadlock in kqueue implementation of QFileSystemWatcher Don't crash when QTouchEvent is accepted but not handled by a QNAM HTTP: Unify socket EOF handling a bit doc: Added \section1 about serializing operators for Qt collections. Update the composition demo at 60 FPS instead of at painting rate Replace the inline blend function by #define Fix for using QContiguousCache with default constructor or capacity=0 Correctly mark QGraphicsScene::drawItems() as obsolete Compile fix on Mac with 10.5 sdk. QTestLib: don't crash if data tag requested, none available Implement the blend functions with SSE2 doc: Added some since version information. Ignore touch and gesture events when excluding input events Implemented GraphicsView Panel support for gestures. doc: Fixed several typos. Add MSVC-specific expected failures for JS test suite ...
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/codecs/qtextcodec.h2
-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/kernel/qeventdispatcher_win.cpp11
-rw-r--r--src/corelib/tools/qcontiguouscache.h35
6 files changed, 56 insertions, 19 deletions
diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h
index a099dd9..23c91c7 100644
--- a/src/corelib/codecs/qtextcodec.h
+++ b/src/corelib/codecs/qtextcodec.h
@@ -170,8 +170,10 @@ private:
friend class QXmlStreamWriter;
friend class QXmlStreamWriterPrivate;
+#if defined Q_XMLSTREAM_RENAME_SYMBOLS
friend class QCoreXmlStreamWriter;
friend class QCoreXmlStreamWriterPrivate;
+#endif
};
class Q_CORE_EXPORT QTextDecoder {
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index 82d3b79..f27ecc1 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -156,6 +156,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 f088ded..731406f 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 bec0075..139075f 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1484,7 +1484,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/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index cbc87f3..93becc8 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -68,6 +68,14 @@ extern uint qGlobalPostedEventsCount();
# define QS_RAWINPUT 0x0400
#endif
+#ifndef WM_TOUCH
+# define WM_TOUCH 0x0240
+#endif
+#ifndef WM_GESTURE
+# define WM_GESTURE 0x0119
+# define WM_GESTURENOTIFY 0x011A
+#endif
+
enum {
WM_QT_SOCKETNOTIFIER = WM_USER,
WM_QT_SENDPOSTEDEVENTS = WM_USER + 1,
@@ -714,6 +722,9 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
&& msg.message <= WM_MOUSELAST)
|| msg.message == WM_MOUSEWHEEL
|| msg.message == WM_MOUSEHWHEEL
+ || msg.message == WM_TOUCH
+ || msg.message == WM_GESTURE
+ || msg.message == WM_GESTURENOTIFY
|| msg.message == WM_CLOSE)) {
// queue user input events for later processing
haveMessage = false;
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index 1f7fdb2..aa5603d 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -221,22 +221,29 @@ void QContiguousCache<T>::setCapacity(int asize)
x.d->alloc = asize;
x.d->count = qMin(d->count, asize);
x.d->offset = d->offset + d->count - x.d->count;
- x.d->start = x.d->offset % x.d->alloc;
- T *dest = x.p->array + (x.d->start + x.d->count-1) % x.d->alloc;
- T *src = p->array + (d->start + d->count-1) % d->alloc;
+ if(asize)
+ x.d->start = x.d->offset % x.d->alloc;
+ else
+ x.d->start = 0;
+
int oldcount = x.d->count;
- while (oldcount--) {
- if (QTypeInfo<T>::isComplex) {
- new (dest) T(*src);
- } else {
- *dest = *src;
+ if(oldcount)
+ {
+ T *dest = x.p->array + (x.d->start + x.d->count-1) % x.d->alloc;
+ T *src = p->array + (d->start + d->count-1) % d->alloc;
+ while (oldcount--) {
+ if (QTypeInfo<T>::isComplex) {
+ new (dest) T(*src);
+ } else {
+ *dest = *src;
+ }
+ if (dest == x.p->array)
+ dest = x.p->array + x.d->alloc;
+ dest--;
+ if (src == p->array)
+ src = p->array + d->alloc;
+ src--;
}
- if (dest == x.p->array)
- dest = x.p->array + x.d->alloc;
- dest--;
- if (src == p->array)
- src = p->array + d->alloc;
- src--;
}
/* free old */
free(p);