Commit Graph

27 Commits

Author SHA1 Message Date
Bernd Weimer c460a83e26 Fixed some auto tests
In the listmodel test an error description was not converted to a
string.
In the pathview test, number literals are always interpreted as double,
but qreal can also be float, which lead to failing tests. Constructor
usage prevents "expected data of type 'float', got 'double'".

Change-Id: I0c760486de0ba4df6a5e9a33e9528ca7d7a1a63e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-03-12 18:22:02 +01:00
Alan Alpert bbb3d5b403 Move ListModel and ListElement to the QtQml import
They're already in the QtQml module, but were left in the QtQuick import
because they were considered to be of minimal use without QtQuick types.

QtQml types are being developed would could make ListModel useful
without QtQuick, indicating that they should no longer be considered
QtQuick depedent.

Change-Id: I31499f2cc23baf4bc70fb451ba164408bed89ff6
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2013-01-24 17:14:12 +01:00
Frederik Gladhorn 44b7d97d56 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I1656c712dfe99bc37d8ff21caa4ea51c3b375952
2013-01-23 18:28:44 +01:00
Tasuku Suzuki 9e604dcd07 Fix crash in PathView
Change-Id: I259e7af1755ff9615782bbce03fc41ea1957cab3
Task-number: QTBUG-29176
Reviewed-by: Alan Alpert <aalpert@rim.com>
2013-01-18 18:19:16 +01:00
Gunnar Sletta ebe8b9408c Complete rewrite of threaded render loop.
This change starts using the superior implementation of the scene graph
render loop which has been worked on in the scenegraph-playground
project for a while. It uses a far more straightforward locking/sync
paradigm compared to the existing one and is less deadlock and error
prone. It also enables the scene graph thread to run on its own when
the GUI thread is blocked, enabling threaded animations.

This changes also introduces a naming change inside Qt Quick from
"Window Manager" -> "Render Loop" as that fits better to what the
code does.

Change-Id: I1c2170ee04fcbef79660bd7dae6cace647cdb276
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-18 12:26:55 +01:00
Sergio Ahumada 83deab8d1b Update copyright year in Digia's license headers
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 19:52:37 +01:00
Alan Alpert b2c24447a1 Stabilize tst_qquickpathview
The complete flick is already a long operation, so when it's delayed due
to heavy system load it can exceed 5s easily. Increase the timeout to
give the flick time to finish.

Change-Id: I333c41ea432676a8c7f6de637f6af98203cd07fb
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-12-05 22:13:06 +01:00
Shawn Rutledge 55f6a109e9 Renamed QQuickItem::pos property to position
Abbreviated property names are less descriptive so we don't have
many of them.  Might as well be consistent.  QWindow::pos was already
renamed.

Change-Id: Ib52673e68e7dc902b2f8942dba6b899074b2538b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-29 16:07:44 +01:00
Shawn Rutledge eba5128f66 All QWindow properties that have "window" in them have been renamed.
Depends on patch Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 in qtbase.

Change-Id: I9614cc2c7ed119c663b3f6f99267483e291e529c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-08 19:04:56 +01:00
Iikka Eklund 46010aa7a2 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-23 08:22:24 +02:00
J-P Nurmi c520a9c409 tst_QQuickPathView::package(): updated QSKIP()
QTBUG-21590 has been marked as resolved, but the problem persists.
A new bug QTBUG-27170 has been reported and the QSKIP() updated
accordingly.

Task-number: QTBUG-27170
Change-Id: I91d7df2588d87af833502f6c11d2e6a051e4ebb5
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-09-07 15:55:36 +02:00
Martin Jones 4a4a08d61a Add cacheItemCount property to PathView
cacheItemCount specifies the number of items to cache off the path when
pathItemCount is specified.  This allows up to cacheItemCount items to be
kept alive when they move off the path, and also to asynchronously
create items off path in preparation for display when the path offset
changes.  This is the equivalent of cacheBuffer for other views.

Task-number: QTBUG-23931
Change-Id: I03497537d3f929e5e3579536850dd43eb2724c38
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-08-28 04:32:48 +02:00
Friedemann Kleint c20463631d QtQuick: Remove usages of qWaitForWindowShown(QWindow *).
Change-Id: I722e20b2fb8d8c6c19c6f3f2cb16910d7433e9a4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 16:53:08 +02:00
Martin Jones 2a4bb96084 Add methods to PathView: positionViewAtIndex(), indexAt(), itemAt()
These methods are already present in ListView and GridView.

