platform/upstream/qtdeclarative.git
11 years agoQQuickItemView: Add guard before returning currentItem item
Caroline Chao [Tue, 19 Mar 2013 13:01:54 +0000 (14:01 +0100)]
QQuickItemView: Add guard before returning currentItem item

And don't check if the currentItem is empty before calling
applyPendingChanges().

And an autotest. (Patch from Steffen Imhof)

Task-number: QTBUG-30227

Change-Id: Ia16362a6d0dce771f20772929c32e9306ed0e0f9
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoFix jump and property changes on first move when dragging a Flickable.
Andrew den Exter [Tue, 12 Mar 2013 04:05:32 +0000 (14:05 +1000)]
Fix jump and property changes on first move when dragging a Flickable.

Fixes a regression introduced by https://codereview.qt-project.org/48690
whereby on the first mouse move the contentItem was moved the total
distance from the touch point to where the drag distance was exceeded.
For large drag thresholds this causes a noticeable jump. Reverting the
dragStartOffset portion of that change fixes the regression.

That same change was also resposible for the property update regression
https://codereview.qt-project.org/49768 attempted to fix.  That change
is also reverted as it was unnecessary and may have introduced some
regressions of its own.

Task-number: QTBUG-30032
Change-Id: I7723b459cc5a6a0731893aeb6332d00cad1bd79b
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
11 years agoAdd clocks.qmlproject
hjk [Thu, 14 Mar 2013 11:30:57 +0000 (12:30 +0100)]
Add clocks.qmlproject

Change-Id: I4fb063d1a4ccc990b5098237f1784b3dce015a81
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoSmooth dragging an item with MouseArea.
Andrew den Exter [Thu, 14 Mar 2013 02:36:20 +0000 (12:36 +1000)]
Smooth dragging an item with MouseArea.

Calculate drag distance relative to the mouse position when a drag is
detected rather than the press position so there isn't a large change
in position on the first move.

Task-number: QTBUG-30188
Change-Id: I5c2269c2228668a3842e18f65167637497b3beb4
Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
11 years agoFixed tutorial gettingStartedQml part5.
Libor Tomsik [Thu, 7 Mar 2013 07:37:08 +0000 (08:37 +0100)]
Fixed tutorial gettingStartedQml part5.

In FileDialog.qml the selector GridView.view.currentIndex does not work, replaced with dirView.currentIndex

Change-Id: I7c1893ce3872c41fc4f0fd63bad0e6a2cff2b207
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoMerge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging...
Stephen Kelly [Wed, 13 Mar 2013 14:47:29 +0000 (15:47 +0100)]
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable

11 years agoDoc: Changed section title in whatsnew.qdoc
Jerome Pasion [Wed, 13 Mar 2013 09:57:11 +0000 (10:57 +0100)]
Doc: Changed section title in whatsnew.qdoc

- "Qt 5.0" is the name of the main landing page, which causes link
conflicts in Qt QML module.

Change-Id: I2becb864873ea3784eb4fece3ebcbe64e0a00cba
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
11 years agoMakes QSmoothedAnimation respect zero duration.
Thomas Kristensen [Mon, 11 Mar 2013 11:54:56 +0000 (12:54 +0100)]
Makes QSmoothedAnimation respect zero duration.

In automated GUI test scenarios it often desired not to wait for animations
before verifying a result, so setting the duration to zero should accomplish
this, before this patch; if duration was set to zero QSmoothedAnimation
would treat it as if duration was not set, and used velocity to calculate
animation speed.

Change-Id: Ia57f1c9ffdd2056ac7c85d1cb94dbd3835fcbb7a
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
11 years agoFixed text opacity when using Text.NativeRendering.
Yoann Lopes [Tue, 12 Mar 2013 11:57:39 +0000 (12:57 +0100)]
Fixed text opacity when using Text.NativeRendering.

