summaryrefslogtreecommitdiffstats
path: root/config/dec-osf5.x
Commit message (Expand)AuthorAgeFilesLines
* [svn-r3807] Purpose:Quincey Koziol2001-04-131-0/+20
le='width: 95.9%;'/> -rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub.h9
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-open.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-stream.h8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp38
-rw-r--r--src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp14
-rw-r--r--src/corelib/corelib.pro7
-rw-r--r--src/corelib/global/global.pri2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp12
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/global/qnamespace.qdoc3
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp17
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp6
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue.cpp194
-rw-r--r--src/corelib/io/qfilesystemwatcher_symbian.cpp2
-rw-r--r--src/corelib/io/qiodevice.cpp5
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp48
-rw-r--r--src/corelib/kernel/qobjectdefs.h8
-rw-r--r--src/corelib/kernel/qtcore_eval.cpp4
-rw-r--r--src/corelib/thread/qthread.cpp12
-rw-r--r--src/corelib/thread/qthread_p.h1
-rw-r--r--src/corelib/thread/qthread_unix.cpp55
-rw-r--r--src/corelib/thread/qthread_win.cpp36
-rw-r--r--src/corelib/thread/qthreadstorage.cpp59
-rw-r--r--src/corelib/thread/qthreadstorage.h13
-rw-r--r--src/corelib/tools/qchar.cpp26
-rw-r--r--src/corelib/tools/qlocale.cpp6
-rw-r--r--src/corelib/tools/qsimd.cpp2
-rw-r--r--src/corelib/tools/qsimd_p.h11
-rw-r--r--src/corelib/tools/qstring.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp23
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp68
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp41
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp37
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp48
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp3
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp4
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompileddata.cpp4
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompiler_p.h4
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp13
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject.cpp2
-rw-r--r--src/gui/accessible/qaccessible_mac.mm2
-rw-r--r--src/gui/dialogs/dialogs.pri9
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp3
-rw-r--r--src/gui/dialogs/qcolordialog.cpp21
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm4
-rw-r--r--src/gui/dialogs/qcolordialog_symbian.cpp107
-rw-r--r--src/gui/dialogs/qfiledialog.cpp68
-rw-r--r--src/gui/dialogs/qfiledialog_symbian.cpp196
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm2
-rw-r--r--src/gui/dialogs/qmessagebox.cpp88
-rw-r--r--src/gui/dialogs/qpagesetupdialog.cpp3
-rw-r--r--src/gui/dialogs/qpagesetupdialog_mac.mm4
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.cpp11
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp35
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem_p.h2
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicstransform.cpp2
-rw-r--r--src/gui/graphicsview/qgridlayoutengine.cpp185
-rw-r--r--src/gui/graphicsview/qgridlayoutengine_p.h7
-rw-r--r--src/gui/gui.pro3
-rw-r--r--src/gui/image/qnativeimage.cpp2
-rw-r--r--src/gui/kernel/qapplication_win.cpp24
-rw-r--r--src/gui/kernel/qclipboard_mac.cpp2
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm5
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac.mm4
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm32
-rw-r--r--src/gui/kernel/qcocoawindow_mac.mm2
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm2
-rw-r--r--src/gui/kernel/qevent.cpp2
-rw-r--r--src/gui/kernel/qgesturemanager.cpp12
-rw-r--r--src/gui/kernel/qgesturemanager_p.h3
-rw-r--r--src/gui/kernel/qguiplatformplugin.cpp2
-rw-r--r--src/gui/kernel/qkeymapper_mac.cpp2
-rw-r--r--src/gui/kernel/qkeysequence.cpp2
-rw-r--r--src/gui/kernel/qsound_s60.cpp2
-rw-r--r--src/gui/kernel/qwidget.cpp13
-rw-r--r--src/gui/kernel/qwidget_mac.mm7
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp14
-rw-r--r--src/gui/kernel/qx11embed_x11.cpp2
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp3
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp17
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h4
-rw-r--r--src/gui/painting/qunifiedtoolbarsurface_mac.cpp2
-rw-r--r--src/gui/painting/qwindowsurface_mac.cpp2
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp3
-rw-r--r--src/gui/styles/qmacstyle_mac.mm15
-rw-r--r--src/gui/styles/qs60style.cpp59
-rw-r--r--src/gui/styles/qstyle.cpp2
-rw-r--r--src/gui/styles/qstyleoption.cpp4
-rw-r--r--src/gui/text/qfontengine_x11.cpp2
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp180
-rw-r--r--src/gui/util/qundostack.cpp2
-rw-r--r--src/gui/util/util.pri17
-rw-r--r--src/gui/widgets/qabstractslider_p.h2
-rw-r--r--src/gui/widgets/qcocoamenu_mac.mm9
-rw-r--r--src/gui/widgets/qdial.cpp15
-rw-r--r--src/gui/widgets/qtextedit.cpp2
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp6
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.h2
-rw-r--r--src/network/access/qhttpnetworkheader.cpp12
-rw-r--r--src/network/access/qnetworkrequest.cpp10
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp58
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h5
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp5
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp3
-rw-r--r--src/opengl/gl2paintengineex/qtriangulator.cpp34
-rw-r--r--src/opengl/qgl_p.h3
-rw-r--r--src/opengl/qglframebufferobject.cpp40
-rw-r--r--src/opengl/qglframebufferobject.h3
-rw-r--r--src/opengl/qglframebufferobject_p.h13
-rw-r--r--src/openvg/qpaintengine_vg.cpp7
-rw-r--r--src/openvg/qpixmapdata_vg.cpp2
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp6
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp39
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h6
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp42
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp2
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp2
-rw-r--r--src/plugins/s60/feedback/feedback.pro2
-rw-r--r--src/plugins/s60/s60.pro2
-rw-r--r--src/qbase.pri2
-rw-r--r--src/s60installs/bwins/QtCoreu.def4
-rw-r--r--src/s60installs/bwins/QtGuiu.def9
-rw-r--r--src/s60installs/bwins/QtOpenGLu.def11
-rw-r--r--src/s60installs/eabi/QtGuiu.def1
-rw-r--r--src/s60installs/eabi/QtOpenGLu.def5
-rw-r--r--src/s60installs/s60installs.pro10
-rw-r--r--src/script/api/qscriptcontextinfo.cpp2
-rw-r--r--src/script/api/qscriptengine.cpp4
-rw-r--r--src/script/api/qscriptvalue.cpp15
-rw-r--r--src/sql/models/qsqlrelationaldelegate.h10
-rw-r--r--src/testlib/qtestcase.cpp3
-rw-r--r--src/testlib/qtesttouch.h4
-rw-r--r--src/xmlpatterns/expr/qarithmeticexpression_p.h2
-rwxr-xr-xsrc/xmlpatterns/parser/createTokenLookup.sh15
153 files changed, 1689 insertions, 890 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
index 0d7c2c2..0d631b2 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
@@ -32,10 +32,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
typedef struct HB_GlyphItemRec_ {
HB_UInt gindex;
HB_UInt properties;
@@ -93,10 +89,6 @@ hb_buffer_add_glyph( HB_Buffer buffer,
HB_UInt properties,
HB_UInt cluster );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_BUFFER_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
index 2a6d958..94e9b43 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
@@ -33,11 +33,6 @@
HB_BEGIN_HEADER
-
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* Attachment related structures */
struct HB_AttachPoint_
@@ -126,10 +121,6 @@ _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef,
HB_Lookup* lo,
HB_UShort num_lookups );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GDEF_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
index f9a03dd..ccb6bf9 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
@@ -31,10 +31,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* GDEF glyph properties. Note that HB_GDEF_COMPONENT has no corresponding
* flag in the LookupFlag field. */
#define HB_GDEF_BASE_GLYPH 0x0002
@@ -131,10 +127,6 @@ HB_Error HB_GDEF_Build_ClassDefinition( HB_GDEFHeader* gdef,
HB_UShort* glyph_array,
HB_UShort* class_array );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GDEF_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-global.h b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
index bccd6a2..d4e6b46 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-global.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
@@ -39,10 +39,6 @@
#define HB_END_HEADER /* nothing */
#endif
-#if defined(__GNUC__) || defined(_MSC_VER)
-#define HB_USE_PACKED_STRUCTS
-#endif
-
HB_BEGIN_HEADER
#ifndef FALSE
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
index 39f3159..63ba907 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
@@ -32,10 +32,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* shared tables */
#define VR_X_PLACEMENT_DEVICE 0
@@ -720,10 +716,6 @@ HB_INTERNAL void
_HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
HB_UShort lookup_type );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GPOS_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
index 7eb329e..df0c3f6 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
@@ -32,10 +32,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
typedef union HB_GSUB_SubTable_ HB_GSUB_SubTable;
/* LookupType 1 */
@@ -474,10 +470,6 @@ HB_INTERNAL void
_HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
HB_UShort lookup_type );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GSUB_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
index b00df44..6e452bd 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
@@ -31,11 +31,6 @@
HB_BEGIN_HEADER
-
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* Lookup types for glyph substitution */
#define HB_GSUB_LOOKUP_SINGLE 1
@@ -139,10 +134,6 @@ HB_Error HB_GSUB_Register_Alternate_Function( HB_GSUBHeader* gsub,
HB_Error HB_GSUB_Apply_String( HB_GSUBHeader* gsub,
HB_Buffer buffer );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GSUB_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.h b/src/3rdparty/harfbuzz/src/harfbuzz-open.h
index 4ba6cf5..9ad7c98 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-open.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.h
@@ -30,10 +30,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* Use this if a feature applies to all glyphs */
#define HB_ALL_GLYPHS 0xFFFF
@@ -279,10 +275,6 @@ enum HB_Type_
typedef enum HB_Type_ HB_Type;
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_OPEN_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index ab5c07a..470e27b 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -34,10 +34,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/*
using anything else than signed or unsigned for bitfields in C is non standard,
but accepted by almost all compilers. And it gives a significant reduction in
@@ -258,10 +254,6 @@ typedef struct HB_Font_ {
void *userData;
} HB_FontRec;
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
typedef struct HB_ShaperItem_ HB_ShaperItem;
struct HB_ShaperItem_ {
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
index a155cc2..cfbfb1c 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
@@ -30,10 +30,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
typedef struct HB_StreamRec_
{
HB_Byte* base;
@@ -42,10 +38,6 @@ typedef struct HB_StreamRec_
HB_UInt pos;
} HB_StreamRec;
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 9b97c8b..5bb3c57 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -1351,26 +1351,30 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
}
}
- if (!ev->commitString().isEmpty())
+ if (renderTextControl && ev->replacementLength() > 0) {
+ renderTextControl->setSelectionStart(qMax(renderTextControl->selectionStart() + ev->replacementStart(), 0));
+ renderTextControl->setSelectionEnd(qMin(renderTextControl->selectionStart() + ev->replacementLength(), static_cast<int>(renderTextControl->text().length())));
+ // Commit regardless of whether commitString is empty, to get rid of selection.
editor->confirmComposition(ev->commitString());
- else {
- // 1. empty preedit with a selection attribute, and start/end of 0 cancels composition
- // 2. empty preedit with a selection attribute, and start/end of non-0 updates selection of current preedit text
- // 3. populated preedit with a selection attribute, and start/end of 0 or non-0 updates selection of supplied preedit text
- // 4. otherwise event is updating supplied pre-edit text
- QString preedit = ev->preeditString();
+ } else if (!ev->commitString().isEmpty()) {
+ editor->confirmComposition(ev->commitString());
+ }
+ // 1. empty preedit with a selection attribute, and start/end of 0 cancels composition
+ // 2. empty preedit with a selection attribute, and start/end of non-0 updates selection of current preedit text
+ // 3. populated preedit with a selection attribute, and start/end of 0 or non-0 updates selection of supplied preedit text
+ // 4. otherwise event is updating supplied pre-edit text
+ QString preedit = ev->preeditString();
#if QT_VERSION >= 0x040600
- if (hasSelection) {
- QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString();
- if (preedit.isEmpty() && selection.start + selection.length > 0)
- preedit = text;
- editor->setComposition(preedit, underlines,
- (selection.length < 0) ? selection.start + selection.length : selection.start,
- (selection.length < 0) ? selection.start : selection.start + selection.length);
- } else
+ if (hasSelection) {
+ QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString();
+ if (preedit.isEmpty() && selection.start + selection.length > 0)
+ preedit = text;
+ editor->setComposition(preedit, underlines,
+ (selection.length < 0) ? selection.start + selection.length : selection.start,
+ (selection.length < 0) ? selection.start : selection.start + selection.length);
+ } else
#endif
- editor->setComposition(preedit, underlines, preedit.length(), 0);
- }
+ editor->setComposition(preedit, underlines, preedit.length(), 0);
ev->accept();
}
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
index e4f70de..7a8aae7 100644
--- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
@@ -141,6 +141,16 @@ void GraphicsWebView::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
QGraphicsWebView::mouseMoveEvent(event);
}
+bool GraphicsWebView::sceneEvent(QEvent *event)
+{
+ bool rv = QGraphicsWebView::sceneEvent(event);
+ if (event->type() == QEvent::UngrabMouse) {
+ pressTimer.stop();
+ parent->setKeepMouseGrab(false);
+ }
+ return rv;
+}
+
/*!
\qmlclass WebView QDeclarativeWebView
\ingroup qml-view-elements
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h
index b2055bf..ca15a1e 100644
--- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview_p.h
@@ -70,6 +70,8 @@ protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent* event);
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
void timerEvent(QTimerEvent* event);
+ bool sceneEvent(QEvent *event);
+
Q_SIGNALS:
void doubleClick(int clickX, int clickY);
private:
diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index f2282f8..b98617f 100644
--- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
@@ -1,5 +1,5 @@
-QT_WEBKIT_VERSION = 4.7.1
+QT_WEBKIT_VERSION = 4.7.2
QT_WEBKIT_MAJOR_VERSION = 4
QT_WEBKIT_MINOR_VERSION = 7
-QT_WEBKIT_PATCH_VERSION = 1
+QT_WEBKIT_PATCH_VERSION = 2
QT_CONFIG += webkit
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index b7ffb8a..31cf277 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1502,6 +1502,20 @@ void tst_QWebPage::inputMethods()
QCOMPARE(value, QString("QtWebKit"));
#endif
+ {
+ QList<QInputMethodEvent::Attribute> attributes;
+ QInputMethodEvent event(QString(), attributes);
+ event.setCommitString("XXX", 0, 0);
+ page->event(&event);
+ event.setCommitString(QString(), -2, 2); // Erase two characters.
+ page->event(&event);
+ event.setCommitString(QString(), -1, 1); // Erase one character.
+ page->event(&event);
+ variant = page->inputMethodQuery(Qt::ImSurroundingText);
+ value = variant.value<QString>();
+ QCOMPARE(value, QString("QtWebKit"));
+ }
+
// Cancel current composition first
inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant());
QInputMethodEvent eventSelection4("", inputAttributes);
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 349b3d4..e946d5d 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -44,10 +44,3 @@ symbian: {
MMP_RULES -= PAGED
MMP_RULES *= UNPAGED
}
-
-neon {
- DEFINES += QT_HAVE_NEON
- QMAKE_CXXFLAGS *= -mfpu=neon
-}
-
-
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 47b82ef..8eae391 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -31,3 +31,5 @@ linux*:!static:!symbian-armcc:!symbian-gcce {
# Compensate for lack of platform defines in Symbian3 and Symbian4
symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_))
+
+include(../../../tools/shared/symbian/epocroot.pri)
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index d493390..8b2ab5a 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -62,6 +62,10 @@ QT_END_NAMESPACE
# include "private/qcore_mac_p.h"
#endif
+#ifdef QLIBRARYINFO_EPOCROOT
+# include "symbian/epocroot_p.h"
+#endif
+
#include "qconfig.cpp"
QT_BEGIN_NAMESPACE
@@ -433,6 +437,14 @@ QLibraryInfo::location(LibraryLocation loc)
QString::fromLocal8Bit(qgetenv(ret.mid(rep + 2,
reg_var.matchedLength() - 3).toLatin1().constData()).constData()));
}
+
+#ifdef QLIBRARYINFO_EPOCROOT
+ // $${EPOCROOT} is a special case, resolve it similarly to qmake.
+ QRegExp epocrootMatcher(QLatin1String("\\$\\$\\{EPOCROOT\\}"));
+ if ((rep = epocrootMatcher.indexIn(ret)) != -1)
+ ret.replace(rep, epocrootMatcher.matchedLength(), qt_epocRoot());
+#endif
+
config->endGroup();
}
}
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 3ed6291..6afc9a2 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -519,6 +519,8 @@ public:
WA_X11DoNotAcceptFocus = 132,
+ WA_MacNoShadow = 133,
+
// Add new attributes before this line
WA_AttributeCount
};
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index f097f2a..b9939b6 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1257,6 +1257,9 @@
to this top level window. This attribute has no effect on non-X11
platforms.
+ \value WA_MacNoShadow Since Qt 4.8, this attribute disables drop shadows
+ for this top level window. Only affects Cocoa builds of Qt for Mac OS X.
+
\omitvalue WA_SetLayoutDirection
\omitvalue WA_InputMethodTransparent
\omitvalue WA_WState_CompressKeys
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 18c3c9f..4d0d495 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -198,7 +198,7 @@ QStringList QPollingFileSystemWatcherEngine::removePaths(const QStringList &path
void QPollingFileSystemWatcherEngine::stop()
{
- QMetaObject::invokeMethod(this, "quit");
+ quit();
}
void QPollingFileSystemWatcherEngine::timeout()
@@ -228,8 +228,14 @@ void QPollingFileSystemWatcherEngine::timeout()
dit.remove();
emit directoryChanged(path, true);
} else if (x.value() != fi) {
- x.value() = fi;
- emit directoryChanged(path, false);
+ fi.refresh();
+ if (!fi.exists()) {
+ dit.remove();
+ emit directoryChanged(path, true);
+ } else {
+ x.value() = fi;
+ emit directoryChanged(path, false);
+ }
}
}
@@ -426,11 +432,6 @@ QFileSystemWatcher::QFileSystemWatcher(const QStringList &paths, QObject *parent
/*!
Destroys the file system watcher.
-
- \note To avoid deadlocks on shutdown, all instances of QFileSystemWatcher
- need to be destroyed before QCoreApplication. Note that passing
- QCoreApplication::instance() as the parent object when creating
- QFileSystemWatcher is not sufficient.
*/
QFileSystemWatcher::~QFileSystemWatcher()
{
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index dc18ae7..ab53431 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -340,7 +340,7 @@ QStringList QInotifyFileSystemWatcherEngine::removePaths(const QStringList &path
void QInotifyFileSystemWatcherEngine::stop()
{
- QMetaObject::invokeMethod(this, "quit");
+ quit();
}
void QInotifyFileSystemWatcherEngine::readFromInotify()
@@ -356,7 +356,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
char *at = buffer.data();
char * const end = at + buffSize;
- QMap<int, inotify_event *> eventForId;
+ QHash<int, inotify_event *> eventForId;
while (at < end) {
inotify_event *event = reinterpret_cast<inotify_event *>(at);
@@ -368,7 +368,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
at += sizeof(inotify_event) + event->len;
}
- QMap<int, inotify_event *>::const_iterator it = eventForId.constBegin();
+ QHash<int, inotify_event *>::const_iterator it = eventForId.constBegin();
while (it != eventForId.constEnd()) {
const inotify_event &event = **it;
++it;
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
index 7960792..68994d2 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp
+++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
@@ -119,67 +119,77 @@ QStringList QKqueueFileSystemWatcherEngine::addPaths(const QStringList &paths,
QStringList *files,
QStringList *directories)
{
- QMutexLocker locker(&mutex);
-
QStringList p = paths;
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- int fd;
+ {
+ QMutexLocker locker(&mutex);
+
+ QMutableListIterator<QString> it(p);
+ while (it.hasNext()) {
+ QString path = it.next();
+ int fd;
#if defined(O_EVTONLY)
- fd = qt_safe_open(QFile::encodeName(path), O_EVTONLY);
+ fd = qt_safe_open(QFile::encodeName(path), O_EVTONLY);
#else
- fd = qt_safe_open(QFile::encodeName(path), O_RDONLY);
+ fd = qt_safe_open(QFile::encodeName(path), O_RDONLY);
#endif
- if (fd == -1) {
- perror("QKqueueFileSystemWatcherEngine::addPaths: open");
- continue;
- }
+ if (fd == -1) {
+ perror("QKqueueFileSystemWatcherEngine::addPaths: open");
+ continue;
+ }
+ if (fd >= (int)FD_SETSIZE / 2 && fd < (int)FD_SETSIZE) {
+ int fddup = fcntl(fd, F_DUPFD, FD_SETSIZE);
+ if (fddup != -1) {
+ ::close(fd);
+ fd = fddup;
+ }
+ }
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
- QT_STATBUF st;
- if (QT_FSTAT(fd, &st) == -1) {
- perror("QKqueueFileSystemWatcherEngine::addPaths: fstat");
- ::close(fd);
- continue;
- }
- int id = (S_ISDIR(st.st_mode)) ? -fd : fd;
- if (id < 0) {
- if (directories->contains(path)) {
+ QT_STATBUF st;
+ if (QT_FSTAT(fd, &st) == -1) {
+ perror("QKqueueFileSystemWatcherEngine::addPaths: fstat");
::close(fd);
continue;
}
- } else {
- if (files->contains(path)) {
+ int id = (S_ISDIR(st.st_mode)) ? -fd : fd;
+ if (id < 0) {
+ if (directories->contains(path)) {
+ ::close(fd);
+ continue;
+ }
+ } else {
+ if (files->contains(path)) {
+ ::close(fd);
+ continue;
+ }
+ }
+
+ struct kevent kev;
+ EV_SET(&kev,
+ fd,
+ EVFILT_VNODE,
+ EV_ADD | EV_ENABLE | EV_CLEAR,
+ NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_RENAME | NOTE_REVOKE,
+ 0,
+ 0);
+ if (kevent(kqfd, &kev, 1, 0, 0, 0) == -1) {
+ perror("QKqueueFileSystemWatcherEngine::addPaths: kevent");
::close(fd);
continue;
}
- }
- struct kevent kev;
- EV_SET(&kev,
- fd,
- EVFILT_VNODE,
- EV_ADD | EV_ENABLE | EV_ONESHOT,
- NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_RENAME | NOTE_REVOKE,
- 0,
- 0);
- if (kevent(kqfd, &kev, 1, 0, 0, 0) == -1) {
- perror("QKqueueFileSystemWatcherEngine::addPaths: kevent");
- ::close(fd);
- continue;
- }
+ it.remove();
+ if (id < 0) {
+ DEBUG() << "QKqueueFileSystemWatcherEngine: added directory path" << path;
+ directories->append(path);
+ } else {
+ DEBUG() << "QKqueueFileSystemWatcherEngine: added file path" << path;
+ files->append(path);
+ }
- it.remove();
- if (id < 0) {
- DEBUG() << "QKqueueFileSystemWatcherEngine: added directory path" << path;
- directories->append(path);
- } else {
- DEBUG() << "QKqueueFileSystemWatcherEngine: added file path" << path;
- files->append(path);
+ pathToID.insert(path, id);
+ idToPath.insert(id, path);
}
-
- pathToID.insert(path, id);
- idToPath.insert(id, path);
}
if (!isRunning())
@@ -194,43 +204,35 @@ QStringList QKqueueFileSystemWatcherEngine::removePaths(const QStringList &paths
QStringList *files,
QStringList *directories)
{
- QMutexLocker locker(&mutex);
-
+ bool isEmpty;
QStringList p = paths;
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- int id = pathToID.take(path);
- QString x = idToPath.take(id);
- if (x.isEmpty() || x != path)
- continue;
-
- int fd = id < 0 ? -id : id;
- struct kevent kev;
- EV_SET(&kev,
- fd,
- EVFILT_VNODE,
- EV_DELETE,
- NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_RENAME | NOTE_REVOKE,
- 0,
- 0);
- if (kevent(kqfd, &kev, 1, 0, 0, 0) == -1) {
- perror("QKqueueFileSystemWatcherEngine::removeWatch: kevent");
- }
- ::close(fd);
+ {
+ QMutexLocker locker(&mutex);
+ if (pathToID.isEmpty())
+ return p;
+
+ QMutableListIterator<QString> it(p);
+ while (it.hasNext()) {
+ QString path = it.next();
+ int id = pathToID.take(path);
+ QString x = idToPath.take(id);
+ if (x.isEmpty() || x != path)
+ continue;
- it.remove();
- if (id < 0)
- directories->removeAll(path);
- else
- files->removeAll(path);
+ ::close(id < 0 ? -id : id);
+
+ it.remove();
+ if (id < 0)
+ directories->removeAll(path);
+ else
+ files->removeAll(path);
+ }
+ isEmpty = pathToID.isEmpty();
}
- if (pathToID.isEmpty()) {
+ if (isEmpty) {
stop();
- locker.unlock();
wait();
- locker.relock();
} else {
write(kqpipe[1], "@", 1);
}
@@ -245,19 +247,15 @@ void QKqueueFileSystemWatcherEngine::stop()
void QKqueueFileSystemWatcherEngine::run()
{
- static const struct timespec ZeroTimeout = { 0, 0 };
-
forever {
+ int r;
struct kevent kev;
DEBUG() << "QKqueueFileSystemWatcherEngine: waiting for kevents...";
- int r = kevent(kqfd, 0, 0, &kev, 1, 0);
+ EINTR_LOOP(r, kevent(kqfd, 0, 0, &kev, 1, 0));
if (r < 0) {
perror("QKqueueFileSystemWatcherEngine: error during kevent wait");
return;
- }
-
- QMutexLocker locker(&mutex);
- do {
+ } else {
int fd = kev.ident;
DEBUG() << "QKqueueFileSystemWatcherEngine: processing kevent" << kev.ident << kev.filter;
@@ -289,6 +287,8 @@ void QKqueueFileSystemWatcherEngine::run()
break;
}
} else {
+ QMutexLocker locker(&mutex);
+
int id = fd;
QString path = idToPath.value(id);
if (path.isEmpty()) {
@@ -297,12 +297,12 @@ void QKqueueFileSystemWatcherEngine::run()
path = idToPath.value(id);
if (path.isEmpty()) {
DEBUG() << "QKqueueFileSystemWatcherEngine: received a kevent for a file we're not watching";
- goto process_next_event;
+ continue;
}
}
if (kev.filter != EVFILT_VNODE) {
DEBUG() << "QKqueueFileSystemWatcherEngine: received a kevent with the wrong filter";
- goto process_next_event;
+ continue;
}
if ((kev.fflags & (NOTE_DELETE | NOTE_REVOKE | NOTE_RENAME)) != 0) {
@@ -317,31 +317,15 @@ void QKqueueFileSystemWatcherEngine::run()
else
emit fileChanged(path, true);
} else {
- DEBUG() << path << "changed, re-enabling watch";
+ DEBUG() << path << "changed";
if (id < 0)
emit directoryChanged(path, false);
else
emit fileChanged(path, false);
-
- // renable the watch
- EV_SET(&kev,
- fd,
- EVFILT_VNODE,
- EV_ADD | EV_ENABLE | EV_ONESHOT,
- NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_RENAME | NOTE_REVOKE,
- 0,
- 0);
- if (kevent(kqfd, &kev, 1, 0, 0, 0) == -1) {
- perror("QKqueueFileSystemWatcherEngine::processKqueueEvents: kevent EV_ADD");
- }
}
}
-
- // are there any more?
-process_next_event:
- r = kevent(kqfd, 0, 0, &kev, 1, &ZeroTimeout);
- } while (r > 0);
+ }
}
}
diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp
index 6136742..ee66c36 100644
--- a/src/corelib/io/qfilesystemwatcher_symbian.cpp
+++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp
@@ -215,7 +215,7 @@ void QSymbianFileSystemWatcherEngine::emitPathChanged(QNotifyChangeEvent *e)
void QSymbianFileSystemWatcherEngine::stop()
{
- QMetaObject::invokeMethod(this, "quit");
+ quit();
wait();
}
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 8544fba..f8eb886 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -395,7 +395,10 @@ QIODevice::QIODevice(QIODevicePrivate &dd, QObject *parent)
/*!
- Destructs the QIODevice object.
+ The destructor is virtual, and QIODevice is an abstract base
+ class. This destructor does not call close(), but the subclass
+ destructor might. If you are in doubt, call close() before
+ destroying the QIODevice.
*/
QIODevice::~QIODevice()
{
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index aa7e32f..91c20b5 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -86,7 +86,8 @@ extern uint qGlobalPostedEventsCount();
enum {
WM_QT_SOCKETNOTIFIER = WM_USER,
- WM_QT_SENDPOSTEDEVENTS = WM_USER + 1
+ WM_QT_SENDPOSTEDEVENTS = WM_USER + 1,
+ SendPostedEventsWindowsTimerId = ~1u
};
#if defined(Q_OS_WINCE)
@@ -355,7 +356,7 @@ public:
// for controlling when to send posted events
QAtomicInt serialNumber;
- int lastSerialNumber;
+ int lastSerialNumber, sendPostedEventsWindowsTimerId;
QAtomicInt wakeUps;
// timers
@@ -380,7 +381,7 @@ public:
QEventDispatcherWin32Private::QEventDispatcherWin32Private()
: threadId(GetCurrentThreadId()), interrupt(false), internalHwnd(0), getMessageHook(0),
- serialNumber(0), lastSerialNumber(0), wakeUps(0)
+ serialNumber(0), lastSerialNumber(0), sendPostedEventsWindowsTimerId(0), wakeUps(0)
{
resolveTimerAPI();
}
@@ -487,17 +488,21 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
}
}
return 0;
- } else if (message == WM_TIMER) {
- Q_ASSERT(d != 0);
- d->sendTimerEvent(wp);
- return 0;
- } else if (message == WM_QT_SENDPOSTEDEVENTS) {
+ } else if (message == WM_QT_SENDPOSTEDEVENTS
+ // we also use a Windows timer to send posted events when the message queue is full
+ || (message == WM_TIMER
+ && d->sendPostedEventsWindowsTimerId != 0
+ && wp == d->sendPostedEventsWindowsTimerId)) {
int localSerialNumber = d->serialNumber;
if (localSerialNumber != d->lastSerialNumber) {
d->lastSerialNumber = localSerialNumber;
QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
}
return 0;
+ } else if (message == WM_TIMER) {
+ Q_ASSERT(d != 0);
+ d->sendTimerEvent(wp);
+ return 0;
}
return DefWindowProc(hwnd, message, wp, lp);
@@ -509,21 +514,36 @@ LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
QEventDispatcherWin32 *q = qobject_cast<QEventDispatcherWin32 *>(QAbstractEventDispatcher::instance());
Q_ASSERT(q != 0);
if (q) {
+ MSG *msg = (MSG *) lp;
QEventDispatcherWin32Private *d = q->d_func();
int localSerialNumber = d->serialNumber;
- MSG unused;
- if ((HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT)) == 0
- && PeekMessage(&unused, 0, WM_TIMER, WM_TIMER, PM_NOREMOVE) == 0)) {
- // no more input or timer events in the message queue or more than 10ms has elapsed since
- // we send posted events, we can allow posted events to be sent now
+ if (HIWORD(GetQueueStatus(QS_TIMER | QS_INPUT | QS_RAWINPUT)) == 0) {
+ // no more input or timer events in the message queue, we can allow posted events to be sent normally now
+ if (d->sendPostedEventsWindowsTimerId != 0) {
+ // stop the timer to send posted events, since we now allow the WM_QT_SENDPOSTEDEVENTS message
+ KillTimer(d->internalHwnd, d->sendPostedEventsWindowsTimerId);
+ d->sendPostedEventsWindowsTimerId = 0;
+ }
(void) d->wakeUps.fetchAndStoreRelease(0);
- MSG *msg = (MSG *) lp;
if (localSerialNumber != d->lastSerialNumber
// if this message IS the one that triggers sendPostedEvents(), no need to post it again
&& (msg->hwnd != d->internalHwnd
|| msg->message != WM_QT_SENDPOSTEDEVENTS)) {
PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0);
}
+ } else if (d->sendPostedEventsWindowsTimerId == 0
+ && localSerialNumber != d->lastSerialNumber
+ // if this message IS the one that triggers sendPostedEvents(), no need to post it again
+ && (msg->hwnd != d->internalHwnd
+ || msg->message != WM_QT_SENDPOSTEDEVENTS)) {
+ // start a special timer to continue delivering posted events while
+ // there are still input and timer messages in the message queue
+ d->sendPostedEventsWindowsTimerId = SetTimer(d->internalHwnd,
+ SendPostedEventsWindowsTimerId,
+ 0, // we specify zero, but Windows uses USER_TIMER_MINIMUM
+ NULL);
+ // we don't check the return value of SetTimer()... if creating the timer failed, there's little
+ // we can do. we just have to accept that posted events will be starved
}
}
}
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index db46ba5..b4e4aa5 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -215,11 +215,15 @@ Q_CORE_EXPORT const char *qFlagLocation(const char *method);
#define QTOSTRING(s) QTOSTRING_HELPER(s)
#ifndef QT_NO_DEBUG
# define QLOCATION "\0"__FILE__":"QTOSTRING(__LINE__)
-# define METHOD(a) qFlagLocation("0"#a QLOCATION)
+# ifndef QT_NO_KEYWORDS
+# define METHOD(a) qFlagLocation("0"#a QLOCATION)
+# endif
# define SLOT(a) qFlagLocation("1"#a QLOCATION)
# define SIGNAL(a) qFlagLocation("2"#a QLOCATION)
#else
-# define METHOD(a) "0"#a
+# ifndef QT_NO_KEYWORDS
+# define METHOD(a) "0"#a
+# endif
# define SLOT(a) "1"#a
# define SIGNAL(a) "2"#a
#endif
diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp
index 78556c3..da76b74 100644
--- a/src/corelib/kernel/qtcore_eval.cpp
+++ b/src/corelib/kernel/qtcore_eval.cpp
@@ -90,14 +90,14 @@ static const char will_shutdown_now[] =
static int qt_eval_is_supported()
{
- const char *const license_key = qt_eval_key_data + 12;
+ const volatile char *const license_key = qt_eval_key_data + 12;
// fast fail
if (!qt_eval_key_data[0] || !*license_key)
return -1;
// is this an unsupported evaluation?
- const char* typecode = license_key;
+ const volatile char *typecode = license_key;
int field = 2;
for ( ; field && *typecode; ++typecode)
if (*typecode == '-')
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 69b70cb..c9ff8d3 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -173,7 +173,8 @@ void QAdoptedThread::run()
*/
QThreadPrivate::QThreadPrivate(QThreadData *d)
- : QObjectPrivate(), running(false), finished(false), terminated(false), exited(false), returnCode(-1),
+ : QObjectPrivate(), running(false), finished(false), terminated(false),
+ isInFinish(false), exited(false), returnCode(-1),
stackSize(0), priority(QThread::InheritPriority), data(d)
{
#if defined (Q_OS_UNIX)
@@ -403,6 +404,11 @@ QThread::~QThread()
Q_D(QThread);
{
QMutexLocker locker(&d->mutex);
+ if (d->isInFinish) {
+ locker.unlock();
+ wait();
+ locker.relock();
+ }
if (d->running && !d->finished)
qWarning("QThread: Destroyed while thread is still running");
@@ -482,8 +488,10 @@ int QThread::exec()
Q_D(QThread);
QMutexLocker locker(&d->mutex);
d->data->quitNow = false;
- if (d->exited)
+ if (d->exited) {
+ d->exited = false;
return d->returnCode;
+ }
locker.unlock();
QEventLoop eventLoop;
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index d816aef..51c6991 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -126,6 +126,7 @@ public:
bool running;
bool finished;
bool terminated;
+ bool isInFinish; //when in QThreadPrivate::finish
bool exited;
int returnCode;
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index f508c0a..0892d8e 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -99,6 +99,11 @@
# define SCHED_IDLE 5
#endif
+#if defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
+#define QT_HAS_THREAD_PRIORITY_SCHEDULING
+#endif
+
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_THREAD
@@ -140,6 +145,7 @@ static void create_current_thread_data_key()
static void destroy_current_thread_data_key()
{
+ pthread_once(&current_thread_data_once, create_current_thread_data_key);
pthread_key_delete(current_thread_data_key);
}
Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key)
@@ -333,40 +339,45 @@ void QThreadPrivate::finish(void *arg)
{
QThread *thr = reinterpret_cast<QThread *>(arg);
QThreadPrivate *d = thr->d_func();
+
#ifdef Q_OS_SYMBIAN
- if (lockAnyway)
+ QMutexLocker locker(lockAnyway ? &d->mutex : 0);
+#else
+ QMutexLocker locker(&d->mutex);
#endif
- d->mutex.lock();
+ d->isInFinish = true;
d->priority = QThread::InheritPriority;
- d->running = false;
- d->finished = true;
- if (d->terminated)
+ bool terminated = d->terminated;
+ void *data = &d->data->tls;
+ locker.unlock();
+ if (terminated)
emit thr->terminated();
- d->terminated = false;
emit thr->finished();
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QThreadStorageData::finish((void **)data);
+ locker.relock();
+ d->terminated = false;
- if (d->data->eventDispatcher) {
- d->data->eventDispatcher->closingDown();
- QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher;
+ QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher;
+ if (eventDispatcher) {
d->data->eventDispatcher = 0;
+ locker.unlock();
+ eventDispatcher->closingDown();
delete eventDispatcher;
+ locker.relock();
}
- void *data = &d->data->tls;
- QThreadStorageData::finish((void **)data);
-
d->thread_id = 0;
#ifdef Q_OS_SYMBIAN
if (closeNativeHandle)
d->data->symbian_thread_handle.Close();
#endif
+ d->running = false;
+ d->finished = true;
+
+ d->isInFinish = false;
d->thread_done.wakeAll();
-#ifdef Q_OS_SYMBIAN
- if (lockAnyway)
-#endif
- d->mutex.unlock();
}
@@ -506,10 +517,10 @@ void QThread::usleep(unsigned long usecs)
thread_sleep(&ti);
}
+#ifdef QT_HAS_THREAD_PRIORITY_SCHEDULING
// Does some magic and calculate the Unix scheduler priorities
// sched_policy is IN/OUT: it must be set to a valid policy before calling this function
// sched_priority is OUT only
-#if defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
static bool calculateUnixPriority(int priority, int *sched_policy, int *sched_priority)
{
#ifdef SCHED_IDLE
@@ -543,6 +554,10 @@ void QThread::start(Priority priority)
{
Q_D(QThread);
QMutexLocker locker(&d->mutex);
+
+ if (d->isInFinish)
+ d->thread_done.wait(locker.mutex());
+
if (d->running)
return;
@@ -558,7 +573,7 @@ void QThread::start(Priority priority)
d->priority = priority;
-#if defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && !defined(Q_OS_SYMBIAN) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
+#if defined(QT_HAS_THREAD_PRIORITY_SCHEDULING) && !defined(Q_OS_SYMBIAN)
// ### Need to implement thread sheduling and priorities for symbian os. Implementation removed for now
switch (priority) {
case InheritPriority:
@@ -599,7 +614,7 @@ void QThread::start(Priority priority)
break;
}
}
-#endif // _POSIX_THREAD_PRIORITY_SCHEDULING
+#endif // QT_HAS_THREAD_PRIORITY_SCHEDULING
#ifdef Q_OS_SYMBIAN
if (d->stackSize == 0)
@@ -762,7 +777,7 @@ void QThread::setPriority(Priority priority)
// copied from start() with a few modifications:
-#if defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
+#ifdef QT_HAS_THREAD_PRIORITY_SCHEDULING
int sched_policy;
sched_param param;
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 4a967ed..74fedd3 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -323,25 +323,33 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway)
QThread *thr = reinterpret_cast<QThread *>(arg);
QThreadPrivate *d = thr->d_func();
- if (lockAnyway)
- d->mutex.lock();
+ QMutexLocker locker(lockAnyway ? &d->mutex : 0);
+ d->isInFinish = true;
d->priority = QThread::InheritPriority;
- d->running = false;
- d->finished = true;
- if (d->terminated)
+ bool terminated = d->terminated;
+ void **tls_data = reinterpret_cast<void **>(&d->data->tls);
+ locker.unlock();
+ if (terminated)
emit thr->terminated();
- d->terminated = false;
emit thr->finished();
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QThreadStorageData::finish(tls_data);
+ locker.relock();
+
+ d->terminated = false;
- if (d->data->eventDispatcher) {
- d->data->eventDispatcher->closingDown();
- QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher;
+ QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher;
+ if (eventDispatcher) {
d->data->eventDispatcher = 0;
+ locker.unlock();
+ eventDispatcher->closingDown();
delete eventDispatcher;
+ locker.relock();
}
- QThreadStorageData::finish(reinterpret_cast<void **>(&d->data->tls));
+ d->running = false;
+ d->finished = true;
+ d->isInFinish = false;
if (!d->waiters) {
CloseHandle(d->handle);
@@ -350,8 +358,6 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway)
d->id = 0;
- if (lockAnyway)
- d->mutex.unlock();
}
/**************************************************************************
@@ -400,6 +406,12 @@ void QThread::start(Priority priority)
Q_D(QThread);
QMutexLocker locker(&d->mutex);
+ if (d->isInFinish) {
+ locker.unlock();
+ wait();
+ locker.relock();
+ }
+
if (d->running)
return;
diff --git a/src/corelib/thread/qthreadstorage.cpp b/src/corelib/thread/qthreadstorage.cpp
index 2fc04f5..416fcfb 100644
--- a/src/corelib/thread/qthreadstorage.cpp
+++ b/src/corelib/thread/qthreadstorage.cpp
@@ -178,11 +178,12 @@ void QThreadStorageData::finish(void **p)
return; // nothing to do
DEBUG_MSG("QThreadStorageData: Destroying storage for thread %p", QThread::currentThread());
-
- for(int i = tls->size() - 1; i >= 0; i--) {
- void *&value = (*tls)[i];
+ while (!tls->isEmpty()) {
+ void *&value = tls->last();
void *q = value;
value = 0;
+ int i = tls->size() - 1;
+ tls->resize(i);
if (!q) {
// data already deleted
@@ -200,6 +201,11 @@ void QThreadStorageData::finish(void **p)
continue;
}
destructor(q); //crash here might mean the thread exited after qthreadstorage was destroyed
+
+ if (tls->size() > i) {
+ //re reset the tls in case it has been recreated by its own destructor.
+ (*tls)[i] = 0;
+ }
}
tls->clear();
}
@@ -215,19 +221,18 @@ void QThreadStorageData::finish(void **p)
QThreadStorage is a template class that provides per-thread data
storage.
- \e{Note that due to compiler limitations, QThreadStorage can only
- store pointers.}
-
The setLocalData() function stores a single thread-specific value
for the calling thread. The data can be accessed later using
- localData(). QThreadStorage takes ownership of the data (which
- must be created on the heap with \c new) and deletes it when the
- thread exits, either normally or via termination.
+ localData().
The hasLocalData() function allows the programmer to determine if
data has previously been set using the setLocalData() function.
This is also useful for lazy initializiation.
+ If T is a pointer type, QThreadStorage takes ownership of the data
+ (which must be created on the heap with \c new) and deletes it when
+ the thread exits, either normally or via termination.
+
For example, the following code uses QThreadStorage to store a
single cache for each thread that calls the cacheObject() and
removeFromCache() functions. The cache is automatically
@@ -241,9 +246,6 @@ void QThreadStorageData::finish(void **p)
\list
- \o As noted above, QThreadStorage can only store pointers due to
- compiler limitations.
-
\o The QThreadStorage destructor does not delete per-thread data.
QThreadStorage only deletes per-thread data when the thread exits
or when setLocalData() is called multiple times.
@@ -279,8 +281,11 @@ void QThreadStorageData::finish(void **p)
/*!
\fn bool QThreadStorage::hasLocalData() const
- Returns true if the calling thread has non-zero data available;
- otherwise returns false.
+ If T is a pointer type, returns true if the calling thread has
+ non-zero data available.
+
+ If T is a value type, returns whether the data has already been
+ constructed by calling setLocalData or localData.
\sa localData()
*/
@@ -291,10 +296,8 @@ void QThreadStorageData::finish(void **p)
Returns a reference to the data that was set by the calling
thread.
- Note: QThreadStorage can only store pointers. This function
- returns a reference to the pointer that was set by the calling
- thread. The value of this reference is 0 if no data was set by
- the calling thread,
+ If no data has been set, this will create a default constructed
+ instance of type T.
\sa hasLocalData()
*/
@@ -305,10 +308,6 @@ void QThreadStorageData::finish(void **p)
Returns a copy of the data that was set by the calling thread.
- Note: QThreadStorage can only store pointers. This function
- returns a pointer to the data that was set by the calling thread.
- If no data was set by the calling thread, this function returns 0.
-
\sa hasLocalData()
*/
@@ -318,19 +317,9 @@ void QThreadStorageData::finish(void **p)
Sets the local data for the calling thread to \a data. It can be
accessed later using the localData() functions.
- If \a data is 0, this function deletes the previous data (if
- any) and returns immediately.
-
- If \a data is non-zero, QThreadStorage takes ownership of the \a
- data and deletes it automatically either when the thread exits
- (either normally or via termination) or when setLocalData() is
- called again.
-
- Note: QThreadStorage can only store pointers. The \a data
- argument must be either a pointer to an object created on the heap
- (i.e. using \c new) or 0. You should not delete \a data
- yourself; QThreadStorage takes ownership and will delete the \a
- data itself.
+ If T is a pointer type, QThreadStorage takes ownership of the data
+ and deletes it automatically either when the thread exits (either
+ normally or via termination) or when setLocalData() is called again.
\sa localData(), hasLocalData()
*/
diff --git a/src/corelib/thread/qthreadstorage.h b/src/corelib/thread/qthreadstorage.h
index 6264674..475d20d 100644
--- a/src/corelib/thread/qthreadstorage.h
+++ b/src/corelib/thread/qthreadstorage.h
@@ -91,6 +91,11 @@ inline
void qThreadStorage_setLocalData(QThreadStorageData &d, T **t)
{ (void) d.set(*t); }
+template <typename T>
+inline
+void qThreadStorage_deleteData(void *d, T **)
+{ delete static_cast<T *>(d); }
+
// value-based specialization
template <typename T>
inline
@@ -114,6 +119,12 @@ inline
void qThreadStorage_setLocalData(QThreadStorageData &d, T *t)
{ (void) d.set(new T(*t)); }
+template <typename T>
+inline
+void qThreadStorage_deleteData(void *d, T *)
+{ delete static_cast<T *>(d); }
+
+
// MOC_SKIP_END
#endif
@@ -126,7 +137,7 @@ private:
Q_DISABLE_COPY(QThreadStorage)
static inline void deleteData(void *x)
- { delete static_cast<T>(x); }
+ { qThreadStorage_deleteData(x, reinterpret_cast<T*>(0)); }
public:
inline QThreadStorage() : d(deleteData) { }
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index bb777cd..fba0bd2 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -48,11 +48,11 @@
# undef QT_NO_CAST_TO_ASCII
#endif
#include "qchar.h"
+
#include "qdatastream.h"
#include "qtextcodec.h"
#include "qunicodetables_p.h"
-
#include "qunicodetables.cpp"
QT_BEGIN_NAMESPACE
@@ -1489,6 +1489,16 @@ static void decomposeHelper(QString *str, bool canonical, QChar::UnicodeVersion
}
+struct UCS2Pair {
+ ushort u1;
+ ushort u2;
+};
+
+inline bool operator<(ushort u1, const UCS2Pair &ligature)
+{ return u1 < ligature.u1; }
+inline bool operator<(const UCS2Pair &ligature, ushort u1)
+{ return ligature.u1 < u1; }
+
static ushort ligatureHelper(ushort u1, ushort u2)
{
// hangul L-V pair
@@ -1511,12 +1521,14 @@ static ushort ligatureHelper(ushort u1, ushort u2)
if (index == 0xffff)
return 0;
const unsigned short *ligatures = uc_ligature_map+index;
- ushort length = *ligatures;
- ++ligatures;
- // ### use bsearch
- for (uint i = 0; i < length; ++i)
- if (ligatures[2*i] == u1)
- return ligatures[2*i+1];
+ ushort length = *ligatures++;
+ {
+ const UCS2Pair *data = reinterpret_cast<const UCS2Pair *>(ligatures);
+ const UCS2Pair *r = qBinaryFind(data, data + length, u1);
+ if (r != data + length)
+ return r->u2;
+ }
+
return 0;
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 2fb3616..83d6dcd 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -77,7 +77,7 @@ QT_END_NAMESPACE
#include <qdebug.h>
#include <time.h>
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
# include <fenv.h>
#endif
@@ -6637,7 +6637,7 @@ Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *si
_control87(MCW_EM, MCW_EM);
#endif
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
fenv_t envp;
feholdexcept(&envp);
#endif
@@ -6653,7 +6653,7 @@ Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *si
#endif //_M_X64
#endif //Q_OS_WIN
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
fesetenv(&envp);
#endif
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index ac8ccba..d44a9d0 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -140,7 +140,7 @@ static inline uint detectProcessorFeatures()
#if defined(QT_HAVE_IWMMXT)
// runtime detection only available when running as a previlegied process
features = IWMMXT;
-#elif defined(QT_HAVE_NEON)
+#elif defined(QT_ALWAYS_HAVE_NEON)
features = NEON;
#endif
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 664543b..2dbed76 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -87,9 +87,13 @@ QT_BEGIN_HEADER
#include <tmmintrin.h>
#endif
-// SSE4.1 and SSE4.2 intrinsics
-#if (defined(QT_HAVE_SSE4_1) || defined(QT_HAVE_SSE4_2)) && (defined(__SSE4_1__) || defined(Q_CC_MSVC))
+// SSE4.1 intrinsics
+#if defined(QT_HAVE_SSE4_1) && (defined(__SSE4_1__) || defined(Q_CC_MSVC))
#include <smmintrin.h>
+#endif
+
+// SSE4.2 intrinsics
+#if defined(QT_HAVE_SSE4_2) && (defined(__SSE4_2__) || defined(Q_CC_MSVC))
#include <nmmintrin.h>
#endif
@@ -105,7 +109,8 @@ QT_BEGIN_HEADER
#endif // defined(QT_HAVE_SSE2) && (defined(__SSE2__) || defined(Q_CC_MSVC))
// NEON intrinsics
-#if defined(QT_HAVE_NEON)
+#if defined __ARM_NEON__
+#define QT_ALWAYS_HAVE_NEON
#include <arm_neon.h>
#endif
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index a3d89f2..c30af64 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -714,7 +714,7 @@ const QString::Null QString::null = { };
formats, the \e precision represents the maximum number of
significant digits (trailing zeroes are omitted).
- \section1 More Efficient String Construction
+ \section1 More Efficient String Construction
Using the QString \c{'+'} operator, it is easy to construct a
complex string from multiple substrings. You will often write code
@@ -924,7 +924,7 @@ int QString::grow(int size)
/*!
\since 4.2
- Returns a copy of the \a string, where the encoding of \a string depends on
+ Returns a copy of the \a string, where the encoding of \a string depends on
the size of wchar. If wchar is 4 bytes, the \a string is interpreted as ucs-4,
if wchar is 2 bytes it is interpreted as ucs-2.
@@ -3606,7 +3606,7 @@ static QByteArray toLatin1_helper(const QChar *data, int length)
}
length = length % 16;
}
-#elif QT_HAVE_NEON
+#elif defined(QT_ALWAYS_HAVE_NEON)
// Refer to the documentation of the SSE2 implementation
// this use eactly the same method as for SSE except:
// 1) neon has unsigned comparison
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 0f786e3..98c213c 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -281,7 +281,6 @@ void QDeclarativeFlickablePrivate::fixupY()
void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)
{
- Q_Q(QDeclarativeFlickable);
if (data.move.value() > minExtent || maxExtent > minExtent) {
timeline.reset(data.move);
if (data.move.value() != minExtent) {
@@ -290,8 +289,7 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal
timeline.move(data.move, minExtent - dist/2, QEasingCurve(QEasingCurve::InQuad), fixupDuration/4);
timeline.move(data.move, minExtent, QEasingCurve(QEasingCurve::OutExpo), 3*fixupDuration/4);
} else {
- data.move.setValue(minExtent);
- q->viewportMoved();
+ timeline.set(data.move, minExtent);
}
}
} else if (data.move.value() < maxExtent) {
@@ -301,8 +299,7 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal
timeline.move(data.move, maxExtent - dist/2, QEasingCurve(QEasingCurve::InQuad), fixupDuration/4);
timeline.move(data.move, maxExtent, QEasingCurve(QEasingCurve::OutExpo), 3*fixupDuration/4);
} else {
- data.move.setValue(maxExtent);
- q->viewportMoved();
+ timeline.set(data.move, minExtent);
}
}
vTime = timeline.time();
@@ -386,6 +383,13 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd()
\snippet doc/src/snippets/declarative/flickable.qml document
\clearfloat
+
+ Items declared as children of a Flickable are automatically parented to the
+ Flickable's \l contentItem. This should be taken into account when
+ operating on the children of the Flickable; it is usually the children of
+ \c contentItem that are relevant. For example, the bound of Items added
+ to the Flickable will be available by \c contentItem.childrenRect
+
\section1 Limitations
\note Due to an implementation detail, items placed inside a Flickable cannot anchor to it by
@@ -696,6 +700,9 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
bool rejectY = false;
bool rejectX = false;
+ bool stealY = false;
+ bool stealX = false;
+
if (q->yflick()) {
int dy = int(event->pos().y() - pressPos.y());
if (qAbs(dy) > QApplication::startDragDistance() || QDeclarativeItemPrivate::elapsed(pressTime) > 200) {
@@ -724,7 +731,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
vMoved = true;
}
if (qAbs(dy) > QApplication::startDragDistance())
- stealMouse = true;
+ stealY = true;
}
}
@@ -757,10 +764,12 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
}
if (qAbs(dx) > QApplication::startDragDistance())
- stealMouse = true;
+ stealX = true;
}
}
+ stealMouse = stealX || stealY;
+
if (!lastPos.isNull()) {
qreal elapsed = qreal(QDeclarativeItemPrivate::restart(lastPosTime)) / 1000.;
if (elapsed <= 0)
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 94b1cb3..450b6af 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp