aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util
Commit message (Collapse)AuthorAgeFilesLines
* [new compiler] Initial support for QQuick state changesSimon Hausmann2014-01-172-0/+63
| | | | | | | This requires the use of the customer parser together with lazy binding compilation Change-Id: I45d8a206267d3e0c807771a79645168254be9c95 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Rework array handling for JS objectsLars Knoll2014-01-091-1/+1
| | | | | | | | | Split up ArrayData into two classes, one for regular arrays, one for sparse arrays and cleanly separate the two cases. Only create array data on demand. Change-Id: I9ca8d0b53592174f213ba0f20caf93e77dba690a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-061-1/+1
|\ | | | | | | Change-Id: If9a205bea219b9aca95d78b1e556ca9bbff58dd0
| * Doc: Fix broken linksSze Howe Koh2013-12-301-1/+1
| | | | | | | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-241-0/+1
|\| | | | | | | | | | | | | Conflicts: src/quick/items/qquickrectangle.cpp Change-Id: Ia40bc0f2f08b5be68e32eb1e1f118445d20e44fc
| * QtQuick docs: add missing \qmlpropertygroup commandsJ-P Nurmi2013-12-201-0/+1
| | | | | | | | | | | | | | "warning: No QML property group command found; using..." Change-Id: Iafbdbc09cbd76bf81a5baf3a5a4fab843778b5cb Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-162-18/+6
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp src/quick/items/qquicktext.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I0bc5786098193c2c40b6fd8905de75d90f6ed0cf
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-121-11/+0
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlcompiler.cpp Change-Id: I802731139d47c5b733dd805f7bf432d67d7331e1
| | * Revert "Load "@2x" images on high-dpi "retina" systems."Morten Johan Sørvig2013-12-031-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 707bbe5dea9d7398b205124a54422f2fafb6f151. By itself this is completely broken and the image will display at twice the size. We need to add code to handle the @2x image but revert for now to get sane behavior. Change-Id: Iccdb26e9d19930b5d0ef4b6c7f596c5766f77a8a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * | Fix up listening for layout direction changes.Robin Burchell2013-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the event type to ApplicationLayoutDirectionChange. LayoutDirectionChange is sent for QWidgets only at present, and was wrong anyway: each widget may have a different layoutDirection, but the application instance only has one -- tied to ApplicationLayoutDirectionChange. Relies on I2d2ac7dc07f11be5c7e501a3575b1d0978d8ac31 from qtbase to actually function. Task-number: QTBUG-21573 Change-Id: Ibee25927b2213ae9145d46556698f54d5129bd06 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * | Correctly profile the size of loaded pixmapsUlf Hermann2013-12-091-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only set the sizes when they're known, prefer request size to implicit size (as the request size is what ends up in the cache), and don't set the size twice. Task-number: QTBUG-35337 Change-Id: Ie516a1cae2d9050f61362ee99cf8a6a9dd8ea3bb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * | Profile a pixmap start event also when loading is asynchronous.Ulf Hermann2013-12-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If those events aren't profiled we get unmatched events for finished loading and errors. Task-number: QTBUG-35337 Change-Id: I132638edf5625566e37ee06453484f80b2adb74a Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | Fix SpringAnimation in Behavior when current value is set.Michael Brasser2013-12-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes regression introduced by d489f2f6549a86b3949004d1c8ec68487fc2adb7. We now only avoid running the animation if the Behavior wasn't already mid-animation. This ensure correct behavior for SpringAnimation, and also correct state for 'running'. Task-number: QTBUG-21549 Change-Id: I0f97813294cca22fb7a273e222fa0549c6de9ca7 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Behavior should not trigger when the tracked value has not changed.Michael Brasser2013-12-041-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behaviors are specifically for animating changes in value. When the value has not changed, do not trigger the animation. This ensures the animation system is not unnecessarily woken. [ChangeLog][QtQuick][Behavior] Do not trigger a Behavior when the tracked value has not changed. Task-number: QTBUG-21549 Change-Id: I5b20121ccfb75ea5ebf86705df89891c94cf6e7e Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Slightly accelerate access to value type propertiesSimon Hausmann2013-11-281-41/+41
| | | | | | | | | | | | | | | | | | | | | | We can't do a fast property index based access on them, due to the inability to read individual fields from the original object (i.e. the logic in QQmlValueTypeWrapper). However what we can determine and propagate is the type information of the individual properties, i.e. that the x and y properties of a QPointF are always doubles. Change-Id: Iee71ece2117294b7bc0b93deb0a77d7c51148b11 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QSmoothedAnimation: Don't set property if animation isn't runningRobin Burchell2013-11-251-0/+3
|/ | | | | | | | | | This could cause things to get "stuck" in the wrong state under some rather hard to reproduce conditions. Change-Id: Ied23d2bdfcfd0b197f4b28fed9c82ffd64e52ebf Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com> Done-with: Alan Alpert <416365416c@gmail.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Do not crash when one of group animation's children is nullJacek Całusiński2013-11-151-1/+2
| | | | | | | | | Check if pointer to QQuickAbstractAnimation for which we are setting group is valid. Task-number: QTBUG-34851 Change-Id: Iecb549f080804fd9489f884911fa51892def05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't dereference a null animationTemplateLars Knoll2013-11-141-1/+2
| | | | | | | | | | If the SpringAnimation gets used inside a Transition, the animationTemplate might get cleared, but updateCurrentTime() still gets called on the SpringAnimation after that. Task-number: QTBUG-34539 Change-Id: I1f27fdbfc594e6ff9a4343e45f7f4001964bb012 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix crash in animation controller upon destructionSimon Hausmann2013-11-091-0/+2
| | | | | | | | | | Triggered by tst_examples, it appears that we can have jobs in m_deleting that are also still listed in m_starting. So similar to what we do in beforeNodeSync, we now also take any deletion-scheduled jobs out of m_starting/m_stopping in the destructor. Change-Id: I2e00570a4e4669f8172354bf5806c5285920030a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Refactored Animator internalsGunnar Sletta2013-11-064-179/+184
| | | | | | | | | | | | Change the design from posting events for starting and stopping to use the scene graph's existing 'sync' point. This gives much higher predictability and makes both ownership and cleanup cleaner and also reduces intermediate states while events are waiting to be delivered. Task-number: QTBUG-34137 Change-Id: I069ac22acbddaa47925b8172ba98ac340fe9bf8d Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Doc: Fix broken linksSze Howe Koh2013-11-053-10/+10
| | | | | | Change-Id: Ie7408409ddbaa354370267f2dd74326ec56a4186 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Track size changes from transform animators.Gunnar Sletta2013-10-291-2/+3
| | | | | | | | | | When the size changes, so will most likely also the transform origin, so we need to check for it and update accordingly. Task-number: QTBUG-34140 Change-Id: Ic3d6c1ac599db499ab196a8cbe550308a75e837f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Allow &quot; in QQuickStyledTextJohn Brooks2013-10-241-0/+2
| | | | | | | | QString::toHtmlEscaped generates &quot;. QQuickStyledText should be symmetrical with that function. Change-Id: I67ea0abe446b5fa1edb53258dca58b84af910e28 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Don't use constructor function to initialize providersTor Arne Vestbø2013-10-151-4/+1
| | | | | | | It complicated static linking for no good reason. Change-Id: I8eb1548b799128bfab9451963cb80c72239b961c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Several smaller fixes to Animators.Gunnar Sletta2013-10-083-2/+23
| | | | | | | | | | | | | | Backwards animations are not supported for animators as the animation system cannot handle uncontrolled backwards animations. Make sure we write back values only for the animators that have run at all. Clockwise rotation to 0 can easily end up on 360 as a result the _q_interpolateClockwise function not being entirely correct. Change-Id: If69b8555a1361f46600a40e80419b65438c18097 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Make sure to markDirty the node from UniformAnimator.Gunnar Sletta2013-10-031-0/+4
| | | | | | | | Failure to do so will not repaint scene graphs which only has changes from the animator. Change-Id: Id420775d704df17379ca9b0eecd543fd3829fd00 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Make sure we apply the last transformation step.Gunnar Sletta2013-10-031-7/+6
| | | | | Change-Id: Ie9b9a04cf41033bb475875f419b16ce91f6a477d Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Make transform and opacity animators work when layer.enabled: trueGunnar Sletta2013-10-031-0/+12
| | | | | Change-Id: I6d9ece93a75782d524c211fc81a43f4311a38571 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Remane private QQuickAction into QQuickStateActionGabriel de Dietrich2013-10-0311-80/+80
| | | | | | | | | | | This avoid symbol conflicts when statically linking with Qt Quick Controls, that has its own QQuickAction class and which may become public some day. (QQuickPropertyAction might be a more apt name, but it's already taken). Change-Id: Ia9514d63d38295603a89d8ec5a88815a651380f7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-0215-157/+157
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-3045-45/+45
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* remove more uses of QV4::ValueLars Knoll2013-09-301-33/+33
| | | | | Change-Id: I11b0b2b7626297e2c98dc77784574da4b59ba8cf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix crash in tst_qmltest with the new animators.Gunnar Sletta2013-09-281-5/+14
| | | | | | | | | If the target of a job was deleted while it was running we need to avoid any operations on that job. Task-number: QTBUG-33723 Change-Id: Ia86856e7f32465f58e25c87f9c74c99b7cb0caea Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow animators to work properly with multiple windowsGunnar Sletta2013-09-264-51/+68
| | | | | Change-Id: I5ba663ba0fa089ea786cf43cb4dfa40cbc955342 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Support looping for "uncontrolled animations".Gunnar Sletta2013-09-262-1/+1
| | | | | | | | | | The render thread animations rely heavily on uncontrolled animations, meaning animations with duration=-1. We support this by adding a m_currentLoopStartTime and incrementally counting the finish time of each uncontrolled animation. Change-Id: I1f2ccea09aff4c51b1a7f98a2ddb58636af50557 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix API of QQmlV4HandleLars Knoll2013-09-261-10/+14
| | | | | Change-Id: Iac4a3fefebd33a5990408598486231a5add8e639 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fixed and updated Qt Quick's \qmlmodule pageJerome Pasion2013-09-2515-40/+40
| | | | | | | | | | | -incremented version to Qt Quick 2.2 (in \qmlmodule page) -import changed to QtQuick 2.2 -\inqmlmodule no longer needs the version. QDoc will ignore the version but it is better to remove it now to avoid confusion Task-number: QTBUG-32172 Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Made Qt Quick items' \since consistent.Jerome Pasion2013-09-252-9/+9
| | | | | | | | | | | | | | | | Qt 5.2: -"\since QtQuick 2.2" -> "\since 5.2" Qt 5.1: -"\since QtQuick 2.1" -> "\since 5.1" -"\since Qt 5.1" -> "\since 5.1" Qt 5.0: -"\since QtQuick 2.0" -> "\since 5.0" Task-number: QTBUG-32172 Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Use a StringRef for Managed::get()Lars Knoll2013-09-221-12/+14
| | | | | | | | | also store "toString" and "valueOf" as identifiers in the engine and fix two places where we compared strings the wrong way. Change-Id: I70612221e72d43ed0e3c496e4209681bf254cded Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Animators - Render thread animation systemGunnar Sletta2013-09-2115-10/+2098
| | | | | | | | | | | | This introduces 6 new QML types for animating state in the scene graph when the UI thread is blocked. The QObject property being animated is updated after the animation completes. It works also with the "windows" and "basic" render loops, but offer litte benefit then compared to in the "threaded" case. Change-Id: Ic19e47c898c0b8bd53e457db922b3c9c457c8147 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use a ReturnedValue for Managed::getIndexed()Lars Knoll2013-09-181-3/+6
| | | | | Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use ReturnedValue for Managed::get().Lars Knoll2013-09-181-11/+11
| | | | | Change-Id: Ia8f35d227b69d32e1f6a041283abbbd083aa34ca Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Expose "Qt.application.state".Yoann Lopes2013-09-172-1/+12
| | | | | | | | | | | This deprecates Qt.application.active. The new property can indicate more states than just active or inactive (currently Suspended and Hidden exists in addition to the aforementioned). Change-Id: I8d5bf72f89a357c13daf1625c20e8e7311dac013 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Remove qSort usages from declarativeGiuseppe D'Angelo2013-09-131-1/+3
| | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I8fa7d0186cc8f0ba562695974829e37f1eb87f2f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use a ReturnedValue when converting to String or ObjectLars Knoll2013-09-121-1/+1
| | | | | | | | Also rename Value::toQString() to Value::toQStringNoThrow(), and add a throwing toQString() method for JS use. Change-Id: I821b33fc61abb7d08839df965fd337685f61a545 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-1/+1
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compilation with MSVC 2008 (and prospective Windows CE build fix)Simon Hausmann2013-08-221-1/+1
| | | | | | | | | | | | | | | | | * Only 2010 and newer ship stdint.h, so for 2008 we have to provide a little stdint.h compat header, for some of the third-party code we import. Our own Qt code this patch changes to use quint* types instead. * Include math.h and float.h for some math functions. * disable the JIT on Windows CE for now. * Change use of intptr_t to qintptr in Qt code. intptr_t is in inttypes.h, except that with VS 2008 it is indirectly available through stdio.h. Let's avoid the mess and just use the qt type, that's always available. Change-Id: I19055edd89e0a6b147d9edbb3b711798ed3c05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-222-2/+14
|\ | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/quick/items/context2d/qquickcontext2d.cpp tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
| * Added ApplicationStateChangeEvent handling to QQuickApplication.Tomasz Olszak2013-07-091-2/+8
| | | | | | | | | | Change-Id: I8b8965bc36b483be7287abf4485221f428a0b92a Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| * Add bool QQuickKeyEvent::matches(QKeySequence::StandardKey)J-P Nurmi2013-07-011-0/+6
| | | | | | | | | | Change-Id: Iaa8392c1b113856fa80cd2507f8640050eb9bec2 Reviewed-by: Caroline Chao <caroline.chao@digia.com>