Change-Id: I76922074c02c368f8a8a6998c478a33537e9a6e8
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoMerge remote-tracking branch 'origin/release' into stable
Frederik Gladhorn [Tue, 12 Mar 2013 10:30:13 +0000 (11:30 +0100)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I9f54f308efc4d165d091f215d0b031e4e895d749

11 years agomake the sample code more consistent in context
Xingtao Zhang [Fri, 8 Mar 2013 19:44:40 +0000 (19:44 +0000)]
make the sample code more consistent in context

Change-Id: Id831032a937bf07b70515e95ff481ea8a741edeb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoImprove the ordering of Flickable dragging and moving property updates.
Andrew den Exter [Tue, 5 Mar 2013 07:56:21 +0000 (17:56 +1000)]
Improve the ordering of Flickable dragging and moving property updates.

Move the contentItem after the dragging and moving properties have been
updated so they return the correct values from the onContentYChanged
and onContentXChanged handlers.

Task-number: QTBUG-30032
Change-Id: I15716dc8eee4d9836f96362a8b49f1d0c404b0c2
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoImprove timer dependent tests.
Frederik Gladhorn [Wed, 6 Mar 2013 17:47:17 +0000 (18:47 +0100)]
Improve timer dependent tests.

tst_QQuickLoader::loadedSignal depended on
sharing the engine with simultaneousSyncAsync
and that function being run before it.

After each test run call clearComponentCache()
as that is important for caching of the network tests.

The test server would send the item after 500ms.
Sometimes the CI would be faster or slower.
Instead of relying on timing, simply call a function
when the reply should be sent.

Change-Id: Ifb0447041197e1cba103570597a62a2510d31aab
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoFix warning about uninitialized value in QML-ECMA-test (CLANG).
Friedemann Kleint [Thu, 7 Mar 2013 10:59:37 +0000 (11:59 +0100)]
Fix warning about uninitialized value in QML-ECMA-test (CLANG).

Change-Id: Ifcc3ef0e0e65245758697d7302e8227bb6e748f7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoFix warning about use of uninitialized value in QML-debug helpers.
Friedemann Kleint [Thu, 7 Mar 2013 10:58:41 +0000 (11:58 +0100)]
Fix warning about use of uninitialized value in QML-debug helpers.

Change-Id: Ifcba9c1224dfa7db069ef71b1bb39e3c7658a7b5
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
11 years agoFix warning about adding int to a QString (CLANG).
Friedemann Kleint [Thu, 7 Mar 2013 10:58:15 +0000 (11:58 +0100)]
Fix warning about adding int to a QString (CLANG).

Change-Id: Ibc84dcbe5ca4519bb1ac25e5d5463ef58c48190e
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoSimplify function with early return.
Frederik Gladhorn [Wed, 6 Mar 2013 17:24:19 +0000 (18:24 +0100)]
Simplify function with early return.

Change-Id: Ic0e1a32f6c586e75fb7389ef8009e56881942cf1
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoStabilize tst_qquicktextinput::remoteCursorDelegate()
Frederik Gladhorn [Mon, 4 Mar 2013 13:12:19 +0000 (14:12 +0100)]
Stabilize tst_qquicktextinput::remoteCursorDelegate()

In some cases QCOMPARE(component.status(), QQmlComponent::Loading);
(line 2800) is failing -- it appears to be Ready immediately. Add a delay
to ensure it always hits Loading before Ready.

This is a backport of change: I975f3b3ea6004f178a7b0fb21193dcbdaf483157
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Backported since the test keeps on failing for the stable branch.

Change-Id: Ic90f1fc3de3e0a0ee75026cbebf8d99304a67b98
Reviewed-by: Michael Brasser <michael.brasser@live.com>
11 years agoFix TextEdit::persistentSelection docs (false by default)
J-P Nurmi [Fri, 1 Mar 2013 12:26:50 +0000 (13:26 +0100)]
Fix TextEdit::persistentSelection docs (false by default)

Change-Id: I3576e08b2bf159250a163466f1402952c7520e8b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
11 years agoMark flaky tst_qv8profilerservice test as insignificant on Mac
Kai Koehne [Thu, 28 Feb 2013 11:41:43 +0000 (12:41 +0100)]
Mark flaky tst_qv8profilerservice test as insignificant on Mac

Task-number: QTBUG-29975

Change-Id: Ia80fab4342c365e08fde56812bd331ee7ce13bc7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agodefine MODULE_VERSION
Oswald Buddenhagen [Tue, 26 Feb 2013 10:45:42 +0000 (11:45 +0100)]
define MODULE_VERSION

Task-number: QTBUG-29838
Change-Id: I03ce9975ede5cff53e976409e2fabff1f56e1ea9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoGridView: fix resetColumns() to calculate the amount of columns right
J-P Nurmi [Tue, 26 Feb 2013 17:20:17 +0000 (18:20 +0100)]
GridView: fix resetColumns() to calculate the amount of columns right

Task-number: QTBUG-29822
Change-Id: I3649398f3d283bc2781daa6b3071538414653e6d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
11 years agoUse qmake for package dependency resolution in cmake tests.
Stephen Kelly [Mon, 25 Feb 2013 10:53:00 +0000 (11:53 +0100)]
Use qmake for package dependency resolution in cmake tests.

This allows us to remove hardcoded depends information.

Change-Id: Ia2b364a65484a2d99320cc3d45cfcbb5a0b68c6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoFix headers without Qt module directory name in their includes
Josh Faust [Wed, 20 Feb 2013 19:42:56 +0000 (11:42 -0800)]
Fix headers without Qt module directory name in their includes

Fixed headers to include the Qt module directory in their #include
directives, e.g. <QtCore/QObject> instead of <QObject>.

QTBUG-29797

Change-Id: I6f61973deb4e48158d3eff896afd81ca4b8ae960
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoFix warnings about shadowing members
Thiago Macieira [Sat, 22 Dec 2012 21:56:44 +0000 (13:56 -0800)]
Fix warnings about shadowing members

util/qqmlpropertymap.h:87:9: error: declaration of 'parent' shadows a member of 'this' [-Werror=shadow]
[and others]

Change-Id: I2ff1a3c133efe2132e74dad00596931a84a7f421
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoListView's highlightMoveDuration should default to -1.
Michael Brasser [Thu, 21 Feb 2013 14:46:56 +0000 (08:46 -0600)]
ListView's highlightMoveDuration should default to -1.

Change-Id: Ibb53cc21b4f1f301569cd7724c60cb8df978921a
Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
11 years agoFlickable shouldn't grab the mouse until it starts an effective move.
Andrew den Exter [Sat, 16 Feb 2013 07:21:28 +0000 (17:21 +1000)]
Flickable shouldn't grab the mouse until it starts an effective move.

If the boundBehavior prevents the flickable from moving its content
item in response to a drag it shouldn't grab the mouse as that will
prevent a parent MouseArea or Flickable from handling the drag.

Task-number: QTBUG-29718
Change-Id: I3a1be4ed0132b91dca2fb0387ecefd39275a52da
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoMouseArea shouldn't grab the mouse until there is an effective drag.
Andrew den Exter [Fri, 15 Feb 2013 11:29:32 +0000 (21:29 +1000)]
MouseArea shouldn't grab the mouse until there is an effective drag.

A MouseArea shouldn't prevent a parent MouseArea or Flickable from
handling a drag event unless it is going to do something useful with
it.

Task-number: 29717
Change-Id: I24016994f6cf9116382ef7faeb50b10e5716e10e
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoTypos: tripple->triple
Frederik Gladhorn [Thu, 21 Feb 2013 12:13:04 +0000 (13:13 +0100)]
Typos: tripple->triple

This enables grepping.

Change-Id: Ibf85800b998a02645c50b1b84d42088d16091378
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
11 years agoStabilize clicking in QQuickTextEdit test
Frederik Gladhorn [Thu, 21 Feb 2013 12:17:45 +0000 (13:17 +0100)]
Stabilize clicking in QQuickTextEdit test

This test would try to emulate mouse clicks
and not wait inbetween. That can lead to clicks
spilling over to the next mouse event.

Change-Id: I320f86453215190a1c694ba49c0fc3831dcb60b9
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
11 years agoMerge branch 'stable' into release
Johanna Aijala [Thu, 21 Feb 2013 07:17:06 +0000 (09:17 +0200)]
Merge branch 'stable' into release

Change-Id: I13e80072db1e2c14a37b6a123276be81b085e87e

11 years agoAdd Test for Animating Qml Dynamic Properties using QPropertyAnimation
David E. Narváez [Sat, 16 Feb 2013 15:42:23 +0000 (10:42 -0500)]
Add Test for Animating Qml Dynamic Properties using QPropertyAnimation

Test case for calling QQmlVMEMetaObject::metaCall from
QPropertyAnimationPrivate::updateProperty

Task-number: QTBUG-29082
Change-Id: Iecab74132eb3a843e53356effe3b6bbe4d5a8fb2
Reviewed-by: Alan Alpert <aalpert@rim.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoDoc: Fix paths and add missing project files for QML and Quick examples
Topi Reinio [Tue, 19 Feb 2013 10:16:56 +0000 (11:16 +0100)]
Doc: Fix paths and add missing project files for QML and Quick examples

This change fixes a number of 'example path does not exist' warnings
from qdoc, and adds .qmlproject files for pure qml examples so they'll
appear correctly in the example manifest files.

Change-Id: Id0a424c4826fb5d8ebe6c3309bf33b976ff8477c
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix QQuickTimeLine::accel() & accelDistance()
J-P Nurmi [Tue, 19 Feb 2013 17:05:10 +0000 (18:05 +0100)]
Fix QQuickTimeLine::accel() & accelDistance()

Do not compare real numbers (velocities, accelerations and distances)
to 0.0f, but use qFuzzyIsNull() and qIsNaN().

Task-number: QTBUG-29144
Change-Id: I8fe7ebfbc9f665fa2507e66344d081ef2f43b181
Reviewed-by: Alan Alpert <aalpert@rim.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoFixed build when Qt is configured with -no-opengl.
Samuel Rødal [Tue, 19 Feb 2013 13:47:12 +0000 (14:47 +0100)]
Fixed build when Qt is configured with -no-opengl.

Task-number: QTBUG-28849
Change-Id: I331ebca76892ce7ffbc6f8e03ff4afe0c8e28d5e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoDocs: Slow Down Animations only exists in qml1
Frederik Gladhorn [Thu, 14 Feb 2013 23:50:58 +0000 (00:50 +0100)]
Docs: Slow Down Animations only exists in qml1

The functionality was part of qmlviewer.

Change-Id: Iaf2e19acf54e6773e2b79659f4dc51b92de91dd4
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoClarify Component::createObject docs
Alan Alpert [Thu, 14 Feb 2013 10:36:31 +0000 (02:36 -0800)]
Clarify Component::createObject docs

Task-number: QTBUG-29650
Change-Id: Ie6f9027ff779f8a513a52b425d9a393c0ecd9c7d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix embedding images in text elements
Eskil Abrahamsen Blomfeldt [Tue, 19 Feb 2013 09:26:44 +0000 (10:26 +0100)]
Fix embedding images in text elements

It seems that the the inner target rect has either been added
recently or its default has been changed to something invalid,
because we need to set it to the same as targetRect for the
image to show up at all.

Task-number: QTBUG-29560
Change-Id: I0fe6b7c5ab07afc780b8ea33a7ccc210861e0821
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoDoc: Update QtQuickTest documentation
Caroline Chao [Mon, 11 Feb 2013 10:45:34 +0000 (11:45 +0100)]
Doc: Update QtQuickTest documentation

Add some information about -input, -functions and -help
command-line options. Add some examples on how to run a
single file and a single function for a QtQuickTest based
test.

Change-Id: Icd5f92bf8541aa412e2cd18d82dec16a85fe78c9
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoDoc: Correcting typo "without with"
Marcel Krems [Thu, 7 Feb 2013 03:06:02 +0000 (04:06 +0100)]
Doc: Correcting typo "without with"

Change-Id: Ibacbb9aefe9a333994014aec17a0079477a4618f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix missing TextInput::remove(int start, int end) docs
J-P Nurmi [Fri, 15 Feb 2013 10:28:06 +0000 (11:28 +0100)]
Fix missing TextInput::remove(int start, int end) docs

Change-Id: I0c98e713d53391a191435e5c17b58becddf6d451
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoDoc: Removed reference to deprecated \badcode command.
Jerome Pasion [Thu, 14 Feb 2013 14:01:52 +0000 (15:01 +0100)]
Doc: Removed reference to deprecated \badcode command.

QDoc doesn't differentiate between \badcode and \code. They both look
the same in the output.

Change-Id: Ia0580f7d664ad5e33b48d6511dac7c61349cacce
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoAdd license files mandated by (L)GPL.
Timo Jyrinki [Fri, 8 Feb 2013 07:07:38 +0000 (09:07 +0200)]
Add license files mandated by (L)GPL.

Currently only qtbase includes the required LICENSE files, which
are referred to from the code headers. The same files should
be distributed as part of all the modules as well, so that the
(L)GPL licenses are adhered.

These files were wget:d from:

https://qt.gitorious.org/qt/qtbase/blobs/raw/stable/LGPL_EXCEPTION.txt
https://qt.gitorious.org/qt/qtbase/blobs/raw/stable/LICENSE.LGPL
https://qt.gitorious.org/qt/qtbase/blobs/raw/stable/LICENSE.GPL

As an addition to above, added also LICENSE.FDL. All the modules
additionally require it, since they include at least *.qdoc files and in
some cases a couple of others.

File received via
wget http://qt.gitorious.org/qt/qtbase/blobs/raw/stable/LICENSE.FDL

Change-Id: I35cb3523061cfb041084fe9a7e60928c44e224b2
Reviewed-by: Jason McDonald <macadder1@gmail.com>
11 years agoA MouseArea should not receive move or release events if the press was not accepted.
Michael Brasser [Wed, 13 Feb 2013 04:19:10 +0000 (22:19 -0600)]
A MouseArea should not receive move or release events if the press was not accepted.

Change-Id: If70650d7150b224f4460697a953611dd37d57af1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoRemove QPointerBase bic check.
Stephen Kelly [Tue, 12 Feb 2013 20:06:32 +0000 (21:06 +0100)]
Remove QPointerBase bic check.

QPointerBase is not public or exported and it is to be removed

Change-Id: Ieb7360a1a01125d4bff20140b02ec71a076440cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoDesignerSupport: Fix rendering in designer for if new items are added
Marco Bubke [Tue, 12 Feb 2013 13:28:02 +0000 (14:28 +0100)]
DesignerSupport: Fix rendering in designer for if new items are added

The SG nodes are exchanged if the hierarchy the Qml hierarchy is changed.
So the SG root node should be always updated for every rendering.

Task-number: QTCREATORBUG-8699
Change-Id: I069142e4c5fc65efc3485017fa000ed7e8f2b350
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
11 years agoRemove use of QPainter::HighQualityAntialiasing. It has no effect.
Gunnar Sletta [Tue, 12 Feb 2013 08:16:12 +0000 (09:16 +0100)]
Remove use of QPainter::HighQualityAntialiasing. It has no effect.

Change-Id: I7e1d07a9f34d6edf9dbe3449d34636f700218532
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoFix extending example.
Gunnar Sletta [Tue, 12 Feb 2013 08:15:25 +0000 (09:15 +0100)]
Fix extending example.

The antialiasing was broken due to wrong flag being used and that the
bounds were outside the texture and chapter 5 and 6 did not compile.

Change-Id: Ib7c4d8c276a3cc5583ff794e10ff539720857e0c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoDoc: corrected reference to snippet in imageparticle.qdoc
Nico Vertriest [Mon, 28 Jan 2013 15:27:38 +0000 (16:27 +0100)]
Doc: corrected reference to snippet in imageparticle.qdoc

Task-number: QTBUG-29101
Change-Id: If731480343fd4d65aa5fca5c184b03c14f2f340e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoDoc: Removed reference to QAbstractItemModel::setRoleNames()
Venugopal Shivashankar [Tue, 5 Feb 2013 15:14:32 +0000 (16:14 +0100)]
Doc: Removed reference to QAbstractItemModel::setRoleNames()

This function is deprecated and it is recommended to
reimplement QAbstractItemModel::roleNames() instead.

Task-number: QTBUG-29456
Change-Id: Ib28759fe2349edd32a1b87bac04eb44d625d3e60
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoStabilize resizemodeitem test.
Frederik Gladhorn [Thu, 7 Feb 2013 13:30:48 +0000 (14:30 +0100)]
Stabilize resizemodeitem test.

Resizing can take time. Instead of qWait(50)
use QTRY_COMPARE to make sure we give enough time.

Change-Id: I484eca1f4d49381913dc82f405c73de653608493
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoFixed Canvas ImageData pixel values not being settable to 0.
Samuel Rødal [Wed, 6 Feb 2013 08:18:19 +0000 (09:18 +0100)]
Fixed Canvas ImageData pixel values not being settable to 0.

Someone probably figured "since the data is all initialized to 0 to
begin with, we can skip 0 values". However, it's possible to temporarily
set a value to other than 0 and then back to 0, a fully valid use case
that we need to support.

Task-number: QTBUG-29065
Change-Id: Ia9f0803743d696ca8b9cca89c666ccba80a3abd0
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agosubstitute fixed version numbers in qdocconf files with variables
Oswald Buddenhagen [Wed, 30 Jan 2013 16:36:45 +0000 (17:36 +0100)]
substitute fixed version numbers in qdocconf files with variables

Change-Id: If28446d2d14dde62ff662ffdd366dc6384c95326
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix lupdate-warning in qqmlrewrite.cpp.
Friedemann Kleint [Mon, 4 Feb 2013 15:43:23 +0000 (16:43 +0100)]
Fix lupdate-warning in qqmlrewrite.cpp.

Class 'QQmlRewrite' lacks Q_OBJECT macro.

Replace global-static strings by message functions.

Change-Id: I67a6fbe67575533d3ce5750d72c9d7eff06e7efa
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoFix lupdate-warnings in qqmlimport.cpp.
Friedemann Kleint [Mon, 4 Feb 2013 15:41:17 +0000 (16:41 +0100)]
Fix lupdate-warnings in qqmlimport.cpp.

qqmlimport.cpp:738: Class 'QQmlImportsPrivate' lacks Q_OBJECT

Remove tr()-function and use QQmlImportDatabase::tr()
directly.

Change-Id: I3a1561c57a6ee90d271a6043b0175e17a7828666
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoFix lupdate-warnings.
Friedemann Kleint [Mon, 4 Feb 2013 15:39:22 +0000 (16:39 +0100)]
Fix lupdate-warnings.

qqmlcomponent.cpp:667: Cannot invoke tr() like this
qqmltypeloader.cpp:2292: Cannot invoke tr() like this
qquickloader.cpp:944: Cannot invoke tr() like this

Change-Id: Ifdd1a7b958b6af88f251e7df27eb4d4018301914
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoAdd next.png to shared qrc files
Alan Alpert [Fri, 1 Feb 2013 19:23:10 +0000 (11:23 -0800)]
Add next.png to shared qrc files

Otherwise the executable versions of the examples print errors instead
of loading it.

Change-Id: I7d370ce3ee172491c004668847cdb6d5967f2b24
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoEnsure the cursorRectangle is updated as the width of the text changes.
Andrew den Exter [Wed, 19 Dec 2012 07:12:58 +0000 (17:12 +1000)]
Ensure the cursorRectangle is updated as the width of the text changes.

Outside of when of a monospace font is used, if the text changes the
visual position of the cursor will have most likely changed as well
even when the cursor index hasn't.

Task-number: QTBUG-28677
Change-Id: If8077772d8541a677d5875976e6cd9fc453731df
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoMerge branch 'release' into stable
Sergio Ahumada [Thu, 31 Jan 2013 14:21:52 +0000 (15:21 +0100)]
Merge branch 'release' into stable

Change-Id: Ic270f7814489b2c7df7e0f1ecb46cd516802cac5

11 years agoDocument QQuickItem::itemChange and QQuickItem::window() properly
Gunnar Sletta [Wed, 30 Jan 2013 09:43:59 +0000 (10:43 +0100)]
Document QQuickItem::itemChange and QQuickItem::window() properly

Change-Id: Ic0e50ae8760c0c3050db3a095b0fa86679a0c010
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoStrengthen reference to var properties during construction
Alan Alpert [Fri, 25 Jan 2013 01:31:41 +0000 (17:31 -0800)]
Strengthen reference to var properties during construction

Normally var properties are kept alive by a reference to the object they
are declared on, but during the construction of that object the GC may
not be aware of said object. This change uses a strong reference during
GC passes which take place while the object is being constructed.

Task-number: QTBUG-29138
Change-Id: Ieecfcc7567aefac0d67cb933728daf16ed3eed0a
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
11 years agodocfix: Emitter.enabled was documented as Emitter.emitting.
Gunnar Sletta [Mon, 28 Jan 2013 11:15:54 +0000 (12:15 +0100)]
docfix: Emitter.enabled was documented as Emitter.emitting.

Change-Id: I9500c336b9e11f858da95ff4ed783b70876f3fd6
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoFix memory leak
Alan Alpert [Fri, 25 Jan 2013 01:42:20 +0000 (17:42 -0800)]
Fix memory leak

The cache is filled with dynamically created entries, so clear is not
quite enough.

Change-Id: I40a49ce5d1a3d6da1b419e85cae95f2f95011a19
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
11 years agoDoc: declarative-colors.png not visible in qmltypereference.qdoc
Nico Vertriest [Mon, 28 Jan 2013 12:29:36 +0000 (13:29 +0100)]
Doc: declarative-colors.png not visible in qmltypereference.qdoc

Copied the file from qml image dir to quick image dir

Task-number: QTBUG-29101
Change-Id: Iae64763bc38e135a0dbff8566cf540a309e4c42f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoDoc: corrected path to snippet
Nico Vertriest [Mon, 28 Jan 2013 11:17:24 +0000 (12:17 +0100)]
Doc: corrected path to snippet

Added "quick" to path in imageparticle.qdoc

Task-number: QTBUG-29101
Change-Id: If328cde08f46b720defa1953916753ba9d9836a8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix unterminated comment
Sze Howe Koh [Sun, 27 Jan 2013 08:39:08 +0000 (16:39 +0800)]
Fix unterminated comment

Change-Id: Ic5bcbac339588fdded265a00515f768058d73870
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoDoc: Fix "Command '\li' outside of '\list' and '\table'"
Sze Howe Koh [Mon, 28 Jan 2013 00:48:16 +0000 (08:48 +0800)]
Doc: Fix "Command '\li' outside of '\list' and '\table'"

It doesn't look like any list is meant to be here. All other instances
of "down" are italicized in this document, so we follow suit.

Change-Id: I2f0c55dba2025b4eef81248a5f650ebaaaa5bb3a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agofix qmltest example install path
Oswald Buddenhagen [Thu, 24 Jan 2013 20:37:24 +0000 (21:37 +0100)]
fix qmltest example install path

Change-Id: I267155bb34b8226331fc2951521dc7b8643a014c
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agomark forgotten EXAMPLE_FILES
Oswald Buddenhagen [Thu, 24 Jan 2013 20:20:45 +0000 (21:20 +0100)]
mark forgotten EXAMPLE_FILES

Change-Id: I83c7706479ea3afd45ab9c97f63f68d416b28f55
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agofix installation of qmltestcase example
Oswald Buddenhagen [Thu, 24 Jan 2013 17:32:19 +0000 (18:32 +0100)]
fix installation of qmltestcase example

split the project along the built-as-part-of-qt line:
in qt, it must comply with the installation rules for examples, and it
shouldn't be an actual test case - our CI is not supposed to run it ...
the stand-alone build (which users are supposed to make use of) needed
adding TESTDATA for proper installation.

Change-Id: I1bbf7b1204410c5eb8755477310bb023e8f87623
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoIntroduce a workaround for a GLSL bug on BB10
Fabian Bumberger [Fri, 25 Jan 2013 15:47:34 +0000 (16:47 +0100)]
Introduce a workaround for a GLSL bug on BB10

When using the sizeTable property of the QQuickImageParticles, the vertex shader is not compiling.
This is a workaround for a compiler bug on BB10.

Change-Id: I32d5e92bc300304cb856d97b1310f607df1e48be
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoPrevent possible leak with texture providers.
Michael Brasser [Fri, 25 Jan 2013 16:22:08 +0000 (10:22 -0600)]
Prevent possible leak with texture providers.

If the job has been cancelled, ensure we clean up the texture factory
that was created.

Change-Id: I0a6e4a23732e6041084ddc483d701a25befd91c9
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoDoc: Add QML Types to table of contents in Assistant
Topi Reinio [Thu, 24 Jan 2013 14:43:32 +0000 (15:43 +0100)]
Doc: Add QML Types to table of contents in Assistant

Replace 'headerfile' with 'qmlclass' in qdocconf file.

As a positive side-effect, QDoc will also add files for 'All members'
for QML Types into .qhp as well.

Task-number: QTBUG-29226
Change-Id: I282ef42283ec147ea0f2b466b15e7f104c8a012a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
11 years agoUngrab mouse when FocusAboutToChange instead of Leave
Frederik Gladhorn [Fri, 11 Jan 2013 13:48:32 +0000 (14:48 +0100)]
Ungrab mouse when FocusAboutToChange instead of Leave

Commit 7b2e2117162594a2d0234bb02408f5b5a446488b
introduced a regression in mouse handling:
When moving the mouse out of the window it would cancel
all further mouse events. That is actually not wanted
(eg scroll bars).
Instead ungrab the mouse when the focus changes,
that means the mouse handling with popups works and the
scrollbar use case is also fixed.

All the tests related to this seem quite timing sensitive,
so try some more QTRY_VERIFY.
Remove the parallel_test so that more cpu time will actually
let the tests pass more reliably.

Change-Id: I90586b05f461d3762728a466d71bcb967e03d14b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
11 years agoDoc: Fix uses of \since
Debao Zhang [Thu, 10 Jan 2013 07:47:11 +0000 (15:47 +0800)]
Doc: Fix uses of \since

Change-Id: Idf497424279fbee08e6e5750e6a15372c808105f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix alignment of Text element with implicit size
Eskil Abrahamsen Blomfeldt [Thu, 24 Jan 2013 09:28:19 +0000 (10:28 +0100)]
Fix alignment of Text element with implicit size

In change e1d6b323d474acc5cd70fd9a0b283326316f55a0 there's an
optimization which disables layouts on the QTextDocument, but the
layout has to be re-enabled before we can call idealWidth() since
this will be zero as long as the page size is 0x0. We simply set
the page size to undefined again before calling idealWidth.

Task-number: QTBUG-29262
Change-Id: I6bebe7be4c99fce0de8fc4178b5e1abc81abbe87
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: aavit <eirik.aavitsland@digia.com>
11 years agoDisconnect from previous loading image when loading a new image.
Michael Brasser [Thu, 24 Jan 2013 04:02:53 +0000 (22:02 -0600)]
Disconnect from previous loading image when loading a new image.

Change-Id: If2fa95d9715a55d3f07ecf5f232e4f4b9a44a6fb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoDoc: Updated change log with documentation entry
Jerome Pasion [Mon, 21 Jan 2013 15:56:02 +0000 (16:56 +0100)]
Doc: Updated change log with documentation entry

Change-Id: I1cd4dc70265f2425045328910be12a0cfaeb795c
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoMake HTML horizontal alignment work like in QtQuick 1
Eskil Abrahamsen Blomfeldt [Wed, 23 Jan 2013 13:18:28 +0000 (14:18 +0100)]
Make HTML horizontal alignment work like in QtQuick 1

If the text width set is higher than the ideal width, there's
no risk of wrapping, and thus we align the text based on the
full width of the Text element. This matches the behavior in
Qt Quick 1.1.

Task-number: QTBUG-29262
Change-Id: Ib191e3dd9d17e3bea63ca7825708f53768960e26
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoRemove outdated macro usage
Christian Stenger [Thu, 17 Jan 2013 08:17:58 +0000 (09:17 +0100)]
Remove outdated macro usage

Change-Id: I4b58f3d74d7dec9a95a07b907c500990630e7762
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoStabilize QQuickTextEdit test
Frederik Gladhorn [Wed, 23 Jan 2013 11:05:41 +0000 (12:05 +0100)]
Stabilize QQuickTextEdit test

tst_qquicktextedit::remoteCursorDelegate was failing
because the test server served the the remote file too
fast. It seems like the test relied on a slow machine to
run it.
Instead pass the Delay option to make the server serve
the file delayed.

Change-Id: Id99feea07f2da3b2ea0aa6c07e9b548e8f81f18b
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoDoc: Fixed "QML Types" node in Assistant
Jerome Pasion [Mon, 21 Jan 2013 15:35:21 +0000 (16:35 +0100)]
Doc: Fixed "QML Types" node in Assistant

Removed "class" from the "selectors" variable in qdocconf file.

Task-number: QTBUG-29242
Change-Id: I960dcbdb22358e033177b0ccb9c211136c0e4dcb
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
11 years agoQQuickImageProvider: fixed three \snippet paths
Xingtao Zhang [Sat, 12 Jan 2013 19:07:46 +0000 (19:07 +0000)]
QQuickImageProvider: fixed three \snippet paths

Change-Id: I289e61c7e3acc3d7047b2b26fae624900e076586
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoClean up accessibility QtQuick example
Topi Reinio [Mon, 21 Jan 2013 14:53:47 +0000 (15:53 +0100)]
Clean up accessibility QtQuick example

Remove an undefined value (column.h) used in the accessibility
example and fix minor indentation and style issues.

Task-number: QTBUG-29225
Change-Id: I118ca7ee4fd24a3e94eb9b39e60514314ddcd7f0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix crash in PathView
Tasuku Suzuki [Thu, 17 Jan 2013 09:46:45 +0000 (18:46 +0900)]
Fix crash in PathView

Change-Id: I259e7af1755ff9615782bbce03fc41ea1957cab3
Task-number: QTBUG-29176
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoMerge "Merge branch 'release' into stable" into refs/staging/stable
Gunnar Sletta [Thu, 17 Jan 2013 21:48:20 +0000 (22:48 +0100)]
Merge "Merge branch 'release' into stable" into refs/staging/stable

11 years agoMerge branch 'release' into stable
Gunnar Sletta [Thu, 17 Jan 2013 21:06:00 +0000 (22:06 +0100)]
Merge branch 'release' into stable

Change-Id: I88ecd5f396ecd9a9c910108d1cca832a3087f1d8

11 years agoPathCurve documentation: fix non-working example snippet
Topi Reinio [Tue, 15 Jan 2013 10:31:38 +0000 (11:31 +0100)]
PathCurve documentation: fix non-working example snippet

Set the contextType property in the example code that demonstrates
using PathCurve with Canvas; without it the code doesn't work.

Task-number: QTBUG-29114
Change-Id: I75be931d5a30a26efceb2c2493f5e41d092dbbc5
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
11 years agoEnable sub-pixel anti-aliasing for default builds on Windows
Eskil Abrahamsen Blomfeldt [Thu, 17 Jan 2013 13:10:02 +0000 (14:10 +0100)]
Enable sub-pixel anti-aliasing for default builds on Windows

While ANGLE builds only provide the OpenGL ES2 APIs, it's still
a desktop technology and we should default to using high quality
anti-aliasing.

Task-number: QTBUG-28782
Change-Id: Iefc764589e935899ead278cedef4c302694dd2bb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoAvoid race condition in QQuickTests
Gunnar Sletta [Thu, 17 Jan 2013 11:41:53 +0000 (12:41 +0100)]
Avoid race condition in QQuickTests

The QQuickView::show() function may or may not be synchronous and
because the rendering happens on another thread, the frameSwapped
can be emitted before we enter the qWaitForSignal() event loop.
Fix this by waiting for the window to become exposed instead, which
implies that it has rendered at least one frame.

Change-Id: I1100a6fe981018395bf141d67f06adb94a354206
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoImprove the look and feel of our demo launcher
Jens Bache-Wiig [Tue, 15 Jan 2013 16:10:57 +0000 (17:10 +0100)]
Improve the look and feel of our demo launcher

The existing demo launcher looks rather ugly. This does some
visual tweaks to make it look better, including adding support
for proper text wrapping.

It was approved by our design lead Diana.

Change-Id: I660764575a411f598c53c9c42e290a807e20c0cf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
11 years agoExporting required symbols for Qt Quick Designer
Thomas Hartmann [Wed, 16 Jan 2013 09:06:11 +0000 (10:06 +0100)]
Exporting required symbols for Qt Quick Designer

These classes are used by qml2puppet.

Qml2Puppet is an external process used by the Qt Quick Designer,
that builds the interface between the designer and Qt Quick/QML
internals.

Qml2Puppet is responsible for emulation and rendering.
The 2 in Qml2Puppet indicates that it is used for Qt Quick 2.0.

This would be nice to have in Qt 5.0.1 to allow testing based
on official packages. Also this helps early adaptors.

QQmlTimer is used to disable timers.

QQuickTextEdit and QQuickTextInput are used to disable the blinking
cursor.

QQuickBehavior is used to deal with behaviors.

QQuickPropertyChanges and QQuickStateGroup are
used to emulate states.

QQuickTransition is used to disable transitions.

Task-number: QTCREATORBUG-8572

Change-Id: I572707d93eda477df945976442efed32ef16df34
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoGreatly improved Scene Graph Overview documentation
Gunnar Sletta [Mon, 7 Jan 2013 15:20:39 +0000 (16:20 +0100)]
Greatly improved Scene Graph Overview documentation

Change-Id: I86b6bb9007d268ec039614a1693ecd839901e6d9
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoRemove workaround for particle shader on Blackberry
Fabian Bumberger [Wed, 16 Jan 2013 14:13:48 +0000 (15:13 +0100)]
Remove workaround for particle shader on Blackberry

Change-Id: Ibcf4b55323046fee4a18b4c5bf51c78ed8832a63
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoFixing a mistake in the GridView documentation
Fabian Bumberger [Mon, 14 Jan 2013 15:01:38 +0000 (16:01 +0100)]
Fixing a mistake in the GridView documentation

The item size of the GridView is solely determined by the cellHeight and cellWidth property.
I.e. the GridView will not resize the cells based on the root item size of the delegate.

Change-Id: I007e4b1719d78ebf126d166c89bfe6c64e2206f7
Reviewed-by: Alan Alpert <aalpert@rim.com>
11 years agoSilence compiler warnings in qaccessiblequickitem.h.
Friedemann Kleint [Fri, 11 Jan 2013 15:21:19 +0000 (16:21 +0100)]
Silence compiler warnings in  qaccessiblequickitem.h.

Introduced by c8ef32e2b6cded37a6854b94a281464c1b7a298b.

Change-Id: I654009b38f0169254c05398468d4fe4c2737dd5b
Reviewed-by: Alan Alpert <aalpert@rim.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoDoc: correcting typo "the the"
Nico Vertriest [Fri, 11 Jan 2013 11:40:19 +0000 (12:40 +0100)]
Doc: correcting typo "the the"

Task-number: QTBUG-28756

Spurious repetition of the definite article

Doc: corrected trailing space issue.

Change-Id: I95c1c5773dc4b25dd0a3625343a67975783435fd
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
11 years agoUpdate changes file for 5.0.1 release
Sergio Ahumada [Wed, 9 Jan 2013 20:51:42 +0000 (21:51 +0100)]
Update changes file for 5.0.1 release

Change-Id: I704cc948c37af639d9686c783a5341e2ab89903e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agodoc: Fix namespace version to 5.0.1 for qhp documentation
Sergio Ahumada [Sat, 12 Jan 2013 08:18:27 +0000 (09:18 +0100)]
doc: Fix namespace version to 5.0.1 for qhp documentation

Change-Id: Id101dc3a7ab5d2552531b7ea1819e0f2be725989
Reviewed-by: hjk <qthjk@ovi.com>
11 years agotest examples only in developer builds
Oswald Buddenhagen [Thu, 10 Jan 2013 11:11:33 +0000 (12:11 +0100)]
test examples only in developer builds

we don't want to actually build examples in production builds any more,
so the test is bound to fail.

Change-Id: I9adda2d147a05eb7acb3a864c81b8d0c0333c8bb
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>