mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Fix detaching
This commit is contained in:
parent
763933977b
commit
6f3b0e3d00
|
@ -600,7 +600,8 @@ void PlacesItemModel::onSourceModelDataChanged(const QModelIndex &topLeft, const
|
|||
|
||||
void PlacesItemModel::onSourceModelGroupHiddenChanged(KFilePlacesModel::GroupType group, bool hidden)
|
||||
{
|
||||
for(const QModelIndex &sourceIndex : m_sourceModel->groupIndexes(group)) {
|
||||
const auto groupIndexes = m_sourceModel->groupIndexes(group);
|
||||
for (const QModelIndex &sourceIndex : groupIndexes) {
|
||||
PlacesItem *item = placesItem(mapFromSource(sourceIndex));
|
||||
if (item) {
|
||||
item->setGroupHidden(hidden);
|
||||
|
|
|
@ -228,7 +228,8 @@ void PlacesItemModelTest::init()
|
|||
|
||||
void PlacesItemModelTest::cleanup()
|
||||
{
|
||||
for (int i : m_tobeRemoved) {
|
||||
const auto tobeRemoved = m_tobeRemoved;
|
||||
for (const int i : tobeRemoved) {
|
||||
int before = m_model->count();
|
||||
m_model->deleteItem(i);
|
||||
QTRY_COMPARE(m_model->count(), before - 1);
|
||||
|
|
Loading…
Reference in a new issue