Bug 401812

Summary: Kirigami.DelegateRecycler in CardsGridView breaks model with roleNames
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Emmanuel Lepage Vallée <emmanuel.lepage>
Component: generalAssignee: Marco Martin <notmart>
Status: REPORTED ---    
Severity: normal CC: matej.starc, nate
Priority: NOR    
Version First Reported In: 5.52.0   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Emmanuel Lepage Vallée 2018-12-06 01:57:22 UTC
SUMMARY

Many "ReferenceError: propertyName is not defined" errors are printed.

STEPS TO REPRODUCE
1. Use CardsGridView with a model 
2. Create a delagte using roles other than display

OBSERVED RESULT

It does not work. Many "ReferenceError: propertyName is not defined" errors are printed.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: N/A
MacOS: N/A
Linux/KDE Plasma: Gentoo
(available in About System)
KDE Plasma Version: N/A
KDE Frameworks Version: 5.52
Qt Version: 5.11.2

ADDITIONAL INFORMATION

Removing `default property alias delegate: root._delegateComponent` from CardsGridView.qml fixes the problem
Comment 1 Emmanuel Lepage Vallée 2018-12-11 11:00:49 UTC
Apparently this can be mitigated using `model.roleName` instead of `roleName`. Still, it should be a drop-in replacement so it is still a bug.
Comment 2 Matej Starc 2022-09-24 16:09:52 UTC
Sadly, DelegateRecycler has to be used because ``ActionsToolBar`` has problems without using it. Try using CardsGridView without DelegateRecycler and try scrolling up and down really fast (you have to have a model of more than 50 items).