summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/declarative/samegame/samegame.qml2
-rw-r--r--demos/embedded/qmlcalculator/deployment.pri2
-rw-r--r--demos/embedded/qmlclocks/deployment.pri2
-rw-r--r--demos/embedded/qmldialcontrol/deployment.pri2
-rw-r--r--demos/embedded/qmleasing/deployment.pri2
-rw-r--r--demos/embedded/qmlflickr/deployment.pri2
-rw-r--r--demos/embedded/qmlphotoviewer/deployment.pri2
-rw-r--r--demos/embedded/qmltwitter/deployment.pri2
-rw-r--r--demos/qtdemo/qmlShell.qml11
-rw-r--r--doc/src/declarative/pics/ListViewSections.pngbin7596 -> 5491 bytes
-rw-r--r--doc/src/declarative/qdeclarativeperformance.qdoc12
-rw-r--r--doc/src/examples/qml-examples.qdoc2
-rw-r--r--examples/declarative/modelviews/listview/PetsModel.qml3
-rw-r--r--examples/declarative/modelviews/listview/RecipesModel.qml1
-rw-r--r--examples/declarative/modelviews/listview/content/PressAndHoldButton.qml11
-rw-r--r--examples/declarative/modelviews/listview/dynamiclist.qml2
-rw-r--r--examples/declarative/modelviews/listview/expandingdelegates.qml4
-rw-r--r--examples/declarative/modelviews/listview/highlight.qml4
-rw-r--r--examples/declarative/modelviews/listview/highlightranges.qml20
-rw-r--r--examples/declarative/modelviews/listview/sections.qml3
-rw-r--r--examples/declarative/modelviews/parallax/parallax.qml1
-rw-r--r--examples/multimedia/audioinput/audioinput.cpp5
-rw-r--r--mkspecs/features/qt_functions.prf3
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h11
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp21
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp9
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp37
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp12
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp13
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp24
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp71
-rw-r--r--src/gui/kernel/qapplication_win.cpp3
-rw-r--r--src/gui/kernel/qt_s60_p.h29
-rw-r--r--src/gui/text/qtextlayout.cpp14
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp4
-rw-r--r--src/multimedia/video/qabstractvideobuffer_p.h3
-rw-r--r--src/network/socket/qlocalsocket_win.cpp19
-rw-r--r--src/s60installs/bwins/QtCoreu.def1
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def13
-rw-r--r--src/s60installs/bwins/QtGuiu.def7
-rw-r--r--src/s60installs/eabi/QtCoreu.def2
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def17
-rw-r--r--src/s60installs/eabi/QtGuiu.def5
-rw-r--r--src/s60installs/s60installs.pro6
-rw-r--r--src/s60installs/sqlite3.sisbin286452 -> 286480 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml53
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp27
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.js7
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp14
-rw-r--r--tests/auto/linguist/lconvert/tst_lconvert.cpp2
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp2
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp19
-rw-r--r--tests/auto/qtimeline/tst_qtimeline.cpp12
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp27
-rw-r--r--tests/auto/qwidgetaction/tst_qwidgetaction.cpp6
58 files changed, 434 insertions, 170 deletions
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index 9c4bfa8..10bf79f 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -46,6 +46,7 @@ import "SamegameCore/samegame.js" as Logic
Rectangle {
id: screen
width: 490; height: 720
+ property bool inAnotherDemo: false //Samegame often is just plonked straight into other demos
SystemPalette { id: activePalette }
@@ -143,6 +144,7 @@ Rectangle {
}
Button {
+ visible: !inAnotherDemo
text: "Quit"
anchors { left: newGameButton.right; leftMargin: 3; verticalCenter: parent.verticalCenter }
onClicked: Qt.quit();
diff --git a/demos/embedded/qmlcalculator/deployment.pri b/demos/embedded/qmlcalculator/deployment.pri
index d5078f6..a0bfbb6 100644
--- a/demos/embedded/qmlcalculator/deployment.pri
+++ b/demos/embedded/qmlcalculator/deployment.pri
@@ -1,6 +1,6 @@
qmlcalculator_src = $$PWD/../../declarative/calculator
symbian {
- qmlcalculator_uid3 = EA8EBD98
+ qmlcalculator_uid3 = A000E3FB
qmlcalculator_files.path = ../$$qmlcalculator_uid3
}
qmlcalculator_files.sources = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core
diff --git a/demos/embedded/qmlclocks/deployment.pri b/demos/embedded/qmlclocks/deployment.pri
index 84803ec..a30e403 100644
--- a/demos/embedded/qmlclocks/deployment.pri
+++ b/demos/embedded/qmlclocks/deployment.pri
@@ -1,6 +1,6 @@
qmlclocks_src = $$PWD/../../../examples/declarative/toys/clocks
symbian {
- qmlclocks_uid3 = E19225B9
+ qmlclocks_uid3 = A000E3FC
qmlclocks_files.path = ../$$qmlclocks_uid3
}
qmlclocks_files.sources = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content
diff --git a/demos/embedded/qmldialcontrol/deployment.pri b/demos/embedded/qmldialcontrol/deployment.pri
index 8eb39b2..c04ed05 100644
--- a/demos/embedded/qmldialcontrol/deployment.pri
+++ b/demos/embedded/qmldialcontrol/deployment.pri
@@ -1,6 +1,6 @@
qmldialcontrol_src = $$PWD/../../../examples/declarative/ui-components/dialcontrol
symbian {
- qmldialcontrol_uid3 = E59A9283
+ qmldialcontrol_uid3 = A000E3FD
qmldialcontrol_files.path = ../$$qmldialcontrol_uid3
}
qmldialcontrol_files.sources = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content
diff --git a/demos/embedded/qmleasing/deployment.pri b/demos/embedded/qmleasing/deployment.pri
index ddab1ba..bc37348 100644
--- a/demos/embedded/qmleasing/deployment.pri
+++ b/demos/embedded/qmleasing/deployment.pri
@@ -1,6 +1,6 @@
qmleasing_src = $$PWD/../../../examples/declarative/animation/easing
symbian {
- qmleasing_uid3 = E8E8E725
+ qmleasing_uid3 = A000E3FE
qmleasing_files.path = ../$$qmleasing_uid3
}
qmleasing_files.sources = $$qmleasing_src/easing.qml
diff --git a/demos/embedded/qmlflickr/deployment.pri b/demos/embedded/qmlflickr/deployment.pri
index aef3198..c1f82df 100644
--- a/demos/embedded/qmlflickr/deployment.pri
+++ b/demos/embedded/qmlflickr/deployment.pri
@@ -1,6 +1,6 @@
qmlflickr_src = $$PWD/../../declarative/flickr
symbian {
- qmlflickr_uid3 = E56D5A92
+ qmlflickr_uid3 = A000E3FF
qmlflickr_files.path = ../$$qmlflickr_uid3
}
qmlflickr_files.sources = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile
diff --git a/demos/embedded/qmlphotoviewer/deployment.pri b/demos/embedded/qmlphotoviewer/deployment.pri
index 99475cc..0a457de 100644
--- a/demos/embedded/qmlphotoviewer/deployment.pri
+++ b/demos/embedded/qmlphotoviewer/deployment.pri
@@ -1,6 +1,6 @@
qmlphotoviewer_src = $$PWD/../../declarative/photoviewer
symbian {
- qmlphotoviewer_uid3 = E8567E72
+ qmlphotoviewer_uid3 = A000E400
qmlphotoviewer_files.path = ../$$qmlphotoviewer_uid3
}
qmlphotoviewer_files.sources = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore
diff --git a/demos/embedded/qmltwitter/deployment.pri b/demos/embedded/qmltwitter/deployment.pri
index e5bd884..34c8cd1 100644
--- a/demos/embedded/qmltwitter/deployment.pri
+++ b/demos/embedded/qmltwitter/deployment.pri
@@ -1,6 +1,6 @@
qmltwitter_src = $$PWD/../../declarative/twitter
symbian {
- qmltwitter_uid3 = EEF6D468
+ qmltwitter_uid3 = A000E401
qmltwitter_files.path = ../$$qmltwitter_uid3
}
qmltwitter_files.sources = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore
diff --git a/demos/qtdemo/qmlShell.qml b/demos/qtdemo/qmlShell.qml
index b1ee79a..5c5f96c 100644
--- a/demos/qtdemo/qmlShell.qml
+++ b/demos/qtdemo/qmlShell.qml
@@ -73,12 +73,17 @@ Item {
clip: true
source: qmlFile
anchors.centerIn: parent
- onStatusChanged: if(status == Loader.Ready) {
+ onStatusChanged:{
+ if(status == Loader.Null) {
+ loader.focus = false;//fixes QTBUG11411, probably because the focusScope needs to gain focus to focus the right child
+ }else if(status == Loader.Ready) {
if(loader.item.width > 640)
loader.item.width = 640;
if(loader.item.height > 480)
loader.item.height = 480;
- }
+ if(loader.item.inAnotherDemo != undefined)
+ loader.item.inAnotherDemo = true;
+ }}
}
Rectangle{ id: frame
@@ -139,7 +144,7 @@ Item {
MouseArea{
z: 8
enabled: main.show
- hoverEnabled: true //To steal focus from the buttons
+ hoverEnabled: main.show //To steal focus from the buttons
anchors.fill: parent
onClicked: main.show=false;
}
diff --git a/doc/src/declarative/pics/ListViewSections.png b/doc/src/declarative/pics/ListViewSections.png
index 9270126..4e8f076 100644
--- a/doc/src/declarative/pics/ListViewSections.png
+++ b/doc/src/declarative/pics/ListViewSections.png
Binary files differ
diff --git a/doc/src/declarative/qdeclarativeperformance.qdoc b/doc/src/declarative/qdeclarativeperformance.qdoc
index 1d3e8b7..26c1e89 100644
--- a/doc/src/declarative/qdeclarativeperformance.qdoc
+++ b/doc/src/declarative/qdeclarativeperformance.qdoc
@@ -103,4 +103,16 @@ a Loader as needed.
\o Fast data access - ensure the data model is as fast as possible.
\endlist
+\section1 Image resources over composition
+
+If possible, provide a single image resource, rather than using composition
+of a number of elements. For example, a frame with a shadow could be created using
+a Rectangle placed over an Image providing the shadow. It is more efficient to
+provide an image that includes the frame and the shadow.
+
+\section1 Limit JavaScript
+
+Avoid running JavaScript during animation. For example, running a complex
+JavaScript expression for each frame of an x property animation.
+
*/
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index 2e4b882..d9ab5e8 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -199,7 +199,7 @@
\title Models and Views: ListView
\example declarative/modelviews/listview
- This example shows how to use the ListView element.
+ These examples show how to use the ListView element.
*/
/*!
diff --git a/examples/declarative/modelviews/listview/PetsModel.qml b/examples/declarative/modelviews/listview/PetsModel.qml
index 70cdcdd..b77557d 100644
--- a/examples/declarative/modelviews/listview/PetsModel.qml
+++ b/examples/declarative/modelviews/listview/PetsModel.qml
@@ -40,10 +40,7 @@
import Qt 4.7
-// ListModel allows free form list models to be defined and populated.
-
ListModel {
- id: petsModel
ListElement {
name: "Polly"
type: "Parrot"
diff --git a/examples/declarative/modelviews/listview/RecipesModel.qml b/examples/declarative/modelviews/listview/RecipesModel.qml
index 03ab961..e6d829f 100644
--- a/examples/declarative/modelviews/listview/RecipesModel.qml
+++ b/examples/declarative/modelviews/listview/RecipesModel.qml
@@ -41,7 +41,6 @@
import Qt 4.7
ListModel {
- id: recipesModel
ListElement {
title: "Pancakes"
picture: "content/pics/pancakes.jpg"
diff --git a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml
index 7c174e3..0d5a255 100644
--- a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml
+++ b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml
@@ -51,6 +51,11 @@ Image {
scale: pressed ? 0.9 : 1
+ function release() {
+ autoRepeatClicks.stop()
+ container.pressed = false
+ }
+
SequentialAnimation on pressed {
id: autoRepeatClicks
running: false
@@ -70,10 +75,8 @@ Image {
anchors.fill: parent
onPressed: autoRepeatClicks.start()
- onReleased: {
- autoRepeatClicks.stop()
- container.pressed = false
- }
+ onReleased: container.release()
+ onCanceled: container.release()
}
}
diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/declarative/modelviews/listview/dynamiclist.qml
index 0e290f5..12c331b 100644
--- a/examples/declarative/modelviews/listview/dynamiclist.qml
+++ b/examples/declarative/modelviews/listview/dynamiclist.qml
@@ -45,7 +45,7 @@ import "content"
Rectangle {
id: container
- width: 640; height: 480
+ width: 500; height: 400
color: "#343434"
// The model:
diff --git a/examples/declarative/modelviews/listview/expandingdelegates.qml b/examples/declarative/modelviews/listview/expandingdelegates.qml
index 94ea48f..24d6386 100644
--- a/examples/declarative/modelviews/listview/expandingdelegates.qml
+++ b/examples/declarative/modelviews/listview/expandingdelegates.qml
@@ -138,7 +138,8 @@ Rectangle {
id: flick
width: parent.width
anchors { top: methodTitle.bottom; bottom: parent.bottom }
- contentHeight: methodText.height; clip: true
+ contentHeight: methodText.height
+ clip: true
Text { id: methodText; text: method; wrapMode: Text.WordWrap; width: details.width }
}
@@ -197,6 +198,5 @@ Rectangle {
anchors.fill: parent
model: RecipesModel {}
delegate: recipeDelegate
- clip: true
}
}
diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/declarative/modelviews/listview/highlight.qml
index 5748974..9f43409 100644
--- a/examples/declarative/modelviews/listview/highlight.qml
+++ b/examples/declarative/modelviews/listview/highlight.qml
@@ -38,6 +38,10 @@
**
****************************************************************************/
+// This example shows how to create your own highlight delegate for a ListView
+// that uses a SpringFollow animation to provide custom movement when the
+// highlight bar is moved between items.
+
import Qt 4.7
Rectangle {
diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges.qml
index 162d8b7..f0d7f75 100644
--- a/examples/declarative/modelviews/listview/highlightranges.qml
+++ b/examples/declarative/modelviews/listview/highlightranges.qml
@@ -43,31 +43,31 @@ import Qt 4.7
Rectangle {
width: 600; height: 300
- // Show the model in three lists, with different highlight ranges.
- // preferredHighlightBegin and preferredHighlightEnd set the
- // range in which to attempt to maintain the highlight.
+ // This example shows the same model in three different ListView items,
+ // with different highlight ranges. The highlight ranges are set by the
+ // preferredHighlightBegin and preferredHighlightEnd properties in ListView.
//
- // The second and third ListView set their currentIndex to be the
- // same as the first, and the first ListView is given keyboard focus.
+ // The second and third ListViews set their currentIndex to be the
+ // same as the first. The first ListView is given keyboard focus.
//
- // The first list does not set a highlight range, so its currentItem
+ // The first ListView does not set a highlight range, so its currentItem
// can move freely within the visible area. If it moves outside the
// visible area, the view is automatically scrolled to keep the current
// item visible.
//
- // The second list sets a highlight range which attempts to keep the
+ // The second ListView sets a highlight range which attempts to keep the
// current item within the the bounds of the range. However,
// items will not scroll beyond the beginning or end of the view,
// forcing the highlight to move outside the range at the ends.
//
- // The third list sets the highlightRangeMode to StrictlyEnforceRange
+ // The third ListView sets the highlightRangeMode to StrictlyEnforceRange
// and sets a range smaller than the height of an item. This
// forces the current item to change when the view is flicked,
// since the highlight is unable to move.
//
// Note that the first ListView sets its currentIndex to be equal to
- // the third ListView's currentIndex. By flicking List3 with
- // the mouse, the current index of List1 will be changed.
+ // the third ListView's currentIndex. By flicking the third ListView with
+ // the mouse, the current index of the first ListView will be changed.
ListView {
id: list1
diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/declarative/modelviews/listview/sections.qml
index 8c038a0..8e0a49f 100644
--- a/examples/declarative/modelviews/listview/sections.qml
+++ b/examples/declarative/modelviews/listview/sections.qml
@@ -38,6 +38,9 @@
**
****************************************************************************/
+// This example shows how a ListView can be separated into sections using
+// the ListView.section attached property.
+
import Qt 4.7
//! [0]
diff --git a/examples/declarative/modelviews/parallax/parallax.qml b/examples/declarative/modelviews/parallax/parallax.qml
index ec52a24..3b5c70a 100644
--- a/examples/declarative/modelviews/parallax/parallax.qml
+++ b/examples/declarative/modelviews/parallax/parallax.qml
@@ -73,6 +73,7 @@ Rectangle {
width: 300; height: 400
clip: true;
source: "../../../../demos/declarative/samegame/samegame.qml"
+ Component.onCompleted: item.inAnotherDemo = true;
}
}
diff --git a/examples/multimedia/audioinput/audioinput.cpp b/examples/multimedia/audioinput/audioinput.cpp
index 4a408a0..4e5f2a3 100644
--- a/examples/multimedia/audioinput/audioinput.cpp
+++ b/examples/multimedia/audioinput/audioinput.cpp
@@ -315,6 +315,11 @@ void InputTest::readMore()
void InputTest::toggleMode()
{
// Change bewteen pull and push modes
+ if (m_input != 0) {
+ disconnect(m_input, 0, this, 0);
+ m_input = 0;
+ }
+
m_audioInput->stop();
if (m_pullMode) {
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index a49c1a6..afc708a 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -51,8 +51,9 @@ defineTest(qtAddLibrary) {
INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
}
isEqual(LIB_NAME, QtWebKit) {
- # Needed for #include <QtXmlPatterns/QtXmlPatterns> because relative inclusion problem in toolchain
+ # Needed for because relative inclusion problem in toolchain
INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtXmlPatterns
+ INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtNetwork
}
isEqual(LIB_NAME, QtXmlPatterns) {
# Needed for #include <QtXmlPatterns/QtXmlPatterns> because relative inclusion problem in toolchain
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index cf458da..d4ca9eb 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -449,6 +449,11 @@ void QDeclarativeBorderImage::sciRequestFinished()
}
}
+void QDeclarativeBorderImage::doUpdate()
+{
+ update();
+}
+
void QDeclarativeBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
Q_D(QDeclarativeBorderImage);
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
index 5e725ca..07f049e 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
@@ -91,6 +91,7 @@ private:
void setGridScaledImage(const QDeclarativeGridScaledImage& sci);
private Q_SLOTS:
+ void doUpdate();
void requestFinished();
void sciRequestFinished();
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
index 3535109..01e4a00 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
@@ -77,11 +77,20 @@ public:
{
}
+
QDeclarativeScaleGrid *getScaleGrid()
{
Q_Q(QDeclarativeBorderImage);
- if (!border)
+ if (!border) {
border = new QDeclarativeScaleGrid(q);
+ static int borderChangedSignalIdx = -1;
+ static int doUpdateSlotIdx = -1;
+ if (borderChangedSignalIdx < 0)
+ borderChangedSignalIdx = QDeclarativeScaleGrid::staticMetaObject.indexOfSignal("borderChanged()");
+ if (doUpdateSlotIdx < 0)
+ doUpdateSlotIdx = QDeclarativeBorderImage::staticMetaObject.indexOfSlot("doUpdate()");
+ QMetaObject::connect(border, borderChangedSignalIdx, q, doUpdateSlotIdx);
+ }
return border;
}
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 6dfd4d9..3f681b7 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -914,8 +914,14 @@ void QDeclarativeFlickable::timerEvent(QTimerEvent *event)
d->delayedPressTimer.stop();
if (d->delayedPressEvent) {
QDeclarativeItem *grabber = scene() ? qobject_cast<QDeclarativeItem*>(scene()->mouseGrabberItem()) : 0;
- if (!grabber || grabber != this)
- scene()->sendEvent(d->delayedPressTarget, d->delayedPressEvent);
+ if (!grabber || grabber != this) {
+ // We replay the mouse press but the grabber we had might not be interessted by the event (e.g. overlay)
+ // so we reset the grabber
+ if (scene()->mouseGrabberItem() == d->delayedPressTarget)
+ d->delayedPressTarget->ungrabMouse();
+ //Use the event handler that will take care of finding the proper item to propagate the event
+ QApplication::sendEvent(scene(), d->delayedPressEvent);
+ }
delete d->delayedPressEvent;
d->delayedPressEvent = 0;
}
@@ -1206,8 +1212,17 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
break;
case QEvent::GraphicsSceneMouseRelease:
if (d->delayedPressEvent) {
- scene()->sendEvent(d->delayedPressTarget, d->delayedPressEvent);
+ // We replay the mouse press but the grabber we had might not be interessted by the event (e.g. overlay)
+ // so we reset the grabber
+ if (s->mouseGrabberItem() == d->delayedPressTarget)
+ d->delayedPressTarget->ungrabMouse();
+ //Use the event handler that will take care of finding the proper item to propagate the event
+ QApplication::sendEvent(scene(), d->delayedPressEvent);
d->clearDelayedPress();
+ // We send the release
+ scene()->sendEvent(s->mouseGrabberItem(), event);
+ // And the event has been consumed
+ return true;
}
d->handleMouseReleaseEvent(&mouseEvent);
break;
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 42b370b..336010f 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -345,10 +345,11 @@ void QDeclarativeContents::complete()
void QDeclarativeContents::itemGeometryChanged(QDeclarativeItem *changed, const QRectF &newGeometry, const QRectF &oldGeometry)
{
- if (newGeometry.width() != oldGeometry.width())
- calcWidth(changed);
- if (newGeometry.height() != oldGeometry.height())
- calcHeight(changed);
+ //### we can only pass changed if the left edge has moved left, or the right edge has moved right
+ if (newGeometry.width() != oldGeometry.width() || newGeometry.x() != oldGeometry.x())
+ calcWidth(/*changed*/);
+ if (newGeometry.height() != oldGeometry.height() || newGeometry.y() != oldGeometry.y())
+ calcHeight(/*changed*/);
}
void QDeclarativeContents::itemDestroyed(QDeclarativeItem *item)
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 48ac4a4..b0728c1 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1379,7 +1379,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
to set \e {clip: true} in order to have the out of view items clipped
nicely.
- \sa ListModel, GridView
+ \sa ListModel, GridView, {declarative/modelviews/listview}{ListView examples}
*/
QDeclarativeListView::QDeclarativeListView(QDeclarativeItem *parent)
@@ -1663,7 +1663,7 @@ int QDeclarativeListView::count() const
so as to stay with the current item, unless the highlightFollowsCurrentItem
property is false.
- \sa highlightItem, highlightFollowsCurrentItem
+ \sa highlightItem, highlightFollowsCurrentItem, {declarative/modelviews/listview}{ListView examples}
*/
QDeclarativeComponent *QDeclarativeListView::highlight() const
{
@@ -1940,28 +1940,41 @@ void QDeclarativeListView::setCacheBuffer(int b)
These properties hold the expression to be evaluated for the \l section attached property.
- \c section.property hold the name of the property to use to determine
- the section that holds the item.
+ The \l section attached property enables a ListView to be visually
+ separated into different parts. These properties determine how sections
+ are created.
+
+ \c section.property holds the name of the property that is the basis
+ of each section.
- \c section.criteria holds the criteria to use to access the section. It
- can be either:
+ \c section.criteria holds the criteria for forming each section based on
+ \c section.property. This value can be one of:
\list
- \o ViewSection.FullString (default) - section is the value of the property.
- \o ViewSection.FirstCharacter - section is the first character of the property value.
+ \o ViewSection.FullString (default) - sections are created based on the
+ \c section.property value.
+ \o ViewSection.FirstCharacter - sections are created based on the first
+ character of the \c section.property value (for example, 'A', 'B', 'C'
+ sections, etc. for an address book)
\endlist
\c section.delegate holds the delegate component for each section.
Each item in the list has attached properties named \c ListView.section and
\c ListView.prevSection. These may be used to place a section header for
- related items. The example below assumes that the model is sorted by size of
- pet. The section expression is the size property. If \c ListView.section and
- \c ListView.prevSection differ, the item will display a section header.
-
+ related items.
+
+ For example, here is a ListView that displays a list of animals, separated
+ into sections. Each item in the ListView is placed in a different section
+ depending on the "size" property of the model item. The \c sectionHeading
+ delegate component provides the light blue bar that marks the beginning of
+ each section.
+
\snippet examples/declarative/modelviews/listview/sections.qml 0
\image ListViewSections.png
+
+ \sa {declarative/modelviews/listview}{ListView examples}
*/
QDeclarativeViewSection *QDeclarativeListView::sectionCriteria()
{
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index c4956df..0bed41b 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -294,12 +294,12 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
/*!
\qmlsignal MouseArea::onCanceled()
- This handler is called when the mouse events are canceled, either because the event was not accepted or
- another element stole the mouse event handling. This signal is for advanced users, it's useful in case there
- is more than one mouse areas handling input, or when there is a mouse area inside a flickable. In the latter
- case, if you do some logic on pressed and then start dragging, the flickable will steal the mouse handling
- from the mouse area. In these cases, to reset the logic when there is no mouse handling anymore, you should
- use onCanceled, in addition to onReleased.
+ This handler is called when mouse events have been canceled, either because an event was not accepted, or
+ because another element stole the mouse event handling. This signal is for advanced use: it is useful when
+ there is more than one MouseArea that is handling input, or when there is a MouseArea inside a \l Flickable. In the latter
+ case, if you execute some logic on the pressed signal and then start dragging, the \l Flickable will steal the mouse handling
+ from the MouseArea. In these cases, to reset the logic when the MouseArea has lost the mouse handling to the
+ \l Flickable, \c onCanceled should be used in addition to onReleased.
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 995e22a..87da904 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -83,17 +83,10 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
\image repeater-simple.png
- The \l model of a Repeater can be specified as a model object, a number, a string list
- or an object list. If a model object is used, the
- \l delegate can access the model roles as named properties, just as for view elements like
- ListView and GridView.
+ The \l model of a Repeater can be any of the supported \l {qmlmodels}{Data Models}.
- The \l delegate can also access two additional properties:
-
- \list
- \o \c index - the index of the delegate's item
- \o \c modelData - the data element for the delegate, which is useful where the \l model is a string or object list
- \endlist
+ The index of a delegate is exposed as an accessible \c index property in the delegate.
+ Properties of the model are also available depending upon the type of \l {qmlmodels}{Data Model}.
Here is a Repeater that uses the \c index property inside the instantiated items:
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 25cf133..f807866 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -1344,24 +1344,14 @@ void QDeclarativeRotationAnimation::setTo(qreal t)
Possible values are:
- \table
- \row
- \o RotationAnimation.Numerical
- \o Rotate by linearly interpolating between the two numbers.
+ \list
+ \o RotationAnimation.Numerical (default) - Rotate by linearly interpolating between the two numbers.
A rotation from 10 to 350 will rotate 340 degrees clockwise.
- \row
- \o RotationAnimation.Clockwise
- \o Rotate clockwise between the two values
- \row
- \o RotationAnimation.Counterclockwise
- \o Rotate counterclockwise between the two values
- \row
- \o RotationAnimation.Shortest
- \o Rotate in the direction that produces the shortest animation path.
+ \o RotationAnimation.Clockwise - Rotate clockwise between the two values
+ \o RotationAnimation.Counterclockwise - Rotate counterclockwise between the two values
+ \o RotationAnimation.Shortest - Rotate in the direction that produces the shortest animation path.
A rotation from 10 to 350 will rotate 20 degrees counterclockwise.
- \endtable
-
- The default direction is RotationAnimation.Numerical.
+ \endlist
*/
QDeclarativeRotationAnimation::RotationDirection QDeclarativeRotationAnimation::direction() const
{
@@ -1747,7 +1737,7 @@ void QDeclarativePropertyAnimation::setFrom(const QVariant &f)
/*!
\qmlproperty real PropertyAnimation::to
This property holds the ending value.
- If not set, then the value defined in the end state of the transition or Behavior.
+ If not set, then the value defined in the end state of the transition or \l Behavior.
*/
QVariant QDeclarativePropertyAnimation::to() const
{
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 4adef25..bfd25be 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -148,6 +148,7 @@ public:
QDeclarativeXmlQuery(QObject *parent=0)
: QThread(parent), m_quit(false), m_abortQueryId(-1), m_queryIds(XMLLISTMODEL_CLEAR_ID + 1) {
qRegisterMetaType<QDeclarativeXmlQueryResult>("QDeclarativeXmlQueryResult");
+ m_currentJob.queryId = -1;
}
~QDeclarativeXmlQuery() {
@@ -161,6 +162,13 @@ public:
void abort(int id) {
QMutexLocker locker(&m_mutex);
+ QQueue<XmlQueryJob>::iterator it;
+ for (it = m_jobs.begin(); it != m_jobs.end(); ++it) {
+ if ((*it).queryId == id) {
+ m_jobs.erase(it);
+ return;
+ }
+ }
m_abortQueryId = id;
}
@@ -188,7 +196,7 @@ public:
m_queryIds++;
if (!isRunning())
- start();
+ start(QThread::IdlePriority);
else
m_condition.wakeOne();
return job.queryId;
@@ -202,24 +210,28 @@ protected:
void run() {
while (!m_quit) {
m_mutex.lock();
- doQueryJob();
- doSubQueryJob();
+ if (!m_jobs.isEmpty())
+ m_currentJob = m_jobs.dequeue();
m_mutex.unlock();
- m_mutex.lock();
- const XmlQueryJob &job = m_jobs.dequeue();
- if (m_abortQueryId != job.queryId) {
- QDeclarativeXmlQueryResult r;
- r.queryId = job.queryId;
+ QDeclarativeXmlQueryResult r;
+ if (m_currentJob.queryId != -1) {
+ doQueryJob();
+ doSubQueryJob();
+ r.queryId = m_currentJob.queryId;
r.size = m_size;
r.data = m_modelData;
r.inserted = m_insertedItemRanges;
r.removed = m_removedItemRanges;
- r.keyRoleResultsCache = job.keyRoleResultsCache;
- emit queryCompleted(r);
+ r.keyRoleResultsCache = m_currentJob.keyRoleResultsCache;
}
+
+ m_mutex.lock();
+ if (m_currentJob.queryId != -1 && m_abortQueryId != m_currentJob.queryId)
+ emit queryCompleted(r);
if (m_jobs.isEmpty())
m_condition.wait(&m_mutex);
+ m_currentJob.queryId = -1;
m_abortQueryId = -1;
m_mutex.unlock();
}
@@ -235,6 +247,7 @@ private:
QMutex m_mutex;
QWaitCondition m_condition;
QQueue<XmlQueryJob> m_jobs;
+ XmlQueryJob m_currentJob;
bool m_quit;
int m_abortQueryId;
QString m_prefix;
@@ -249,15 +262,14 @@ Q_GLOBAL_STATIC(QDeclarativeXmlQuery, globalXmlQuery)
void QDeclarativeXmlQuery::doQueryJob()
{
- Q_ASSERT(!m_jobs.isEmpty());
- XmlQueryJob &job = m_jobs.head();
+ Q_ASSERT(m_currentJob.queryId != -1);
QString r;
QXmlQuery query;
- QBuffer buffer(&job.data);
+ QBuffer buffer(&m_currentJob.data);
buffer.open(QIODevice::ReadOnly);
query.bindVariable(QLatin1String("src"), &buffer);
- query.setQuery(job.namespaces + job.query);
+ query.setQuery(m_currentJob.namespaces + m_currentJob.query);
query.evaluateTo(&r);
//always need a single root element
@@ -265,9 +277,9 @@ void QDeclarativeXmlQuery::doQueryJob()
QBuffer b(&xml);
b.open(QIODevice::ReadOnly);
- QString namespaces = QLatin1String("declare namespace dummy=\"http://qtsotware.com/dummy\";\n") + job.namespaces;
+ QString namespaces = QLatin1String("declare namespace dummy=\"http://qtsotware.com/dummy\";\n") + m_currentJob.namespaces;
QString prefix = QLatin1String("doc($inputDocument)/dummy:items") +
- job.query.mid(job.query.lastIndexOf(QLatin1Char('/')));
+ m_currentJob.query.mid(m_currentJob.query.lastIndexOf(QLatin1Char('/')));
//figure out how many items we are dealing with
int count = -1;
@@ -282,7 +294,7 @@ void QDeclarativeXmlQuery::doQueryJob()
count = item.toAtomicValue().toInt();
}
- job.data = xml;
+ m_currentJob.data = xml;
m_prefix = namespaces + prefix + QLatin1Char('/');
m_size = 0;
if (count > 0)
@@ -291,9 +303,9 @@ void QDeclarativeXmlQuery::doQueryJob()
void QDeclarativeXmlQuery::getValuesOfKeyRoles(QStringList *values, QXmlQuery *query) const
{
- Q_ASSERT(!m_jobs.isEmpty());
+ Q_ASSERT(m_currentJob.queryId != -1);
- const QStringList &keysQueries = m_jobs.head().keyRoleQueries;
+ const QStringList &keysQueries = m_currentJob.keyRoleQueries;
QString keysQuery;
if (keysQueries.count() == 1)
keysQuery = m_prefix + keysQueries[0];
@@ -323,11 +335,10 @@ void QDeclarativeXmlQuery::addIndexToRangeList(QList<QDeclarativeXmlListRange> *
void QDeclarativeXmlQuery::doSubQueryJob()
{
- Q_ASSERT(!m_jobs.isEmpty());
- XmlQueryJob &job = m_jobs.head();
+ Q_ASSERT(m_currentJob.queryId != -1);
m_modelData.clear();
- QBuffer b(&job.data);
+ QBuffer b(&m_currentJob.data);
b.open(QIODevice::ReadOnly);
QXmlQuery subquery;
@@ -340,16 +351,16 @@ void QDeclarativeXmlQuery::doSubQueryJob()
m_insertedItemRanges.clear();
m_removedItemRanges.clear();
- if (job.keyRoleResultsCache.isEmpty()) {
+ if (m_currentJob.keyRoleResultsCache.isEmpty()) {
m_insertedItemRanges << qMakePair(0, m_size);
} else {
- if (keyRoleResults != job.keyRoleResultsCache) {
+ if (keyRoleResults != m_currentJob.keyRoleResultsCache) {
QStringList temp;
- for (int i=0; i<job.keyRoleResultsCache.count(); i++) {
- if (!keyRoleResults.contains(job.keyRoleResultsCache[i]))
+ for (int i=0; i<m_currentJob.keyRoleResultsCache.count(); i++) {
+ if (!keyRoleResults.contains(m_currentJob.keyRoleResultsCache[i]))
addIndexToRangeList(&m_removedItemRanges, i);
else
- temp << job.keyRoleResultsCache[i];
+ temp << m_currentJob.keyRoleResultsCache[i];
}
for (int i=0; i<keyRoleResults.count(); i++) {
@@ -360,11 +371,11 @@ void QDeclarativeXmlQuery::doSubQueryJob()
}
}
}
- job.keyRoleResultsCache = keyRoleResults;
+ m_currentJob.keyRoleResultsCache = keyRoleResults;
// Get the new values for each role.
//### we might be able to condense even further (query for everything in one go)
- const QStringList &queries = job.roleQueries;
+ const QStringList &queries = m_currentJob.roleQueries;
for (int i = 0; i < queries.size(); ++i) {
QList<QVariant> resultList;
if (!queries[i].isEmpty()) {
@@ -378,7 +389,7 @@ void QDeclarativeXmlQuery::doSubQueryJob()
item = resultItems.next();
}
} else {
- emit error(job.roleQueryErrorId.at(i), queries[i]);
+ emit error(m_currentJob.roleQueryErrorId.at(i), queries[i]);
}
}
//### should warn here if things have gone wrong.
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 0edb8fb..2a85fdc 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -955,6 +955,9 @@ const QString qt_reg_winclass(QWidget *w) // register window class
if (qt_widget_private(w)->isGLWidget) {
cname = QLatin1String("QGLWidget");
style = CS_DBLCLKS;
+#ifndef Q_WS_WINCE
+ style |= CS_OWNDC;
+#endif
icon = true;
} else if (flags & Qt::MSWindowsOwnDC) {
cname = QLatin1String("QWidgetOwnDC");
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index ed53ccf..204e38c 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -253,8 +253,35 @@ private:
};
inline QS60Data::QS60Data()
+: uid(TUid::Null()),
+ screenDepth(0),
+ screenWidthInPixels(0),
+ screenHeightInPixels(0),
+ screenWidthInTwips(0),
+ screenHeightInTwips(0),
+ defaultDpiX(0),
+ defaultDpiY(0),
+ curWin(0),
+ virtualMousePressedKeys(0),
+ virtualMouseAccelDX(0),
+ virtualMouseAccelDY(0),
+ virtualMouseMaxAccel(0),
+#ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS
+ brokenPointerCursors(0),
+#endif
+ hasTouchscreen(0),
+ mouseInteractionEnabled(0),
+ virtualMouseRequired(0),
+ qtOwnsS60Environment(0),
+ supportsPremultipliedAlpha(0),
+ avkonComponentsSupportTransparency(0),
+ menuBeingConstructed(0),
+ memoryLimitForHwRendering(0),
+ s60ApplicationFactory(0),
+#ifdef Q_WS_S60
+ s60InstalledTrapHandler(0)
+#endif
{
- memclr(this, sizeof(QS60Data)); //zero init data
}
inline void QS60Data::updateScreenSize()
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index dbfe23e..d6535ea 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1664,7 +1664,7 @@ namespace {
{
LineBreakHelper()
: glyphCount(0), maxGlyphs(0), currentPosition(0), fontEngine(0), logClusters(0),
- manualWrap(false)
+ manualWrap(false), whiteSpaceOrObject(true)
{
}
@@ -1687,6 +1687,7 @@ namespace {
const unsigned short *logClusters;
bool manualWrap;
+ bool whiteSpaceOrObject;
bool checkFullOtherwiseExtend(QScriptLine &line);
@@ -1696,8 +1697,10 @@ namespace {
}
inline glyph_t currentGlyph() const
- {
+ {
Q_ASSERT(currentPosition > 0);
+ Q_ASSERT(logClusters[currentPosition - 1] < glyphs.numGlyphs);
+
return glyphs.glyphs[logClusters[currentPosition - 1]];
}
@@ -1832,6 +1835,7 @@ void QTextLine::layout_helper(int maxGlyphs)
lbh.tmpData.descent = qMax(lbh.tmpData.descent, current.descent);
if (current.analysis.flags == QScriptAnalysis::Tab && (alignment & (Qt::AlignLeft | Qt::AlignRight | Qt::AlignCenter | Qt::AlignJustify))) {
+ lbh.whiteSpaceOrObject = true;
if (lbh.checkFullOtherwiseExtend(line))
goto found;
@@ -1848,6 +1852,7 @@ void QTextLine::layout_helper(int maxGlyphs)
if (lbh.checkFullOtherwiseExtend(line))
goto found;
} else if (current.analysis.flags == QScriptAnalysis::LineOrParagraphSeparator) {
+ lbh.whiteSpaceOrObject = true;
// if the line consists only of the line separator make sure
// we have a sane height
if (!line.length && !lbh.tmpData.length)
@@ -1861,6 +1866,7 @@ void QTextLine::layout_helper(int maxGlyphs)
line += lbh.tmpData;
goto found;
} else if (current.analysis.flags == QScriptAnalysis::Object) {
+ lbh.whiteSpaceOrObject = true;
lbh.tmpData.length++;
QTextFormat format = eng->formats()->format(eng->formatIndex(&eng->layoutData->items[item]));
@@ -1874,6 +1880,7 @@ void QTextLine::layout_helper(int maxGlyphs)
if (lbh.checkFullOtherwiseExtend(line))
goto found;
} else if (attributes[lbh.currentPosition].whiteSpace) {
+ lbh.whiteSpaceOrObject = true;
while (lbh.currentPosition < end && attributes[lbh.currentPosition].whiteSpace)
addNextCluster(lbh.currentPosition, end, lbh.spaceData, lbh.glyphCount,
current, lbh.logClusters, lbh.glyphs);
@@ -1883,6 +1890,7 @@ void QTextLine::layout_helper(int maxGlyphs)
goto found;
}
} else {
+ lbh.whiteSpaceOrObject = false;
bool sb_or_ws = false;
do {
addNextCluster(lbh.currentPosition, end, lbh.tmpData, lbh.glyphCount,
@@ -1944,7 +1952,7 @@ void QTextLine::layout_helper(int maxGlyphs)
LB_DEBUG("reached end of line");
lbh.checkFullOtherwiseExtend(line);
found:
- if (lbh.rightBearing > 0) // If right bearing has not yet been adjusted
+ if (lbh.rightBearing > 0 && !lbh.whiteSpaceOrObject) // If right bearing has not yet been adjusted
lbh.adjustRightBearing();
line.textAdvance = line.textWidth;
line.textWidth -= qMin(QFixed(), lbh.rightBearing);
diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp
index cb65f6e..b99fe11 100644
--- a/src/multimedia/audio/qaudioinput_mac_p.cpp
+++ b/src/multimedia/audio/qaudioinput_mac_p.cpp
@@ -259,7 +259,7 @@ public:
UInt32 inBusNumber,
UInt32 inNumberFrames)
{
- const bool wasEmpty = m_buffer->used() == 0;
+ const bool pullMode = m_device == 0;
OSStatus err;
qint64 framesRendered = 0;
@@ -330,7 +330,7 @@ public:
framesRendered = copied / m_outputFormat.mBytesPerFrame;
}
- if (wasEmpty && framesRendered > 0)
+ if (pullMode && framesRendered > 0)
emit readyRead();
return framesRendered;
diff --git a/src/multimedia/video/qabstractvideobuffer_p.h b/src/multimedia/video/qabstractvideobuffer_p.h
index c72f303..3303b36 100644
--- a/src/multimedia/video/qabstractvideobuffer_p.h
+++ b/src/multimedia/video/qabstractvideobuffer_p.h
@@ -65,6 +65,9 @@ public:
: handleType(QAbstractVideoBuffer::NoHandle)
{}
+ virtual ~QAbstractVideoBufferPrivate()
+ {}
+
QAbstractVideoBuffer::HandleType handleType;
};
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 5486f47..4907f2c 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -280,6 +280,12 @@ void QLocalSocketPrivate::startAsyncRead()
case ERROR_IO_PENDING:
// This is not an error. We're getting notified, when data arrives.
return;
+ case ERROR_MORE_DATA:
+ // This is not an error. The synchronous read succeeded.
+ // We're connected to a message mode pipe and the message
+ // didn't fit into the pipe's system buffer.
+ completeAsyncRead();
+ break;
case ERROR_PIPE_NOT_CONNECTED:
{
// It may happen, that the other side closes the connection directly
@@ -309,9 +315,18 @@ bool QLocalSocketPrivate::completeAsyncRead()
DWORD bytesRead;
if (!GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE)) {
- if (GetLastError() != ERROR_PIPE_NOT_CONNECTED)
+ switch (GetLastError()) {
+ case ERROR_MORE_DATA:
+ // This is not an error. We're connected to a message mode
+ // pipe and the message didn't fit into the pipe's system
+ // buffer. We will read the remaining data in the next call.
+ break;
+ case ERROR_PIPE_NOT_CONNECTED:
setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead"));
- return false;
+ // fall through
+ default:
+ return false;
+ }
}
actualReadBufferSize += bytesRead;
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index c6d7a2c..45caeb0 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -4479,4 +4479,5 @@ EXPORTS
?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4478 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *)
?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4479 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *, int)
?staticMetaObject@QEventDispatcherSymbian@@2UQMetaObject@@B @ 4480 NONAME ; struct QMetaObject const QEventDispatcherSymbian::staticMetaObject
+ ?textDirection@QLocale@@QBE?AW4LayoutDirection@Qt@@XZ @ 4481 NONAME ; enum Qt::LayoutDirection QLocale::textDirection(void) const
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
index 2992cf6..0aac72b 100644
--- a/src/s60installs/bwins/QtDeclarativeu.def
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -4025,7 +4025,7 @@ EXPORTS
?get@QDeclarativeXmlListModel@@QBE?AVQScriptValue@@H@Z @ 4024 NONAME ; class QScriptValue QDeclarativeXmlListModel::get(int) const
?setScale@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4025 NONAME ; void QDeclarativeParentChange::setScale(class QDeclarativeScriptString)
?showInputPanelOnFocusChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 4026 NONAME ABSENT ; void QDeclarativeTextEdit::showInputPanelOnFocusChanged(bool)
- ?focusOutEvent@QDeclarativeTextInput@@MAEXPAVQFocusEvent@@@Z @ 4027 NONAME ; void QDeclarativeTextInput::focusOutEvent(class QFocusEvent *)
+ ?focusOutEvent@QDeclarativeTextInput@@MAEXPAVQFocusEvent@@@Z @ 4027 NONAME ABSENT ; void QDeclarativeTextInput::focusOutEvent(class QFocusEvent *)
?height@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4028 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::height(void) const
?showInputPanelOnFocus@QDeclarativeTextEdit@@QBE_NXZ @ 4029 NONAME ABSENT ; bool QDeclarativeTextEdit::showInputPanelOnFocus(void) const
?errorString@QDeclarativeComponent@@QBE?AVQString@@XZ @ 4030 NONAME ; class QString QDeclarativeComponent::errorString(void) const
@@ -4035,7 +4035,7 @@ EXPORTS
?rotation@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4034 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::rotation(void) const
?paintedHeight@QDeclarativeTextEdit@@QBEMXZ @ 4035 NONAME ; float QDeclarativeTextEdit::paintedHeight(void) const
?paintedWidth@QDeclarativeTextEdit@@QBEMXZ @ 4036 NONAME ; float QDeclarativeTextEdit::paintedWidth(void) const
- ?focusOutEvent@QDeclarativeTextEdit@@MAEXPAVQFocusEvent@@@Z @ 4037 NONAME ; void QDeclarativeTextEdit::focusOutEvent(class QFocusEvent *)
+ ?focusOutEvent@QDeclarativeTextEdit@@MAEXPAVQFocusEvent@@@Z @ 4037 NONAME ABSENT ; void QDeclarativeTextEdit::focusOutEvent(class QFocusEvent *)
??0QDeclarativeExpression@@IAE@PAVQDeclarativeContextData@@PAVQObject@@ABVQString@@AAVQDeclarativeExpressionPrivate@@@Z @ 4038 NONAME ; QDeclarativeExpression::QDeclarativeExpression(class QDeclarativeContextData *, class QObject *, class QString const &, class QDeclarativeExpressionPrivate &)
??0QDeclarativeExpression@@QAE@PAVQDeclarativeContext@@PAVQObject@@ABVQString@@1@Z @ 4039 NONAME ; QDeclarativeExpression::QDeclarativeExpression(class QDeclarativeContext *, class QObject *, class QString const &, class QObject *)
?queryError@QDeclarativeXmlListModel@@AAEXPAXABVQString@@@Z @ 4040 NONAME ; void QDeclarativeXmlListModel::queryError(void *, class QString const &)
@@ -4088,4 +4088,13 @@ EXPORTS
?positionToRectangle@QDeclarativeTextInput@@QBE?AVQRectF@@H@Z @ 4087 NONAME ; class QRectF QDeclarativeTextInput::positionToRectangle(int) const
?positionAt@QDeclarativeTextInput@@QBEHH@Z @ 4088 NONAME ; int QDeclarativeTextInput::positionAt(int) const
?selectWord@QDeclarativeTextEdit@@QAEXXZ @ 4089 NONAME ; void QDeclarativeTextEdit::selectWord(void)
+ ?setFooter@QDeclarativeGridView@@QAEXPAVQDeclarativeComponent@@@Z @ 4090 NONAME ; void QDeclarativeGridView::setFooter(class QDeclarativeComponent *)
+ ?isNamed@QDeclarativeState@@QBE_NXZ @ 4091 NONAME ; bool QDeclarativeState::isNamed(void) const
+ ?initialSize@QDeclarativeView@@QBE?AVQSize@@XZ @ 4092 NONAME ; class QSize QDeclarativeView::initialSize(void) const
+ ?childAt@QDeclarativeItem@@QBEPAV1@MM@Z @ 4093 NONAME ; class QDeclarativeItem * QDeclarativeItem::childAt(float, float) const
+ ?footer@QDeclarativeGridView@@QBEPAVQDeclarativeComponent@@XZ @ 4094 NONAME ; class QDeclarativeComponent * QDeclarativeGridView::footer(void) const
+ ?headerChanged@QDeclarativeGridView@@IAEXXZ @ 4095 NONAME ; void QDeclarativeGridView::headerChanged(void)
+ ?setHeader@QDeclarativeGridView@@QAEXPAVQDeclarativeComponent@@@Z @ 4096 NONAME ; void QDeclarativeGridView::setHeader(class QDeclarativeComponent *)
+ ?header@QDeclarativeGridView@@QBEPAVQDeclarativeComponent@@XZ @ 4097 NONAME ; class QDeclarativeComponent * QDeclarativeGridView::header(void) const
+ ?footerChanged@QDeclarativeGridView@@IAEXXZ @ 4098 NONAME ; void QDeclarativeGridView::footerChanged(void)
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 9b4ecc2..d439927 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -12813,4 +12813,11 @@ EXPORTS
?setVerticalMovementX@QTextCursor@@QAEXH@Z @ 12812 NONAME ; void QTextCursor::setVerticalMovementX(int)
?invertedAppearance@QProgressBar@@QBE_NXZ @ 12813 NONAME ; bool QProgressBar::invertedAppearance(void) const
?width@QFontMetrics@@QBEHABVQString@@HH@Z @ 12814 NONAME ; int QFontMetrics::width(class QString const &, int, int) const
+ ?aboutToDestroy@QWidgetPrivate@@UAEXXZ @ 12815 NONAME ; void QWidgetPrivate::aboutToDestroy(void)
+ ?setTextOption@QStaticText@@QAEXABVQTextOption@@@Z @ 12816 NONAME ; void QStaticText::setTextOption(class QTextOption const &)
+ ?pointInsideRectAndMask@QWidgetPrivate@@QBE_NABVQPoint@@@Z @ 12817 NONAME ; bool QWidgetPrivate::pointInsideRectAndMask(class QPoint const &) const
+ ?childAtRecursiveHelper@QWidgetPrivate@@QBEPAVQWidget@@ABVQPoint@@_N1@Z @ 12818 NONAME ; class QWidget * QWidgetPrivate::childAtRecursiveHelper(class QPoint const &, bool, bool) const
+ ?textOption@QStaticText@@QBE?AVQTextOption@@XZ @ 12819 NONAME ; class QTextOption QStaticText::textOption(void) const
+ ?isRightToLeft@QTextEngine@@QBE_NXZ @ 12820 NONAME ; bool QTextEngine::isRightToLeft(void) const
+ ?textDirection@QTextBlock@@QBE?AW4LayoutDirection@Qt@@XZ @ 12821 NONAME ; enum Qt::LayoutDirection QTextBlock::textDirection(void) const
diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
index 0590d39..48cad39 100644
--- a/src/s60installs/eabi/QtCoreu.def
+++ b/src/s60installs/eabi/QtCoreu.def
@@ -3705,4 +3705,6 @@ EXPORTS
_ZlsR11QDataStreamRK12QEasingCurve @ 3704 NONAME
_ZltRK13QElapsedTimerS1_ @ 3705 NONAME
_ZrsR11QDataStreamR12QEasingCurve @ 3706 NONAME
+ _ZNK7QLocale13textDirectionEv @ 3707 NONAME
+ _ZNK7QString13isRightToLeftEv @ 3708 NONAME
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
index 1c4cd5d..f997454 100644
--- a/src/s60installs/eabi/QtDeclarativeu.def
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -3605,7 +3605,7 @@ EXPORTS
_ZN16QDeclarativeText18paintedSizeChangedEv @ 3604 NONAME
_ZN20QDeclarativePathView5eventEP6QEvent @ 3605 NONAME
_ZN20QDeclarativeTextEdit12focusInEventEP11QFocusEvent @ 3606 NONAME
- _ZN20QDeclarativeTextEdit13focusOutEventEP11QFocusEvent @ 3607 NONAME
+ _ZN20QDeclarativeTextEdit13focusOutEventEP11QFocusEvent @ 3607 NONAME ABSENT
_ZN20QDeclarativeTextEdit16setSelectByMouseEb @ 3608 NONAME
_ZN20QDeclarativeTextEdit18paintedSizeChangedEv @ 3609 NONAME
_ZN20QDeclarativeTextEdit20selectByMouseChangedEb @ 3610 NONAME
@@ -3615,7 +3615,7 @@ EXPORTS
_ZN20QDeclarativeTextEdit24setShowInputPanelOnFocusEb @ 3614 NONAME ABSENT
_ZN20QDeclarativeTextEdit28showInputPanelOnFocusChangedEb @ 3615 NONAME ABSENT
_ZN21QDeclarativeTextInput12focusInEventEP11QFocusEvent @ 3616 NONAME
- _ZN21QDeclarativeTextInput13focusOutEventEP11QFocusEvent @ 3617 NONAME
+ _ZN21QDeclarativeTextInput13focusOutEventEP11QFocusEvent @ 3617 NONAME ABSENT
_ZN21QDeclarativeTextInput16setSelectByMouseEb @ 3618 NONAME
_ZN21QDeclarativeTextInput20selectByMouseChangedEb @ 3619 NONAME
_ZN21QDeclarativeTextInput22openSoftwareInputPanelEv @ 3620 NONAME
@@ -3653,9 +3653,9 @@ EXPORTS
_ZNK24QDeclarativeXmlListModel11errorStringEv @ 3652 NONAME
_ZNK24QDeclarativeXmlListModel3getEi @ 3653 NONAME
_ZThn8_N20QDeclarativeTextEdit12focusInEventEP11QFocusEvent @ 3654 NONAME
- _ZThn8_N20QDeclarativeTextEdit13focusOutEventEP11QFocusEvent @ 3655 NONAME
+ _ZThn8_N20QDeclarativeTextEdit13focusOutEventEP11QFocusEvent @ 3655 NONAME ABSENT
_ZThn8_N21QDeclarativeTextInput12focusInEventEP11QFocusEvent @ 3656 NONAME
- _ZThn8_N21QDeclarativeTextInput13focusOutEventEP11QFocusEvent @ 3657 NONAME
+ _ZThn8_N21QDeclarativeTextInput13focusOutEventEP11QFocusEvent @ 3657 NONAME ABSENT
_ZThn8_NK23QDeclarativePaintedItem12boundingRectEv @ 3658 NONAME
_ZN20QDeclarativeTextEdit10selectWordEv @ 3659 NONAME
_ZN20QDeclarativeTextEdit19moveCursorSelectionEi @ 3660 NONAME
@@ -3672,4 +3672,13 @@ EXPORTS
_ZNK21QDeclarativeTextInput15cursorRectangleEv @ 3671 NONAME
_ZNK21QDeclarativeTextInput19positionToRectangleEi @ 3672 NONAME
_ZThn8_N21QDeclarativeTextInput21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 3673 NONAME
+ _ZN20QDeclarativeGridView13footerChangedEv @ 3674 NONAME
+ _ZN20QDeclarativeGridView13headerChangedEv @ 3675 NONAME
+ _ZN20QDeclarativeGridView9setFooterEP21QDeclarativeComponent @ 3676 NONAME
+ _ZN20QDeclarativeGridView9setHeaderEP21QDeclarativeComponent @ 3677 NONAME
+ _ZNK16QDeclarativeItem7childAtEff @ 3678 NONAME
+ _ZNK16QDeclarativeView11initialSizeEv @ 3679 NONAME
+ _ZNK17QDeclarativeState7isNamedEv @ 3680 NONAME
+ _ZNK20QDeclarativeGridView6footerEv @ 3681 NONAME
+ _ZNK20QDeclarativeGridView6headerEv @ 3682 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 9c1002d..b59ddee 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -12012,4 +12012,9 @@ EXPORTS
_ZNK11QTextCursor17verticalMovementXEv @ 12011 NONAME
_ZNK11QTextCursor20keepPositionOnInsertEv @ 12012 NONAME
_ZNK12QFontMetrics5widthERK7QStringii @ 12013 NONAME
+ _ZN11QStaticText13setTextOptionERK11QTextOption @ 12014 NONAME
+ _ZNK10QTextBlock13textDirectionEv @ 12015 NONAME
+ _ZNK11QStaticText10textOptionEv @ 12016 NONAME
+ _ZNK11QTextEngine13isRightToLeftEv @ 12017 NONAME
+ _ZNK14QWidgetPrivate22childAtRecursiveHelperERK6QPointbb @ 12018 NONAME
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 6d8513e..be5fa86 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -71,13 +71,13 @@ symbian: {
" \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSEIF package(0x1028315F)" \
" \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
- " \"$$bearerPluginLocation/qsymbianbearer_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
+ " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_2.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSEIF package(0x102752AE)" \
" \"$$pluginLocations/qts60plugin_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2$${QT_LIBINFIX}.dll\"" \
- " \"$$bearerPluginLocation/qsymbianbearer_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
+ " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_2.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSEIF package(0x102032BE)" \
" \"$$pluginLocations/qts60plugin_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1$${QT_LIBINFIX}.dll\"" \
- " \"$$bearerPluginLocation/qsymbianbearer_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
+ " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_1.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSE" \
" \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
" \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
diff --git a/src/s60installs/sqlite3.sis b/src/s60installs/sqlite3.sis
index 11e069e..12d01f9 100644
--- a/src/s60installs/sqlite3.sis
+++ b/src/s60installs/sqlite3.sis
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml
new file mode 100644
index 0000000..225d8d4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml
@@ -0,0 +1,53 @@
+import Qt 4.7
+
+Rectangle {
+ width:360;
+ height: 200
+
+ Item {
+ objectName: "theItem"
+ anchors.centerIn: parent
+ width: childrenRect.width
+ height: childrenRect.height
+ Rectangle {
+ id: header1
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ width: 100; height: 50
+ color: "green"
+ }
+ Rectangle {
+ id: text1
+ anchors.top: header1.bottom
+ anchors.topMargin: 10
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: 100; height: 50
+ color: "blue"
+ }
+ }
+
+ states: [
+ State {
+ name: "row"
+ AnchorChanges {
+ target: header1
+ anchors.horizontalCenter: undefined
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.top: undefined
+ }
+ AnchorChanges {
+ target: text1
+ anchors.horizontalCenter: undefined
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.top: undefined
+ anchors.left: header1.right
+ }
+ PropertyChanges {
+ target: text1
+ anchors.leftMargin: 10
+ anchors.topMargin: 0
+ }
+ }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index 0a66245..4a57def 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -44,7 +44,8 @@
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtDeclarative/qdeclarativecontext.h>
#include <QtDeclarative/qdeclarativeview.h>
-#include <QtDeclarative/qdeclarativeitem.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativeitem_p.h>
#include "../../../shared/util.h"
#ifdef Q_OS_SYMBIAN
@@ -73,6 +74,7 @@ private slots:
void transforms_data();
void childrenRect();
void childrenRectBug();
+ void childrenRectBug2();
void childrenProperty();
void resourcesProperty();
@@ -753,6 +755,29 @@ void tst_QDeclarativeItem::childrenRectBug()
delete canvas;
}
+// QTBUG-11465
+void tst_QDeclarativeItem::childrenRectBug2()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/childrenRectBug2.qml"));
+ canvas->show();
+
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(canvas->rootObject());
+ QVERIFY(rect);
+ QDeclarativeItem *item = rect->findChild<QDeclarativeItem*>("theItem");
+ QCOMPARE(item->width(), qreal(100));
+ QCOMPARE(item->height(), qreal(110));
+ QCOMPARE(item->x(), qreal(130));
+
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ rectPrivate->setState("row");
+ QCOMPARE(item->width(), qreal(210));
+ QCOMPARE(item->height(), qreal(50));
+ QCOMPARE(item->x(), qreal(75));
+
+ delete canvas;
+}
+
template<typename T>
T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName)
{
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.js b/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.js
new file mode 100644
index 0000000..c165e29
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.js
@@ -0,0 +1,7 @@
+.pragma library
+
+function loadComponent() {
+ var component = Qt.createComponent("createComponentData.qml");
+ return component.status;
+}
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml b/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml
new file mode 100644
index 0000000..aae7a91
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml
@@ -0,0 +1,10 @@
+import Qt 4.7
+import "createComponent_lib.js" as Test
+
+Item {
+ property int status: Component.Null
+
+ Component.onCompleted: {
+ status = Test.loadComponent()
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 06561fa..fb100a5 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -76,6 +76,7 @@ private slots:
void openUrlExternally();
void md5();
void createComponent();
+ void createComponent_pragmaLibrary();
void createQmlObject();
void consoleLog();
void formatting();
@@ -361,6 +362,19 @@ void tst_qdeclarativeqt::createComponent()
delete object;
}
+void tst_qdeclarativeqt::createComponent_pragmaLibrary()
+{
+ // Currently, just loading createComponent_lib.qml causes crash on some platforms
+ /*
+ QDeclarativeComponent component(&engine, TEST_FILE("createComponent_lib.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QEXPECT_FAIL("", "QTBUG-11507", Continue);
+ QCOMPARE(object->property("status").toInt(), int(QDeclarativeComponent::Ready));
+ */
+}
+
void tst_qdeclarativeqt::createQmlObject()
{
QDeclarativeComponent component(&engine, TEST_FILE("createQmlObject.qml"));
diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp
index 054da4a..998f588 100644
--- a/tests/auto/linguist/lconvert/tst_lconvert.cpp
+++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp
@@ -153,7 +153,7 @@ void tst_lconvert::verifyReadFail(const QString &fn)
{
QProcess cvt;
cvt.start(binDir + "/lconvert", QStringList() << (dataDir + fn));
- QVERIFY(cvt.waitForFinished(1000));
+ QVERIFY(cvt.waitForFinished(10000));
QVERIFY(cvt.exitStatus() == QProcess::NormalExit);
QVERIFY2(cvt.exitCode() == 2, "Accepted invalid input");
}
diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp
index c179462..5ba6c52 100644
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
@@ -288,7 +288,7 @@ void tst_lupdate::good()
proc.setWorkingDirectory(workDir);
proc.setProcessChannelMode(QProcess::MergedChannels);
proc.start(m_cmdLupdate + ' ' + lupdatecmd, QIODevice::ReadWrite | QIODevice::Text);
- QVERIFY2(proc.waitForFinished(5000), qPrintable(lupdatecmd));
+ QVERIFY2(proc.waitForFinished(30000), qPrintable(lupdatecmd));
QByteArray output = proc.readAll();
QVERIFY2(proc.exitStatus() == QProcess::NormalExit,
"\"lupdate " + lupdatecmd.toLatin1() + "\" crashed\n" + output);
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index a631f3d..f798faf 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -112,6 +112,7 @@ private slots:
void columnWrapWithTabs();
void boundingRectForUnsetLineWidth();
void boundingRectForSetLineWidth();
+ void glyphLessItems();
// QTextLine stuff
void setNumColumnsWrapAtWordBoundaryOrAnywhere();
@@ -1339,6 +1340,24 @@ void tst_QTextLayout::lineWidthFromBOM()
// Don't spin into an infinite loop
}
+void tst_QTextLayout::glyphLessItems()
+{
+ {
+ QTextLayout layout;
+ layout.setText("\t\t");
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+ }
+
+ {
+ QTextLayout layout;
+ layout.setText(QString::fromLatin1("AA") + QChar(QChar::LineSeparator));
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+ }
+}
QTEST_MAIN(tst_QTextLayout)
#include "tst_qtextlayout.moc"
diff --git a/tests/auto/qtimeline/tst_qtimeline.cpp b/tests/auto/qtimeline/tst_qtimeline.cpp
index b15d2a4..47d0550 100644
--- a/tests/auto/qtimeline/tst_qtimeline.cpp
+++ b/tests/auto/qtimeline/tst_qtimeline.cpp
@@ -247,11 +247,7 @@ void tst_QTimeLine::frameRate()
void tst_QTimeLine::value()
{
-#ifdef Q_OS_WINCE //On WinCE timer resolution is bad - use longer times
QTimeLine timeLine(2000);
-#else
- QTimeLine timeLine(200);
-#endif
QVERIFY(timeLine.currentValue() == 0.0);
// Default speed
@@ -270,19 +266,11 @@ void tst_QTimeLine::value()
timeLine.setCurrentTime(100);
timeLine.start();
// Let it update on its own
-#ifdef Q_OS_WINCE
QTest::qWait(500);
-#else
- QTest::qWait(50);
-#endif
QCOMPARE(timeLine.state(), QTimeLine::Running);
qreal value = timeLine.currentValue();
timeLine.setDirection(QTimeLine::Backward);
-#ifdef Q_OS_WINCE
QTest::qWait(1000);
-#else
- QTest::qWait(100);
-#endif
QVERIFY(timeLine.currentValue() < value);
timeLine.stop();
}
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 045216a..2d559c8 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -151,16 +151,6 @@ bool macHasAccessToWindowsServer()
#undef Bool
#endif
-// Will try to wait for the condition while allowing event processing
-// for a maximum of 2 seconds.
-#define WAIT_FOR_CONDITION(expr, expected) \
- do { \
- const int step = 100; \
- for (int i = 0; i < 2000 && expr != expected; i+=step) { \
- QTest::qWait(step); \
- } \
- } while(0)
-
//TESTED_CLASS=
//TESTED_FILES=
@@ -1665,13 +1655,11 @@ void tst_QWidget::focusChainOnHide()
child->setFocus();
qApp->processEvents();
- WAIT_FOR_CONDITION(child->hasFocus(), true);
- QCOMPARE(child->hasFocus(), true);
+ QTRY_COMPARE(child->hasFocus(), true);
child->hide();
qApp->processEvents();
- WAIT_FOR_CONDITION(parent->hasFocus(), true);
- QCOMPARE(parent->hasFocus(), true);
+ QTRY_COMPARE(parent->hasFocus(), true);
QCOMPARE(parent, qApp->focusWidget());
delete parent;
@@ -9241,7 +9229,8 @@ void tst_QWidget::syntheticEnterLeave()
QCOMPARE(grandChild->numLeaveEvents, 0);
QCOMPARE(child1->numLeaveEvents, 0);
- QCOMPARE(window.numEnterEvents, 1);
+ // This event arrives asynchronously
+ QTRY_COMPARE(window.numEnterEvents, 1);
QCOMPARE(child2->numEnterEvents, 1);
QCOMPARE(grandChild->numEnterEvents, 1);
QCOMPARE(child1->numEnterEvents, 0);
@@ -9332,7 +9321,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
child.show();
// Make sure the child gets enter event and no mouse move event.
- QCOMPARE(child.numEnterEvents, 1);
+ QTRY_COMPARE(child.numEnterEvents, 1);
QCOMPARE(child.numMouseMoveEvents, 0);
child.hide();
@@ -9343,7 +9332,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
// Make sure the child gets enter event and mouse move event.
// Note that we verify event->button() and event->buttons()
// in SELChild::mouseMoveEvent().
- QCOMPARE(child.numEnterEvents, 1);
+ QTRY_COMPARE(child.numEnterEvents, 1);
QCOMPARE(child.numMouseMoveEvents, 1);
// Sending synthetic enter/leave trough the parent's mousePressEvent handler.
@@ -9354,7 +9343,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
QTest::mouseClick(&parent, Qt::LeftButton);
// Make sure the child gets enter event and one mouse move event.
- QCOMPARE(child.numEnterEvents, 1);
+ QTRY_COMPARE(child.numEnterEvents, 1);
QCOMPARE(child.numMouseMoveEvents, 1);
child.hide();
@@ -9363,7 +9352,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
QTest::mouseClick(&parent, Qt::LeftButton);
// Make sure the child gets enter event and no mouse move event.
- QCOMPARE(child.numEnterEvents, 1);
+ QTRY_COMPARE(child.numEnterEvents, 1);
QCOMPARE(child.numMouseMoveEvents, 0);
}
#endif
diff --git a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
index 53dc4b5..efe4838 100644
--- a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
@@ -187,12 +187,12 @@ void tst_QWidgetAction::visibilityUpdate()
action->setDefaultWidget(combo);
tb.addAction(action);
- qApp->processEvents(); //the call to show is delayed by the toolbar layout
- QVERIFY(combo->isVisible());
+ //the call to show is delayed by the toolbar layout
+ QTRY_VERIFY(combo->isVisible());
QVERIFY(action->isVisible());
action->setVisible(false);
- qApp->processEvents(); //the call to hide is delayed by the toolbar layout
+ //the call to hide is delayed by the toolbar layout
QTRY_VERIFY(!combo->isVisible());
delete action;