Avoid use of possibly uninitialized value in CategoryListWidgetDelegate

This commit is contained in:
Janek Bevendorff 2018-03-01 13:19:27 +01:00 committed by TheZ3ro
parent b0a61f437a
commit 8cd4d839aa

View File

@ -152,8 +152,9 @@ void CategoryListWidget::emitCategoryChanged(int index)
CategoryListWidgetDelegate::CategoryListWidgetDelegate(QListWidget* parent)
: QStyledItemDelegate(parent),
m_listWidget(parent),
m_size(minWidth(), 96)
m_size(96, 96)
{
m_size.setWidth(minWidth());
if (m_listWidget && m_listWidget->width() > m_size.width()) {
m_size.setWidth(m_listWidget->width());
}