Slightly speed up playqueue searches.

This commit is contained in:
craig.p.drummond
2012-12-30 21:00:23 +00:00
parent e4726ae574
commit db2220937a
9 changed files with 41 additions and 30 deletions

View File

@@ -41,8 +41,8 @@ bool PlayQueueProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sou
return true;
}
Q_UNUSED(sourceParent)
return matchesFilter(static_cast<PlayQueueModel *>(sourceModel())->getSongByRow(sourceRow));
const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
return matchesFilter(*static_cast<Song *>(index.internalPointer()));
}
QMimeData *PlayQueueProxyModel::mimeData(const QModelIndexList &indexes) const