dolphin/src/kitemviews
Frank Reininghaus fc2ab47898 Store the selected items in a more efficient way
Since Dolphin 2.0, we have stored the selected items in a QSet<int>,
which is neither space-efficient nor particularly fast when inserting
many items which are in a consecutive range.

This commit replaces the QSet<int> by a new class "KItemSet", which
stores the items in a sorted list of ranges. For each range, we only
store the first index and the length of the range, so we need a lot
less memory for most common selection patterns, and we also save quite
a few CPU cycles in many situations, because adding an item to the
KItemSet will in many cases not need a memory allocation at all, and
it's particularly easy when inserting sorted items into the KItemSet in
a row.

KItemSet contains a minimal subset of QSet's API which makes it
suitable as a drop-in replacement for our needs. It also has iterators,
such that the items can be iterated through easily, also with foreach.
One advantage of KItemSet compared to QSet<int> is that the items are
always iterated through in ascending order.

REVIEW: 113488
2013-10-30 23:22:23 +01:00
..
private Prevent storing some redundant data in KItemListViewLayouter 2013-10-30 17:40:23 +01:00
kfileitemlistview.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kfileitemlistview.h Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kfileitemlistwidget.cpp Try to avoid calling the model's data method if only "text" is needed 2013-09-04 21:37:01 +02:00
kfileitemlistwidget.h Try to avoid calling the model's data method if only "text" is needed 2013-09-04 21:37:01 +02:00
kfileitemmodel.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kfileitemmodel.h Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kfileitemmodelrolesupdater.cpp Count the items inside directories in another thread 2013-09-04 21:50:16 +02:00
kfileitemmodelrolesupdater.h Count the items inside directories in another thread 2013-09-04 21:50:16 +02:00
kitemlistcontainer.cpp Fix maximum value for scroll bar when deleting items in Details View 2013-07-25 22:25:18 +02:00
kitemlistcontainer.h Prepare view-engine for non-KFileItem usecase 2012-04-21 21:32:42 +02:00
kitemlistcontroller.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemlistcontroller.h Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemlistgroupheader.cpp Fix wrong text color in Places Group Header. Use QPalette::Window for base color and QPalette::WindowText for text color. Also changed m_roleColor color mixing to 60% (from 70%) -> Better visible color difference when base color is darker than text color. Also changed styleOption().palette.brush(group, role).color() to styleOption().palette.color(group, role) in KStandardItemListWidget -> should be more efficient. 2012-08-15 15:04:55 +02:00
kitemlistgroupheader.h Fix wrong text color in Places Group Header. Use QPalette::Window for base color and QPalette::WindowText for text color. Also changed m_roleColor color mixing to 60% (from 70%) -> Better visible color difference when base color is darker than text color. Also changed styleOption().palette.brush(group, role).color() to styleOption().palette.color(group, role) in KStandardItemListWidget -> should be more efficient. 2012-08-15 15:04:55 +02:00
kitemlistheader.cpp KItemViews: Internal directory restructuration 2012-04-11 16:08:32 +02:00
kitemlistheader.h Cleanup and minor fixes for column-handling 2012-03-24 23:47:42 +01:00
kitemlistselectionmanager.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemlistselectionmanager.h Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemliststyleoption.cpp Prepare view-engine for non-KFileItem usecase 2012-04-21 21:32:42 +02:00
kitemliststyleoption.h Allow to optionally limit the maximum number of text lines 2012-04-14 00:28:24 +02:00
kitemlistview.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemlistview.h Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemlistviewaccessible.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemlistviewaccessible.h Adding license header in kitemlistviewaccessible 2012-09-26 04:36:31 +05:30
kitemlistwidget.cpp Adjust the size and position of the selection toggle on icon 2013-08-24 21:00:26 +02:00
kitemlistwidget.h Enable basic drag and drop support for the Places Panel 2012-05-18 23:31:44 +02:00
kitemmodelbase.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemmodelbase.h Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemrange.h Move KItemRange to its own header 2013-09-17 00:11:42 +02:00
kitemset.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kitemset.h Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kstandarditem.cpp Fix several bookmark synchronization issues 2012-05-14 17:42:10 +02:00
kstandarditem.h Places Panel: Prepare code to save state of bookmarks 2012-05-13 21:45:59 +02:00
kstandarditemlistgroupheader.cpp Krazy fixes 2012-06-08 22:08:29 +02:00
kstandarditemlistgroupheader.h Provide additional default groups for the Places Panel 2012-04-24 23:18:34 +02:00
kstandarditemlistview.cpp Make sure that widgets are initialized when changing the view mode 2013-07-24 22:31:48 +02:00
kstandarditemlistview.h Make sure that widgets are initialized when changing the view mode 2013-07-24 22:31:48 +02:00
kstandarditemlistwidget.cpp Use the icon size from KItemListStyleOption for the width and height of the 2013-10-09 19:52:53 +02:00
kstandarditemlistwidget.h Try to avoid calling the model's data method if only "text" is needed 2013-09-04 21:37:01 +02:00
kstandarditemmodel.cpp Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00
kstandarditemmodel.h Store the selected items in a more efficient way 2013-10-30 23:22:23 +01:00