Change-Id: I3777fccdecd77c8ab756a0062c71c6e1bfb749ef
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-07-23 06:38:18 +02:00
Martin Jones 0fc361f96b Changing PathView model after componentComplete should reset position
If the model is changed after the component is completed, the offset
and currentIndex should be reset to 0.

Change-Id: Ie36eb0c17ce6602c6ae15b5ee7aeb8b1a6e7854b
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-07-23 03:30:23 +02:00
Friedemann Kleint bd618f62d8 QtDeclarative: Remove usage of deprecated qWaitForWindowShown().
- Replace by qWaitForWindowExposed() or
  qWaitForWindowActive() where applicable.
- Use QVERIFY to verify success.
- Stabilize some tests by checking for 'active',
  add missing call to show().

Change-Id: I6cae063e44a3839760ed9f61dacb26cd1717118d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-19 14:37:49 +02:00
Alan Alpert feb996e3ab QQuickCanvas renames
QQuickCanvas is now called QQuickWindow
QQuickCanvas::rootItem is now QQuickWindow::contentItem
QQuickItem::canvas is now QQuickItem::window
QQuickItem::ItemChangeData::canvas is also renamed window
QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow
The functions related to the color property have dropped the clear from
their names.

The first three changes have interim compatibility measures in place to
ease the transition.

Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-07-17 07:26:15 +02:00
Martin Jones 6a013bf73b PathView needs drag events similar to Flickable
Added dragging property and dragStarted() and dragEnded() signals.

Task-number: QTBUG-21740
Change-Id: I718835ff7e46af615951ec5f248eba41bac31071
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-07-04 10:12:10 +02:00
Martin Jones 7722786a13 Changing PathView offset doesn't set currentIndex appropriately
If the highlightRangeMode is StrictlyEnforceRange then the
currentIndex should always be updated when the path offset changes.

Task-number: QTBUG-19835
Change-Id: I2371e5abd430e770bbb8f9f9d5f4e1d17e0d8ff5
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-06-27 08:49:46 +02:00
Martin Jones 805c30e809 Allow qtdeclarative to compile with -no-widgets
We have no hard requirement for QtWidgets library, so we should
build without it.

Change-Id: I85c85cc1a52bf9daa7ab7916f19bf7cc3ad5845f
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
2012-06-05 04:35:50 +02:00
Andrew den Exter 447e5acb88 Reset the PathView currentIndex to 0 when all items are removed.
The default currentIndex for an empty PathView is 0, and except when
there is no model or an empty model setCurrentIndex won't allow a
currentIndex outside the valid index range for the model. This changes
the wrapping for negative numbers in setCurrentIndex so that it is
consistent with decrementCurrentIndex and forces the currentIndex to
0 if there are no model items.

Task-number: QTBUG-21316
Change-Id: Id4d4d78e9832d05baf8a9d148e7f81ee89c9bc61
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-05-31 02:23:00 +02:00
Andrew den Exter 2533a40cf2 Fix PathView not updating after all items are removed from the model.
Always clear the layoutScheduled flag on a refill even if there are no
items to create, otherwise future layouts won't be scheduled because
it appears one is already pending.

Fixes an issue in the dragselection example where items that should
have moved to the PathView instead disappeared.

Change-Id: I4302b5b43184c697a78f5c09dc3811326e2271ca
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-05-28 05:30:34 +02:00
Martin Jones 9575a325c2 PathView was moving view too soon on drag
In order to allow gesture grabbing to work correctly, the view shouldn't
react to a drag until the event after the one that triggered it.

Change-Id: I3b84e501aa0f82da821498fa26abe8bbf66a6252
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-05-14 05:37:29 +02:00
Martin Jones 912c25633e Support snapMode in PathView
PathView missed out on snapMode, which is especially useful for
its SnapOneItem mode.

Change-Id: I0e9b080ef72d9bc1e305445cd8dfde8e21e4e3da
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-04-04 06:00:40 +02:00
Martin Jones adb8811e96 PathView was missing the maximumFlickVelocity property
Change-Id: I0ed4ff0fe169187f7a8e03597be7407e9896100d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-03-26 06:10:56 +02:00
Martin Jones 5d901a7435 Restore view to sensible position if grab is cancelled.
If the mouse grab is stolen, return to allowed bounds.

Change-Id: Icc44da32ff62bed273f0ccbb5498766981cdf9a4
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-20 04:24:32 +01:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00