aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickstackview_p.cpp
Commit message (Collapse)AuthorAgeFilesLines
* StackView: resolve relative URLs to the callerJ-P Nurmi2017-04-041-4/+13
| | | | | | Task-number: QTBUG-59309 Change-Id: I3c19d55431dd4831c4510acb5ef0e9fffa8f478f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* StackView: provide better warnings and errorsJ-P Nurmi2017-03-241-6/+12
| | | | | | | | | Check for valid URLs and test object types. Throw warnings when appropriate instead of crashing later. Task-number: QTBUG-59634 Change-Id: Ia269dc8afd31b618f1ff7aec94d684029cb78244 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickStackViewPrivate::warn() helperJ-P Nurmi2017-03-241-0/+10
| | | | | | | | | Store the current operation name internally to allow throwing informative warnings when component creation fails. Task-number: QTBUG-59634 Change-Id: I7506c5eb4be35878c8abd73a637357e0d8ae08a2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix QQuickStackViewPrivate::startTransition()J-P Nurmi2017-02-241-2/+2
| | | | | | | | | | | | This seems like a mistake that slipped in when popTransition(), pushTransition() and replaceTransition() were merged in acecb06. Only immediate push/pop/replace operations were affected, where the animations were force-completed by hand. In this scenario it was always passing the pop transitions for completion, even if the current operation was push or replace. Change-Id: I6a940953feaefe6643ddae26c070856a66bf6c10 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickStackView: fix pop/replace exit leakJ-P Nurmi2017-02-241-3/+5
| | | | | | | | | | | | | | QQuickStackView did not keep track of the element that was exiting the view during a pop/replace exit transition, but it was expecting viewItemTransitionFinished() to be called and cleaned up the element there. If a pop/replace exit transition was running at the destruction time, QQuickStackView did not clean up the element at all (because it had been already removed from the internal stack of elements) and thus the transition was left running. Task-number: QTBUG-59034 Change-Id: I3cd7c761fab79574b9a7cc849788f36765def45b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Format initializer listsJ-P Nurmi2017-01-191-1/+4
| | | | | | | | Initialize one member per line. Allow empty constructors with one initialized member on a single line. Change-Id: Ie115802561ebd19efd4dacda1fa868b64d279109 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add attached StackView.visible propertyJ-P Nurmi2017-01-121-5/+5
| | | | | | | | | | [ChangeLog][Controls][StackView] Added attached StackView.visible property that can be used to control whether items below the top- most item are kept visible. Task-number: QTBUG-56801 Change-Id: Ieead0d476f254886cff5f8457bb5c5d23cb7de8a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | qquickstackview_p.cpp: use correct includeLiang Qi2016-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | qv4script_p.h is a temporary solution for qv4qmlcontext_p.h when qt5 meta repo doesn't have it. This amends ad20f3fc804d5aac9b727ce1ceda429264087218. Change-Id: I1d22ee63074842937bc7f72bca18a73e61964bb9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | qquickstackview_p.cpp: add missing includeJ-P Nurmi2016-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | The actual header that should be included is qv4qmlcontext_p.h, but this is a new header in qtdeclarative that is not yet available in qt5 meta repo. Therefore we temporarily include another header to get an indirect include of qv4qmlcontext_p.h to fix the build break and get qt5 integrated. Change-Id: If12e5d7652a9710420f08fe4c6bff364f65656a4 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Move QQuickStackTransition into its own filesJ-P Nurmi2016-10-271-115/+1
| | | | | | | | | | Change-Id: I87fdef1c2cc5bb2b04c38b54cca316ace8814f2c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Move QQuickStackElement into its own filesJ-P Nurmi2016-10-271-249/+1
|/ | | | | Change-Id: I4fce147f125d4641e1eb3a6534f57d68000dbfc7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-031-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/qtquickcontrols2plugin.cpp src/quicktemplates2/qquicktooltip.cpp src/quicktemplates2/qquicktooltip_p.h src/quicktemplates2/qquicktumbler.cpp tests/auto/controls/data/tst_spinbox.qml tests/auto/controls/data/tst_tumbler.qml tests/auto/qquickmaterialstyle/data/tst_material.qml Change-Id: I25b7473b47739043b6f768603bece30b18021318
| * StackView: allow loading remote URLsJ-P Nurmi2016-10-031-0/+10
| | | | | | | | | | | | Task-number: QTBUG-55749 Change-Id: I369e0113492547f312c8f1b540f5faa506a75a25 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-261-12/+10
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc src/quicktemplates2/qquickstackview_p.cpp src/quicktemplates2/qquickstackview_p_p.h tests/auto/controls/data/tst_stackview.qml Change-Id: If451fe0e5653572d305b4de90a6d5cb878463e8d
| * Fix a crash in StackView::pop()J-P Nurmi2016-09-261-34/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an item is still activating (from a previous pop) when it gets already popped out, we must not set the deactivating status before calling prepareTransition(). This method cancels and finishes the ongoing activation transition, and if the status says that the item was deactivating, the item gets destroyed in the middle of preparing for the deactivation transition. Let prepareTransition() cancel any ongoing transition first, and then set the status after the preparation. The cleanest way is to pass the target status to startTransition() and completeTransition(). Task-number: QTBUG-56158 Change-Id: Id52752200b650ea9f84659bbf43431f8a8b22f1e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | StackView: add removed() attached signalMitch Curtis2016-09-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This provides an opportunity for users to destroy items that StackView doesn't, like objects that are pushed as Items. [ChangeLog][Controls][StackView] Added StackView.removed() attached signal to provide a way to delete items that StackView won't. Task-number: QTBUG-55405 Change-Id: I59096efaf1a95d36451fbf1f46b8f68ee96c20de Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-201-0/+1
|\| | | | | | | Change-Id: Idf19dd882ba3015be2afda6988cac1e95a4912fa
| * QQuickStackView: claim QObject ownership for dynamically created itemsJ-P Nurmi2016-07-181-0/+1
| | | | | | | | | | | | Change-Id: I08030cab226c3e1f602e922fa1cad0a260e0c0ad Task-number: QTBUG-54552 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | StackView: allow choosing which transition to runJ-P Nurmi2016-07-141-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly useful for being able to use either push or pop transition for replace operations, but there doesn't seem to be any reason to limit the others. So, now it's able to run any of the push/pop/replace transitions (or none with "immediate") for any push/pop/replace operation. [ChangeLog][StackView] Made it possible to choose the visual transition type for any operation. This allows using for example push and pop transitions with replace(), which allows implementing an "infinite" back and forward navigation pattern while keeping the amount of instantiated items constant. Change-Id: I93b87cf854c3d6e2f33ef73ef25ffb3456ec27f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Refactor QQuickStackView transition startupJ-P Nurmi2016-07-141-83/+93
| | | | | | | | | | | | | | | | | | | | | | | | Merge the separate but very similar looking popTransition(), pushTransition(), and replaceTransition() methods to a single startTransition() method, and pass the necessary arguments in a QQuickStackTransition structure. This is an enabler step for being able to specify the desired transition type for replace (and push & pop, for that matter) operations. Change-Id: Ia68bb94dc9280aace8718f4df0e798a7f1469e78 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Make use of QQmlComponentPrivate::setInitialProperties()J-P Nurmi2016-06-171-8/+6
| | | | | | | | | | | | | | | | | | It is no longer necessary to create a useless QQmlComponent instance just to be able to call initializeObjectWithInitialProperties(). We can now use the static setInitialProperties() instead. Change-Id: I3e1f981adfb04a0aa38642a17aeb19388b9fada1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQuickStackView: allocate incubators on the stackJ-P Nurmi2016-06-101-5/+3
| | | | | | | | | | | | | | | | | | | | Don't keep unnecessary incubator instances alive for all loaded stack elements. Just allocate it on the stack and let it go out of scope. We only use incubators to synchronously to initialize properties during construction. Change-Id: Ide56435ec9c640b9e49356f01476e36120dff5d7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | StackView: add attached activated() etc. signalsJ-P Nurmi2016-06-061-2/+22
|/ | | | | | | | | | | | For initializing and cleaning up item-specific resources, these are much more convenient than a StackView.onStatusChanged handler. [ChangeLog][StackView] Added attached activated(), deactivated(), activating(), and deactivating() signals that are convenient for initializing and cleaning up item-specific resources. Change-Id: If8df45b31a14cd2491db2c87eeb1c071af4e695f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickStackView: fix buildLiang Qi2016-05-211-0/+1
| | | | | | | Added some includes because the private header cleanup in qtdeclarative. Change-Id: Ic7580377c7c38966ba51bc08f1f6c37dc8c7616c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickStackView: fix buildLiang Qi2016-05-201-1/+3
| | | | | | | error: no matching function for call to 'QQmlComponentPrivate::initializeObjectWithInitialProperties(QV4::ScopedValue&, QQuickItem*&)' Change-Id: Ied1bd7b73b60c69c73e42b82209f10f2448ce7b0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* StackView: reset size of the content without explicit one on pop()Nikita Krupenko2016-05-181-0/+4
| | | | | | | | | This allows for item to be properly risezed by StackView when it'd be pushed onto stack again. Task-number: QTBUG-53067 Change-Id: I911026022a987ed5632ae5411d63221d743a6aca Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Templates: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | This file is part of the Qt Quick Templates 2 module of the Qt Toolkit. Change-Id: I39ef9cbb00f55a32b7a43f11ffbdfbb40b84e124 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-131-0/+549
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>