Changeset View
Changeset View
Standalone View
Standalone View
src/browsers/SingleCollectionTreeItemModel.cpp
Show All 28 Lines | |||||
29 | 29 | | |||
30 | #include <KLocale> | 30 | #include <KLocale> | ||
31 | 31 | | |||
32 | SingleCollectionTreeItemModel::SingleCollectionTreeItemModel( Collections::Collection *collection, | 32 | SingleCollectionTreeItemModel::SingleCollectionTreeItemModel( Collections::Collection *collection, | ||
33 | const QList<CategoryId::CatMenuId> &levelType ) | 33 | const QList<CategoryId::CatMenuId> &levelType ) | ||
34 | : m_collection( collection ) | 34 | : m_collection( collection ) | ||
35 | { | 35 | { | ||
36 | m_rootItem = new CollectionTreeItem( m_collection, 0, this ); | 36 | m_rootItem = new CollectionTreeItem( m_collection, 0, this ); | ||
37 | connect( collection, SIGNAL(updated()), this, SLOT(slotFilter()) ) ; | 37 | connect( collection, &Collections::Collection::updated, this, &SingleCollectionTreeItemModel::slotFilterWithoutAutoExpand ) ; | ||
38 | m_collections.insert( m_collection->collectionId(), CollectionRoot( m_collection, m_rootItem ) ); | 38 | m_collections.insert( m_collection->collectionId(), CollectionRoot( m_collection, m_rootItem ) ); | ||
39 | //we only have one collection that, by its very nature, is always expanded | 39 | //we only have one collection that, by its very nature, is always expanded | ||
40 | m_expandedCollections.insert( m_collection ); | 40 | m_expandedCollections.insert( m_collection ); | ||
41 | 41 | | |||
42 | setLevels( levelType ); | 42 | setLevels( levelType ); | ||
43 | } | 43 | } | ||
44 | 44 | | |||
45 | QVariant | 45 | QVariant | ||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |