Set object names

This commit is contained in:
Jonas Kvinge
2024-09-02 22:26:36 +02:00
parent f265c055a5
commit 2a9ccd7480
20 changed files with 54 additions and 4 deletions

View File

@@ -101,6 +101,8 @@ CollectionModel::CollectionModel(SharedPtr<CollectionBackend> backend, Applicati
total_album_count_(0),
loading_(false) {
setObjectName(backend_->source() == Song::Source::Collection ? QLatin1String(metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(backend_->source()), QLatin1String(metaObject()->className())));
filter_->setSourceModel(this);
filter_->setSortRole(Role_SortText);
filter_->sort(0);
@@ -149,7 +151,7 @@ CollectionModel::CollectionModel(SharedPtr<CollectionBackend> backend, Applicati
CollectionModel::~CollectionModel() {
qLog(Debug) << "Collection model" << this << "for" << Song::TextForSource(backend_->source()) << "deleted";
qLog(Debug) << "Collection model" << this << "deleted";
beginResetModel();
Clear();