Bug 401812 - Kirigami.DelegateRecycler in CardsGridView breaks model with roleNames
Summary: Kirigami.DelegateRecycler in CardsGridView breaks model with roleNames
Status: REPORTED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.52.0
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-06 01:57 UTC by Emmanuel Lepage Vallée
Modified: 2022-09-24 16:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).