From fce323b945d5e8365c64c61e3ba592cb2b7446c4 Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Sun, 13 Nov 2022 14:35:55 +0000 Subject: Check parent in rowCount/columnCount/canFetchMore Signed-off-by: TheLastRar --- launcher/meta/Index.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'launcher/meta/Index.cpp') diff --git a/launcher/meta/Index.cpp b/launcher/meta/Index.cpp index eec1b329..242aad9f 100644 --- a/launcher/meta/Index.cpp +++ b/launcher/meta/Index.cpp @@ -58,11 +58,11 @@ QVariant Index::data(const QModelIndex &index, int role) const } int Index::rowCount(const QModelIndex &parent) const { - return m_lists.size(); + return parent.isValid() ? 0 : m_lists.size(); } int Index::columnCount(const QModelIndex &parent) const { - return 1; + return parent.isValid() ? 0 : 1; } QVariant Index::headerData(int section, Qt::Orientation orientation, int role) const { -- cgit