diff options
Diffstat (limited to 'tests/auto/quick/qquickpathview/data')
10 files changed, 147 insertions, 6 deletions
diff --git a/tests/auto/quick/qquickpathview/data/flickableDelegate.qml b/tests/auto/quick/qquickpathview/data/flickableDelegate.qml index 3243dc23dc..0cb42dcf86 100644 --- a/tests/auto/quick/qquickpathview/data/flickableDelegate.qml +++ b/tests/auto/quick/qquickpathview/data/flickableDelegate.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick 2.0 diff --git a/tests/auto/quick/qquickpathview/data/mousePressAfterFlick.qml b/tests/auto/quick/qquickpathview/data/mousePressAfterFlick.qml new file mode 100644 index 0000000000..a30234127b --- /dev/null +++ b/tests/auto/quick/qquickpathview/data/mousePressAfterFlick.qml @@ -0,0 +1,61 @@ +import QtQuick + +Item { + id: root + width: 360 + height: 900 + + MouseArea { + id: rootMouseArea + objectName: "rootMouseArea" + anchors.fill: parent + } + + PathView { + id: pathView + objectName: "pathView" + anchors.centerIn: parent + width: 150 + height: parent.height + dragMargin: Number.POSITIVE_INFINITY + + preferredHighlightBegin: 0.5 + preferredHighlightEnd: 0.5 + pathItemCount: 9 + + Item { + anchors.fill: parent + } + + model: 10 + + delegate: Rectangle { + id: delegate + width: parent.width + height: 120 + color: "red" + Text { + anchors.fill: parent + horizontalAlignment: Qt.AlignHCenter + text: "Path element " + modelData + } + } + + path: Path { + id: path + property int width: pathView.width + startX: path.width / 2 + startY: 0 + + PathCurve { + x: path.width / 2 + relativeY: 32 + } + PathCurve { + x: path.width / 2 + relativeY: pathView.height - 32 + } + } + } +} + diff --git a/tests/auto/quick/qquickpathview/data/nestedInFlickable.qml b/tests/auto/quick/qquickpathview/data/nestedInFlickable.qml index 36938d69b5..35f5b12d17 100644 --- a/tests/auto/quick/qquickpathview/data/nestedInFlickable.qml +++ b/tests/auto/quick/qquickpathview/data/nestedInFlickable.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick 2.0 diff --git a/tests/auto/quick/qquickpathview/data/nestedmousearea2.qml b/tests/auto/quick/qquickpathview/data/nestedmousearea2.qml index 5fa50ec3c1..985b53cd45 100644 --- a/tests/auto/quick/qquickpathview/data/nestedmousearea2.qml +++ b/tests/auto/quick/qquickpathview/data/nestedmousearea2.qml @@ -1,5 +1,5 @@ // Copyright (C) 2019 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick 2.0 diff --git a/tests/auto/quick/qquickpathview/data/objectModelMove.qml b/tests/auto/quick/qquickpathview/data/objectModelMove.qml index 7e87330b23..04102d0956 100644 --- a/tests/auto/quick/qquickpathview/data/objectModelMove.qml +++ b/tests/auto/quick/qquickpathview/data/objectModelMove.qml @@ -1,5 +1,5 @@ // Copyright (C) 2018 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQml.Models 2.11 import QtQuick 2.11 diff --git a/tests/auto/quick/qquickpathview/data/overcached.qml b/tests/auto/quick/qquickpathview/data/overcached.qml new file mode 100644 index 0000000000..734b0cd7cf --- /dev/null +++ b/tests/auto/quick/qquickpathview/data/overcached.qml @@ -0,0 +1,27 @@ +import QtQuick 2.0 + +PathView { + id: view + property int delegatesCreated: 0 + property int delegatesDestroyed: 0 + + anchors.fill: parent + preferredHighlightBegin: 0.5 + preferredHighlightEnd: 0.5 + pathItemCount: 10 + interactive: true + model: 15 + // Much bigger cache than model - pathItemCount + cacheItemCount: 100 + delegate: Text { + text: modelData + Component.onCompleted: view.delegatesCreated++; + Component.onDestruction: view.delegatesDestroyed++; + } + path: Path { + PathLine { + x: 0 + y: 400 + } + } +} diff --git a/tests/auto/quick/qquickpathview/data/qtbug37815.qml b/tests/auto/quick/qquickpathview/data/qtbug37815.qml index ea12daec87..8854164b5c 100644 --- a/tests/auto/quick/qquickpathview/data/qtbug37815.qml +++ b/tests/auto/quick/qquickpathview/data/qtbug37815.qml @@ -1,5 +1,5 @@ // Copyright (C) 2016 Netris -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick 2.0 diff --git a/tests/auto/quick/qquickpathview/data/qtbug46487.qml b/tests/auto/quick/qquickpathview/data/qtbug46487.qml new file mode 100644 index 0000000000..840d77ffe4 --- /dev/null +++ b/tests/auto/quick/qquickpathview/data/qtbug46487.qml @@ -0,0 +1,28 @@ +import QtQuick 2.0 + +PathView { + id: view + property int delegatesCreated: 0 + property int delegatesDestroyed: 0 + + width: 400 + height: 400 + preferredHighlightBegin: 0.5 + preferredHighlightEnd: 0.5 + pathItemCount: 5 + currentIndex: 1 + model: customModel + delegate: Text { + text: "item: " + index + " of: " + view.count + Component.onCompleted: view.delegatesCreated++; + Component.onDestruction: view.delegatesDestroyed++; + } + path: Path { + startX: 50 + startY: 0 + PathLine { + x: 50 + y: 400 + } + } +} diff --git a/tests/auto/quick/qquickpathview/data/qtbug53464.qml b/tests/auto/quick/qquickpathview/data/qtbug53464.qml index a2855c0fb5..df16763ccb 100644 --- a/tests/auto/quick/qquickpathview/data/qtbug53464.qml +++ b/tests/auto/quick/qquickpathview/data/qtbug53464.qml @@ -1,5 +1,5 @@ // Copyright (C) 2016 Netris -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick 2.0 diff --git a/tests/auto/quick/qquickpathview/data/qtbug90479.qml b/tests/auto/quick/qquickpathview/data/qtbug90479.qml new file mode 100644 index 0000000000..bfa4ab8243 --- /dev/null +++ b/tests/auto/quick/qquickpathview/data/qtbug90479.qml @@ -0,0 +1,25 @@ +import QtQuick 2.0 + +PathView { + id: view + property int delegatesCreated: 0 + property int delegatesDestroyed: 0 + + anchors.fill: parent + preferredHighlightBegin: 0.5 + preferredHighlightEnd: 0.5 + pathItemCount: 6 + interactive: true + model: 19 + delegate: Text { + text: modelData + Component.onCompleted: view.delegatesCreated++; + Component.onDestruction: view.delegatesDestroyed++; + } + path: Path { + PathLine { + x: 0 + y: 400 + } + } +} |