Skip to content
Snippets Groups Projects
Commit 35ec60b5 authored by Benjamin Arnaud's avatar Benjamin Arnaud Committed by Hugo Beauzée-Luyssen
Browse files

qml: Use 'var' for properties altered by StackView.replace()


When calling StackView.replace() together with custom properties we have to provide
generic types (var, int, string). Otherwise we get 'casting' issues when using
a specific one (like MLItemId). This was causing invalid values to be restored
when navigating between the QML MediaLibrary views.

fix #26629

Co-authored-by: default avatarPrince Gupta <guptaprince8832@gmail.com>
parent b40b0f5f
No related branches found
No related tags found
Loading
Pipeline #192971 passed with stages
in 31 minutes and 54 seconds
......@@ -30,9 +30,10 @@ VideoAll {
// Properties
property int initialIndex: 0
property MLItemId initialId
property string initialTitle
// NOTE: We need 'var' for properties altered by StackView.replace().
property int initialIndex: 0
property var initialId
property string initialTitle
// Aliases
......
......@@ -38,9 +38,10 @@ FocusScope {
readonly property int currentIndex: view.currentIndex
property int initialIndex: 0
property MLItemId initialId
property string initialName
// NOTE: We need 'var' for properties altered by StackView.replace().
property int initialIndex: 0
property var initialId
property string initialName
// NOTE: Specify an optional header for the view.
property Component header: undefined
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment