]> cloud.milkyroute.net Git - dolphin.git/commitdiff
KItemListView fix valgrind issue "Conditional jump or move depends on uninitialised...
authorMarius P <nmariusp1@gmail.com>
Sun, 5 Jun 2022 04:36:01 +0000 (07:36 +0300)
committerMéven Car <meven.car@kdemail.net>
Tue, 7 Jun 2022 11:41:21 +0000 (11:41 +0000)
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.

src/kitemviews/kitemlistview.cpp

index cf590efce7e995b2f75f7396c43982f141ea4584..543be65182c8631d5e02a815eebea6f0e7f4f213 100644 (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),