aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-02-111-0/+2
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/jsruntime/qv4arrayobject.cpp src/qml/jsruntime/qv4context.cpp Change-Id: Ied5b23bec4dc14abe51127c507aed668f855c1e1
| * Warn when attaching Keys to an invalid itemFrederik Gladhorn2014-02-111-0/+2
| | | | | | | | | | | | | | | | | | | | Using Window { Keys.onPressed: ... } does not work because window is not a QQuickItem. Warn at least. Change-Id: Ibd472f7b551ff2089cbc39ba43da27e6f8e0e97f Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-171-1/+5
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/dialogs/DefaultFileDialog.qml src/imports/widgets/qquickqfiledialog.cpp Change-Id: I00de6dd05cb773f01254061d585a82c90b229acd
| * On Mac only editable ComboBox should receive tab focusFrederik Gladhorn2014-01-111-1/+5
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQuickControls] Mac: ComboBox will only get tab focus when it is editable. Change-Id: Ife04de67b2e3dea77ba878b247ad0b676c879c02 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-081-2/+2
|\| | | | | | | Change-Id: Ied8d65aaf57e897a3dbc4df100744a594e8ee2cf
| * Keys Attached Property: Fix doc reference to nonexistent propertiesGabriel de Dietrich2014-01-081-2/+2
| | | | | | | | | | Change-Id: I5e6a0855b3ad10e3adf6cf73b08a7794daf187da Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-061-3/+3
|\| | | | | | | Change-Id: If9a205bea219b9aca95d78b1e556ca9bbff58dd0
| * Doc: Fix broken linksSze Howe Koh2013-12-301-3/+3
| | | | | | | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Fix interaction of QQuickItems with the garbage collectorSimon Hausmann2014-01-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QObject ownership of QQuickItem objects is not accessible / mutable in QML, because the parent property maps to the (dynamic) visual parent. There are use-cases of creating QQuickItem objects without a QObject parent and to support this, the visual parent needs to mark its visual children in order to provide intuitive semantics. [ChangeLog][QtQuick][Import Behavior Changes] A QQuick Item is now strongly referenced by its visual parent item, so it doesn't require a QObject parent to stay alive. Task-number: QTBUG-35913 Change-Id: Ief2d40ac76298a0cf241ca73ff654c4ecfa12748 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-241-0/+2
|\| | | | | | | | | | | | | Conflicts: src/quick/items/qquickrectangle.cpp Change-Id: Ia40bc0f2f08b5be68e32eb1e1f118445d20e44fc
| * QtQuick docs: add missing \qmlpropertygroup commandsJ-P Nurmi2013-12-201-0/+2
| | | | | | | | | | | | | | "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-161-10/+5
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp src/quick/items/qquicktext.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I0bc5786098193c2c40b6fd8905de75d90f6ed0cf
| * Fix touch to mouse synthesis/propagation.Robin Burchell2013-12-131-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Having mouse events synthesised from both QtGui and internally in QtQuick is not a great way togo about things, especially when QtGui doesn't have the same degree of knowledge as QtQuick about the items in the scene. Thus, we now accept all events inside QtQuick to block QtGui synthesis, which should fix a significant amount of edge-case touch breakage/bad behavior. Change-Id: I14e1c87761c8f43160049b5e6f9da15b4e5edbb7 Done-with: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Fix style animations to stop when the item is hiddenJ-P Nurmi2013-12-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QStyleAnimation automatically stopped for hidden QWidgets, but didn't know anything about QQuickItems and kept animating regardless of their visibility. QStyleAnimation was changed so that it will keep animating only as long as the animation target accepts animation updates. This change ensures that the style animation updates are accepted only when the item is visible. Task-number: QTBUG-35319 Change-Id: I3c93a653316b8abbbc32940cd7499b660828eff8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Support toggling antialiasing for Text and Rectangle.Michael Brasser2013-12-031-13/+46
| | | | | | | | | | | | | | Task-number: QTBUG-27968 Task-number: QTBUG-34366 Change-Id: Ic446ff4470abf21696e1764f902bd71e79762697 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Fix delivery of QEvents to QQuickItemsDaniel d'Andrada2013-11-291-104/+72
|/ | | | | | | | | | | Make them go through QObject::event() and comply to filtering from objects passsed to QObject::installEventFilter() Task-number: QTBUG-32004 Change-Id: Ib6972e7f5e588bee986ae5f2d69aa6fccb58af95 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Don't assert in QQuickItem::updateLars Knoll2013-11-181-1/+6
| | | | | | | | | | | The method can actually be called from QML, so we can not have an assert in that method. Instead simply return if the item has no contents Task-number: QTBUG-34060 Change-Id: Ib28ffa5c6c63fbec956abe25020010ed73a9cfa9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* KeyNavigation should use forceActiveFocusFrederik Gladhorn2013-11-011-1/+1
| | | | | | | | | | | | | | | It would only set focus which works fine as long as the target is in the same FocusScope. But as user one would expect that the target actually receives the focus. Using forceActiveFocus is sensible since the current item needs to have the "activeFocus" anyway and within the same focus scope setting focus=true on another item will take away the active focus. Task-number: QTBUG-34209 Change-Id: I824f15fd0d4d42eb2f0c6c1b02660f2e007b3362 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Item documentation: visibleChildren is a list of items, not a realShawn Rutledge2013-10-251-1/+1
| | | | | | | | | Followup to I5ec541226fabd72c05ce8ccb8bb7e56f6ec7717a Task-number: QTBUG-22724 Change-Id: I3f74fda29faba4054c5bb97aad4735f7c5f0f278 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Remove ancient and unused leftoversGunnar Sletta2013-10-221-52/+0
| | | | | Change-Id: Ia3a2aa2244748c2f3f2df8853f5bddfbbc4bc19f Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-120/+120
| | | | | | | | | | 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-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move Value::fromBool, ... to a new Primitive classLars Knoll2013-09-281-12/+12
| | | | | | | | This will simplify finding the remaining direct usages of QV4::Value that need fixing. Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QQmlV4Function API to be GC safeLars Knoll2013-09-261-25/+28
| | | | | Change-Id: Id4f79c22fc48ada1c8a9a858e1b7b3d1cf14d120 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fixed and updated Qt Quick's \qmlmodule pageJerome Pasion2013-09-251-5/+5
| | | | | | | | | | | -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-251-2/+2
| | | | | | | | | | | | | | | | 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>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-221-2/+7
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-211-2/+7
| |\ | | | | | | | | | Change-Id: I899f3b517523e4037de50802c0912f7dd960133e
| | * Docs: fix QtQuick2::Item::layer.sourceRect typeold/5.1J-P Nurmi2013-09-211-1/+1
| | | | | | | | | | | | | | | Change-Id: Ia02f451b07638ec2e3f0355b89bf9f7356da44a6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| | * Fix a crash in QQuickItem::nextItemInFocusChain()Liang Qi2013-09-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | There is no window object yet when Component.onCompleted. Task-number: QTBUG-33298 Change-Id: I0608d52ee9fe52a0e2c18e81ad7ba99b56078be4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | convert Managed::put() API to be GC safeLars Knoll2013-09-221-12/+18
| | | | | | | | | | | | | | | Change-Id: I09198ce372fa545372db389fac26828d21ad5731 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Further work towards an exact GCLars Knoll2013-09-221-4/+6
|/ / | | | | | | | | | | | | | | | | | | | | Add some more convenience in the helper classes in qscopedvalue_p.h Make accesses to CallData safer, and change ExecutionEngine::newObject() to return a safe pointer. Change-Id: I980909754ce9681cf6faa1355bab3a1e5d6dd186 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove qStableSort usages from declarativeGiuseppe D'Angelo2013-09-131-1/+2
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I57912f2d1f36053055ea36b1699f704a675dc8b0 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Use a ReturnedValue when converting to String or ObjectLars Knoll2013-09-121-2/+2
| | | | | | | | | | | | | | | | 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>
* | Merge branch 'stable' into devSergio Ahumada2013-09-061-3/+3
|\| | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv8debugservice.cpp src/qml/qml/v8/qv8engine.cpp tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic4a1dcdd8b8a84155d2f2abefdf1da5c3a56af31
| * Don't crash due to KeyRelease on an unloaded ItemShawn Rutledge2013-08-271-3/+3
| | | | | | | | | | | | | | Task-number: QTBUG-33127 Change-Id: Ie0c28abdb32c3b2318f934d3d2ddf459329384a2 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@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 remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-191-1/+3
|\| | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickgridview/qquickgridview.pro tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic54cafbdda1ac22757d2ee65dcc63a1b167c7556
| * Unset the cursor when an Item is unparentedDaiwei Li2013-08-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | It's possible for a cursor to get stuck if an item gets deleted. QQuickItemPrivate::derefWindow sets the cursorItem in QQuickWindowPrivate to 0, but doesn't unset the cursor. This causes the cursor to get stuck until the user hovers their mouse over an item that has a cursor set. Change-Id: I1d5d3ff13d69c76e4f8fe86b1f5b669bb714ecca Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-221-5/+5
|\| | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/quick/items/context2d/qquickcontext2d.cpp tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
| * Improve QtQuick Item Anchors documentation.Mitch Curtis2013-06-251-5/+5
| | | | | | | | | | Change-Id: Ib47051be82df16e5d08df50b5327aba8c004f4d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-241-38/+171
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * Doc fixes to the Positioners/Layouts documentationJan Arve Saether2013-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | * Add references to Qt Quick Layouts * Don't lie about that Positioners can resize the items * Rename title from "Item Layouts" to "Item Positioners" to avoid confusion with Qt Quick Layouts Change-Id: I43e3ad6e6d9e4b08a1233868c75f0efcab43f8c3 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Prevent tab focus from wrapping endlesslyLiang Qi2013-05-271-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there was no item that accepted focus, it would go into an endless loop. This also changes the default behavior of QQuickWindow. When there is not any activeFocusItem in the whole window, it means the contentItem got focused. The Tab/BackTab key will now focus the next item in the tab focus chain. Autotest is included. Done-with: Frederik Gladhorn <frederik.gladhorn@digia.com> Task-number: QTBUG-31344 Change-Id: I854292f89a327c493eec21969907c94aa9cfddcb Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Fix a warning when setActiveFocusOnTab(false) for root itemLiang Qi2013-05-171-1/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-31114 Change-Id: I4d6aac534fbc1e84593e4d7084e6a892eea4256c Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Mac: respect the system settings in Full Keyboard AccessLiang Qi2013-05-141-1/+40
| | | | | | | | | | | | | | Iterate all or not in nextPrevItemInTabFocusChain function. Change-Id: I95289b042f3d9924c28ffb9c8c7124c767addf2e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Revert "Mac: respect the system settings in Full Keyboard Access"Liang Qi2013-05-081-34/+1
| | | | | | | | | | | | | | | | | | This breaks Qt Quick Controls activeFocusOnTab autotests. This reverts commit 305616a60462b668c4d0b3d19302fa90469aceb5. Change-Id: Ided59ebe99659b23e950e8269ccaa8d7d44a4fdb Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * The resources property should be independent from QObjectThomas Hartmann2013-05-081-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resources was a direct mapping of the QObject children. This led to problems since the QObject children can also contain other objects from other sources like attached properties. This patch decouples resources from QObject properties and also does not call setParent() anymore. The special case for QQuickWindow in data_append does rely on the fact that QObject::setParent() is called and the inner window becomes a QObject::child of the content item. So we keep the setParent for this special case. The children property does not take QObject ownership either. QObject ownership is handled by the VME. None of the documented QML use cases should be touched by this change. This is a cleaner solution then the ad hoc fix provided by https://codereview.qt-project.org/#change,54677 I changed also the test. The list count now has to be exactly 4. Change-Id: I5c119e333ee82e888aaac1da559fd63a875d08ee Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Mac: respect the system settings in Full Keyboard AccessLiang Qi2013-05-081-1/+34
| | | | | | | | | | | | | | Iterate all or not in nextPrevItemInTabFocusChain function. Change-Id: I14d40dbeda01ca470efe23886789383ff1d30c0f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Remove from hover list on destructionAlan Alpert2013-05-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When hoverEnabled is unset the item remains in a hovered state until the mouse leaves. In this circumstance, the item could be destroyed without cleaning up the reference in the hovered items list. To catch this and similar circumstances, the item is removed from the list when destroyed, regardless of hoverEnabled status. Task-number: QTBUG-30962 Change-Id: I982ab8c9e1077fecc885fd166d70bbbbbe8fc179 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>