┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistselectionmanager.h
AgeCommit message (Collapse)Author
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-11-16Use URLs with transport encryptionYuri Chornoivan
2019-10-20Avoid emitting twice twice selectionChanged when keyboard changes the ↵Méven Car
selection, fix slotChangeCurrentItem Summary: In KItemListController::slotChangeCurrentItem searchFromNextItem use was bugged : The two branches of `if (searchFromNextItem)` both looked for the next keyboard with indexForKeyboardSearch(text, currentIndex (the first one with just a +1 modulo). But when searchFromNextItem is false, we are supposed to start to look for the next indexKeyboard from the start of the list `0`, not from the `currentIndex` Reviewers: elvisangelaccio, #dolphin Reviewed By: elvisangelaccio, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24505
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-02-03Fix all 'explicit constructor' krazy warningsElvis Angelaccio
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-11-20Modernize: Use override where possibleKevin Funk
Also use override instead of Q_DECL_OVERRIDE
2015-02-25Move the KVersionControlPlugin2 interface from konqlib to Dolphin and remove ↵Emmanuel Pescosta
the deprecated KVersionControlPlugin interface from konqlib REVIEW: 122687
2014-11-20Fix Exports.Andrius da Costa Ribas
REVIEW: 121078
2013-10-30Store the selected items in a more efficient wayFrank Reininghaus
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-01-14Select right item as current item (first item after the deletion) after ↵Emmanuel Pescosta
deleting files BUG: 290736 REVIEW: 108356 FIXED-IN: 4.10
2012-01-12Fix selection issue when expanding a treePeter Penz
The selection anchor must be reset when changing the current item to the root of the tree. BUG: 290832 FIXED-IN: 4.8.0
2011-12-30Fix inconsistency in selection managerPeter Penz
When a selection has been done with non-linear ranges, it was possible that the anchor item pointed to an invalid index that resulted into an invalid selection. As part of this fix the sorting for DolphinView::selectedItems() has been disabled (if the caller assumes a sorted selection he must manually adjust it). BUG: 288908 FIXED-IN: 4.8.0
2011-10-03Add function KItemListSelectionManager::isSelected(int index)Frank Reininghaus
This function is used in KItemListView::updateWidgetProperties() to find out if an item is selected in a more efficient way. The new function is tested in KItemListSelectionManagerTest. I've factored out some code from KItemListSelectionManagerTest::testChangeSelection() to a new member to simplify the test.
2011-09-29Keep current item and selection when resorting, part 1Frank Reininghaus
KFileItemModel now emits the itemsMoved signal when the model is resorted, and KItemListSelectionManager has a new function itemsMoved() which will be called indirectly when this signal is emitted. Unit tests for the new functionality are included. The following things are still needed to make the feature work: 1. KFileItemMdel::resortAllItems() should not emit itemsAdded/itemsRemoved any more. 2. KItemListView::itemsMoved() must update the view according to the changes in the model, and it must call KItemListSelectionManager::itemsMoved().
2011-08-27Remove unneded function KItemListSelectionManager::anchorItem()Frank Reininghaus
2011-08-26Simplify KItemListSelectionManagerFrank Reininghaus
1. The anchorChanged() signal is not needed. 2. The only place where setAnchorItem() is called is in beginAnchoredSelection() -> merge both functions.
2011-08-24Fix issues with the anchor selectionPeter Penz
Don't change the selection if the anchor is invalid. This fixes the issue that items might get selected during changing a directory.
2011-08-10Always use the 'Select' mode for anchored selectionsFrank Reininghaus
In Dolphin, we don't actually use the 'Deselect' and 'Toggle' modes for anchored selections, so we can just remove these modes and always use 'Select' to reduce code complexity.
2011-08-10Initial support for anchored selections in the selection managerFrank Reininghaus
2011-08-09Improvements for selections, smooth scrolling, tooltips and info-panelPeter Penz
2011-07-30Merged very early alpha-version of Dolphin 2.0Peter Penz
Dolphin 2.0 will get a new view-engine with the following improvements: - Better performance - Animated transitions - No clipped filenames due to dynamic item-sizes - Grouping support for all view-modes - Non-rectangular selection areas - Simplified code for better maintenance More details will be provided in a blog-entry during the next days. Please note that the code is in a very early alpha-stage and although the most tricky parts have been implemented already very basic things like drag and drop or selections have not been pushed yet. Those things are rather trivial to implement but this still will take some time.