| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch extends the work done in aaec25a7 to cover all operations.
Note also that b94889f4 does a similar thing to this patch and
aaec25a7, in that it explicitly ignores operations that are done during
the removal of elements.
Fixes: QTBUG-84381
Pick-to: 5.15
Change-Id: Id8bbbded39d8e58bcf0e8eedeb2dde794952333f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
| |
Pick-to: 5.15
Change-Id: I29af6f91ed90395ce3fdb92081d54a17f16d58e0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
Fix build after internal QtQml API changes.
Change-Id: Iaeafb84f5f2d9c60b54659f27e7baa448a858c4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can happen when e.g. calling clear() in Component.onDestruction
in response to a pop() call.
The patch fixes the crash by warning and returning early.
If users really need to do this, the clear() call can be delayed:
Component.onDestruction: {
Qt.callLater(function() { stackView.clear(StackView.Immediate) })
}
Change-Id: If3cf07495bb34b96089522f44c36976bd6c62492
Fixes: QTBUG-80353
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
| |
We use QStack below.
Change-Id: Ife39904e4e075a9ca5d79a529ca7abd3e3c74fce
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The code is more readable and less error-prone (this patch caught a few
uninitialized members) when the members are initialized in the same
place where they are declared. In many cases, empty default destructors
can be entirely removed, and we get faster implicitly declared inline
default constructors defined by the compiler.
Change-Id: I14c5448afc901f9b2ac5965f28c1c26c0b646c08
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following binding
initialView: Qt.createComponent("blah.qml")
works with QQC1 but crashes with QQC2 as soon as the garbage collector
kicks in. In QQC1 StackView was implemented in a .qml file and the
property was declared as
property var initialItem
For such declared properties the QML engine takes care of ensuring that
the reference assigned is a strong reference towards the GC and it also
tracks the life-time of the QObject in case it's explicitly deleted by
somebody else.
In QQC2 the property continues to be documented as "var" property,
however it is implemented in C++ as QVariant property. The QVariant is
not known to the GC at all and it also doesn't do life-cycle tracking.
The C++ equivalent to "var" in QML is QJSValue, which is a strong
reference and also ends up using a QPointer internally when holding a
QObject.
Task-number: QTBUG-67118
Change-Id: I43e473c7bf2c40f9843e9d50fe4fd805b54fd256
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
Don't emit emptyChanged() when popping down to 1 element.
Change-Id: Iff1e29567d1d6171cea0f158955325389c03800c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
"stack.empty" looks cleaner in bindings than "stack.depth === 0"
Change-Id: Ia99ea8ff2a8cf76a752917c239874d24d2103312
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-59309
Change-Id: I3c19d55431dd4831c4510acb5ef0e9fffa8f478f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
[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>
|
|\
| |
| |
| | |
Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
|
| |
| |
| |
| |
| | |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In QQC1 the attached property was called "Stack", purely because we
couldn't have both QML and C++ types with the same name. Now the
attached properties are provided by StackView itself, so this is the
correct name.
Change-Id: I0f98d73735cff14c444a9e843b7cb56dc8a45cd8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I87fdef1c2cc5bb2b04c38b54cca316ace8814f2c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|/
|
|
|
| |
Change-Id: I4fce147f125d4641e1eb3a6534f57d68000dbfc7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
error: no matching function for call to 'QQmlComponentPrivate::initializeObjectWithInitialProperties(QV4::ScopedValue&, QQuickItem*&)'
Change-Id: Ied1bd7b73b60c69c73e42b82209f10f2448ce7b0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
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>
|
|
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|