Return the correct row count for playqueue items - i.e. none! This is the REAL fix for the slow playqueue searches!

This commit is contained in:
craig.p.drummond
2013-05-01 07:01:57 +00:00
committed by craig.p.drummond
parent 6b09145999
commit c6c8047f26
2 changed files with 2 additions and 3 deletions

View File

@@ -172,9 +172,9 @@ QVariant PlayQueueModel::headerData(int section, Qt::Orientation orientation, in
return QVariant();
}
int PlayQueueModel::rowCount(const QModelIndex &) const
int PlayQueueModel::rowCount(const QModelIndex &idx) const
{
return songs.size();
return idx.isValid() ? 0 : songs.size();
}
int PlayQueueModel::columnCount(const QModelIndex &) const

View File

@@ -41,7 +41,6 @@ bool PlayQueueProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sou
return true;
}
// Why is this sometimes called with a parent row???
if (-1!=sourceParent.row()) {
return false;
}