Skip to content

Commit 3fc8dca

Browse files
committed
qtui: Fix infinite loop in QTreeView::expandRecursively ('*' key).
1 parent bc3b551 commit 3fc8dca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/qtui/playlist_model.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ PlaylistModel::PlaylistModel(QObject * parent, Playlist playlist)
5454
{
5555
}
5656

57-
int PlaylistModel::rowCount(const QModelIndex & parent) const { return m_rows; }
57+
int PlaylistModel::rowCount(const QModelIndex & parent) const
58+
{
59+
return (parent == QModelIndex()) ? m_rows : 0;
60+
}
5861

5962
int PlaylistModel::columnCount(const QModelIndex & parent) const
6063
{

0 commit comments

Comments
 (0)