From 70686007ce8c5f237e3319525682bbb85c99c49e Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 6 Aug 2020 11:33:18 +0200 Subject: Document that pop() does nothing if depth is less than or equal to 1 This note is already in the detailed description, but users looking at pop() can easily miss that. Pick-to: 5.15 5.12 Task-number: QTBUG-85903 Change-Id: I92c71c8d98b2a83aefbc99229e5b16a6fb33b937 Reviewed-by: Shawn Rutledge --- src/quicktemplates2/qquickstackview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp index 83f99843..7bf4c3d3 100644 --- a/src/quicktemplates2/qquickstackview.cpp +++ b/src/quicktemplates2/qquickstackview.cpp @@ -635,6 +635,9 @@ void QQuickStackView::push(QQmlV4Function *args) items down to (but not including) the first item is popped. If not specified, only the current item is popped. + \note A pop() operation on a stack with depth 1 or 0 does nothing. In such + cases, the stack can be emptied using the \l clear() method. + \include qquickstackview.qdocinc pop-ownership An \a operation can be optionally specified as the last argument. Supported -- cgit v1.2.3