aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/codemodel/importscheck/005_compositeQmlCopyAndCpp/QtQuick/Controls/Private/StackView.js
blob: 682882d8466f6c41a023c31b3fd1b9292d7c45d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR LGPL-3.0

var stackView = [];

function push(p)
{
    if (!p)
        return
    stackView.push(p)
    __depth++
    return p
}

function pop()
{
    if (stackView.length === 0)
        return null
    var p = stackView.pop()
    __depth--
    return p
}

function current()
{
    if (stackView.length === 0)
        return null
    return stackView[stackView.length-1]
}