18 disconnect(sourceModel, &QAbstractItemModel::dataChanged,
19 this, &BookmarkFilterModel::changed);
20 disconnect(sourceModel, &QAbstractItemModel::rowsInserted,
21 this, &BookmarkFilterModel::rowsInserted);
22 disconnect(sourceModel, &QAbstractItemModel::rowsAboutToBeRemoved,
23 this, &BookmarkFilterModel::rowsAboutToBeRemoved);
24 disconnect(sourceModel, &QAbstractItemModel::rowsRemoved,
25 this, &BookmarkFilterModel::rowsRemoved);
26 disconnect(sourceModel, &QAbstractItemModel::layoutAboutToBeChanged,
27 this, &BookmarkFilterModel::layoutAboutToBeChanged);
28 disconnect(sourceModel, &QAbstractItemModel::layoutChanged,
29 this, &BookmarkFilterModel::layoutChanged);
30 disconnect(sourceModel, &QAbstractItemModel::modelAboutToBeReset,
31 this, &BookmarkFilterModel::modelAboutToBeReset);
32 disconnect(sourceModel, &QAbstractItemModel::modelReset,
33 this, &BookmarkFilterModel::modelReset);
37 QAbstractProxyModel::setSourceModel(sourceModel);
40 connect(sourceModel, &QAbstractItemModel::dataChanged,
41 this, &BookmarkFilterModel::changed);
42 connect(sourceModel, &QAbstractItemModel::rowsInserted,
43 this, &BookmarkFilterModel::rowsInserted);
44 connect(sourceModel, &QAbstractItemModel::rowsAboutToBeRemoved,
45 this, &BookmarkFilterModel::rowsAboutToBeRemoved);
46 connect(sourceModel, &QAbstractItemModel::rowsRemoved,
47 this, &BookmarkFilterModel::rowsRemoved);
48 connect(sourceModel, &QAbstractItemModel::layoutAboutToBeChanged,
49 this, &BookmarkFilterModel::layoutAboutToBeChanged);
50 connect(sourceModel, &QAbstractItemModel::layoutChanged,
51 this, &BookmarkFilterModel::layoutChanged);
52 connect(sourceModel, &QAbstractItemModel::modelAboutToBeReset,
53 this, &BookmarkFilterModel::modelAboutToBeReset);
54 connect(sourceModel, &QAbstractItemModel::modelReset,
55 this, &BookmarkFilterModel::modelReset);
57 setupCache(sourceModel->index(0, 0, QModelIndex()).parent());