qt5base-lts/tests/auto/widgets/itemviews
Volker Hilsheimer fb8701cb8b QListView: Prevent infinite loop when wrapping text of item with null-icon
If an item in a list view has a null icon, then the decorationSize gets
calculated as -1, -1. The style would then try to wrap the text to a
lineWidth of -1, ending up in an infinite loop in viewItemTextLayout.

To prevent that, don't set the HasDecoration flag of the style option
when the icon is null, and don't fall back ot the decorationSize unless
the flag is set.

Add a test for this particular item configuration. This also fixes the
widget baseline test with styles that don't provide all standard icons.

Pick-to: 6.5
Change-Id: I691db6abede9a9b2ad300f3ee7fbfdae5fb6097f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2023-01-04 13:42:06 +01:00
..
qabstractitemview Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qcolumnview Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qdatawidgetmapper Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qfileiconprovider Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qheaderview QHeaderView test: Remove unused variables 2022-12-12 20:10:11 +01:00
qitemdelegate Adapt to QTimeZone replacing Qt::TimeSpec usage 2022-12-10 06:39:44 +01:00
qitemeditorfactory Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qitemview Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qlistview QListView: Prevent infinite loop when wrapping text of item with null-icon 2023-01-04 13:42:06 +01:00
qlistwidget Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtableview Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtablewidget Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtreeview Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtreewidget Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtreewidgetitemiterator Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00