KItemListView fix valgrind issue "Conditional jump or move depends on uninitialised value"

KItemListView::setAlternateBackgrounds(bool) (kitemlistview.cpp:489)
In C++, a data member of an object is not automatically initialized to "zero".
In this case a bool had random values such as the integer 255.
This commit is contained in:
Marius P 2022-06-05 07:36:01 +03:00 committed by Méven Car
parent e406bc197f
commit 8113af62c4

View file

@ -63,6 +63,8 @@ KItemListView::KItemListView(QGraphicsWidget* parent) :
QGraphicsWidget(parent),
m_enabledSelectionToggles(false),
m_grouped(false),
m_highlightEntireRow(false),
m_alternateBackgrounds(false),
m_supportsItemExpanding(false),
m_editingRole(false),
m_activeTransactions(0),
@ -77,6 +79,7 @@ KItemListView::KItemListView(QGraphicsWidget* parent) :
m_visibleItems(),
m_visibleGroups(),
m_visibleCells(),
m_scrollBarExtent(0),
m_layouter(nullptr),
m_animation(nullptr),
m_oldScrollOffset(0),