]> cloud.milkyroute.net Git - dolphin.git/commit
Only initialize the hash m_items in KFileItemModel if it is needed
authorFrank Reininghaus <frank78ac@googlemail.com>
Fri, 7 Feb 2014 09:22:17 +0000 (10:22 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Fri, 7 Feb 2014 09:22:17 +0000 (10:22 +0100)
commitbb22ac0a4745b63ac02d72d176b93bc3f2b84ca0
treeef31f8aac2d87e57bd855a0b49b63315ac9a6425
parent564dcb08fd0f6fe23d55bd8216af4e5295abf099
Only initialize the hash m_items in KFileItemModel if it is needed

Moreover, clear the entire hash if items are added or removed.

This saves time and memory when loading a directory, and it fixes
problems that might occur if the model is in an inconsistent state, such
as crashes that can happen when we try to remove individual items from
m_items.

BUG: 329494
FIXED-IN: 4.13.0
REVIEW: 115432
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kfileitemmodel.h