mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-14 18:35:16 +01:00
Don't lazy populate all the children of library items
This commit is contained in:
parent
a49f5506ac
commit
b4c7b92fac
1
TODO
1
TODO
@ -5,7 +5,6 @@
|
||||
- Copy to library, move to library
|
||||
- Edit tags in the playlist
|
||||
- Global shortcut keys
|
||||
- Make QSortFilterProxyModel on the library obey hasChildren()
|
||||
- Database versioning
|
||||
- Clicking play plays selected item
|
||||
|
||||
|
@ -502,3 +502,11 @@ void Library::SetFilterText(const QString& text) {
|
||||
query_options_.filter = text;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool Library::canFetchMore(const QModelIndex &parent) const {
|
||||
if (!parent.isValid())
|
||||
return false;
|
||||
|
||||
LibraryItem* item = IndexToItem(parent);
|
||||
return !item->lazy_loaded;
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ class Library : public SimpleTreeModel<LibraryItem> {
|
||||
Qt::ItemFlags flags(const QModelIndex& index) const;
|
||||
QStringList mimeTypes() const;
|
||||
QMimeData* mimeData(const QModelIndexList& indexes) const;
|
||||
bool canFetchMore(const QModelIndex &parent) const;
|
||||
|
||||
signals:
|
||||
void Error(const QString& message);
|
||||
|
Loading…
Reference in New Issue
Block a user