┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.cpp
AgeCommit message (Collapse)Author
2013-08-14Fix crash when disabling "Show in groups"Frank Reininghaus
The problem was that items are removed from m_visibleGroups while a QMutableHashIterator iterates over this hash, such that the iterator can become invalid. The solution is to use a QHashIterator instead, which takes a copy of the hash. Therefore, it is not affected if m_visibleGroups is modified in any way. BUG: 323248 FIXED-IN: 4.11.1 REVIEW: 111919
2013-08-04Introduce a new signal "groupsChanged"Frank Reininghaus
Sometimes when items are renamed, the order of the items in the directory is not affected, but the groups still change (simple example: with files a, b, c, e, rename "c" to "d"). At the moment, we always emit the itemsMoved signal in such a case to make sure that the view is updated. However, it would be preferable if this signal was not emitted because it can trigger some quite expensive operations which are not needed at all. This commit introduces a new signal groupsChanged and modifies KFileItemModel and KItemListView such that these classes make use of it. Some unit tests for the new functionality are included as well. Thanks to Emmanuel Pescosta for finding a latent bug in the code which was triggered by this change and fixed in 998954db6d53999dfa75d380cbb4ca3111589f66. REVIEW: 111808
2013-07-25Prevent that removing items can cause icons to overlapFrank Reininghaus
When items are removed, new items may become visible because of that. This includes (a) Items *behind* the removed range. KItemListView may try to create their widgets at their "imaginary" old positions and move them to the new position with an animation. (b) Items *before* the removed range, if the deletion causes the view to scroll up. In that case, the "imaginary" old position and the new position was equal, but KItemListView still tried to determine the "old" position by adding the number of removed items to the index. The result was that the widgets were created at completely wrong positions, and no animation was started to fix this. Thanks to Emmanuel for helping to find the cause of this bug! BUG: 302373 FIXED-IN: 4.11.0 REVIEW: 111630
2013-07-05Fix O(N^2) complexity issue in KItemListView::slotItemsRemoved()Frank Reininghaus
If many item ranges are removed, KItemListView::slotItemsRemoved() could take very long because it looped over all items after the first removed one for every removed range, even if most of these items are not visible at all. This commit improves this by just looping over the visible items (whose number is limited by the window size) for each range. Test case (for very large N): touch {1..N}.png touch {1..N}.jpg (wait until all files are shown in the view) rm *.jpg REVIEW: 111398
2013-07-05Keep the "item size hints" of moved itemsFrank Reininghaus
It's quite expensive to re-calculate them, so we should better just move them to the correct position, rather than throwing them away. REVIEW: 111399
2013-07-04Make sure that KItemListSizeHintResolver is always consistentFrank Reininghaus
This was the root cause of bug 317827. The assert tried to make sure that we never access KItemListSizeHintResolver from KItemListViewLayouter inside the loop over the item ranges. This would be dangerous because it might be in an inconsistent state - the removed item ranges were removed step by step, so accessing the item size hints before the operation was finished could lead to wrong results. The solution is to insert/remove all item ranges immediately. A nice side effect is that there are no sources of O(N^2) complexity in KItemListSizeHintResolver any more if many item ranges are inserted/removed. BUG: 317827 FIXED-IN: 4.11.0 REVIEW: 111382
2013-05-25set KItemListView palette from scenes first viewThomas Lübking
REVIEW: 110505
2013-05-13Dolphin Places: Make it easier to drag and drop itemsVishesh Handa
When doing a drop, a check is performed to see if it is within x pixels from the top or x pixel from the bottom of the rect. If it is, then the drop is considered a drop between items. This x was fixed to qMax( 4, myStyleOption.padding ) which would generally be 4. This is fine for some cases, but when the rectangle size increases then this 4 pixels is not enough. Hence this 'x' is now being set to 30% of the rectangle height. By default the rectangle height is 20 pixels, so x is now 6 instead of 4 in the default case, which does make it slightly easier. Also, this in-between-items check is only performed when moving from one item to another. This is not good since if you enter the item and the bottom, the indicator is shown, and then as to start moving it up it stops showing, and then it should start showing again as you approach the top edge. Modified the code to run the check on every mouse drag event even if the hovered item has not changed. Both these changes combined make it much easier to drag and drop items. REVIEW: 110342
2013-04-22Comment out assertion to fix a crash when filtering in Icons/Compat ViewFrank Reininghaus
I'm not sure yet if there is a problem somewhere else in the code. For the time being, I think it's better to replace the assert by a TODO comment to prevent that users find out the hard way that there is something that we're not quite sure about. BUG: 317827 FIXED-IN: 4.10.3
2013-04-22Always determine icons for the visible items firstFrank Reininghaus
When entering a folder, KFileItemModelRolesUpdater has not yet been informed about the visible index range by the view when it tries to determine icons synchronously. This resulted in the problem that it tried to determine icons for all items in random order, and some visible icons were somtimes still unknown after the "synchronous icon loading" timeout of 200 ms. This commit tries to improve the situation by loading icons starting with the first item in increasing order. This should make it less likely that some visible items still have unknown icons after 200 ms. BUG: 316129 FIXED-IN: 4.10.3 REVIEW: 109843
2013-03-11Do not skip rows in when clicking the empty area of the scroll barFrank Reininghaus
The height of the header widget must be subtracted from the view's height in Details View to determine the "pageStep" for the scroll bar. BUG: 315619 FIXED-IN: 4.10.2 REVIEW: 109210
2012-11-05Merge remote-tracking branch 'origin/KDE/4.9'Frank Reininghaus
2012-10-31Fix Bug 309338 - flood of error boxes while renaming a folder in the folder ↵Emmanuel Pescosta
panel BUG: 309338 FIXED-IN: 4.9.3 REVIEW: 107070
2012-10-30Fix some indentation issuesFrank Reininghaus
2012-10-03Merge branch '4.9'Dawit Alemayehu
2012-09-28Redo the fix for CTRL+Tab not working when using Dolphin's filemanagement partDawit Alemayehu
in Konqueror. The original fix, commit 4f7ed2b, prevents drag and drop from working correctly. CCBUG: 302329 REVIEW: 106569
2012-09-27Merge branch '4.9'Dawit Alemayehu
2012-09-26Fixed CTRL+Tab not working when using Dolphin's filemanagement part in ↵Dawit Alemayehu
Konqueror. BUG: 302329 FIXED-IN: 4.9.2 REVIEW: 106569
2012-09-25Fix coding style and unnecessary complexity in KItemListViewAccessibleFrank Reininghaus
CCMAIL: [email protected] CCMAIL: [email protected]
2012-09-25Removing layouter from public, adding TableModelChanged updateAmandeep Singh
REVIEW : 106555
2012-09-22Making code confirm to policyAmandeep Singh
2012-09-22Removing in-class functions and unnecessary destructorAmandeep Singh
2012-09-22Modify code according to dolphin policyAmandeep Singh
2012-08-14Reverting KListSelectionManager, removing unneccessary a11y factoriesAmandeep Singh
2012-08-14Remove unneccessary dependency and polish the Accessibility InterfacesAmandeep Singh
2012-08-14Enclose accessibility code within QT_NO_ACCESSIBILITYAmandeep Singh
2012-08-14Adding the Accessibility classesAmandeep Singh
2012-07-12Re-implement dropping of files on folders in the Places Panel.Frank Reininghaus
This resolves a regression caused by the Places Panel rewrite. There is a small glitch left when reordering items (dragging below the last or above the first item only shows the drop indicator when first dragging out of the item and then back), but I prefer not to fix this glitch right now because this would require a more intrusive change, and I do not want to risk regressions because is not much time left to fix them before 4.9.0 is released. Thanks to Peter Penz for providing some advice about this issue. BUG: 302557 FIXED-IN: 4.9.0 (cherry picked from commit f4c960025167b7c7e04e1290ac9d9fee03a9b62d)
2012-07-12Re-implement dropping of files on folders in the Places Panel.Frank Reininghaus
This resolves a regression caused by the Places Panel rewrite. There is a small glitch left when reordering items (dragging below the last or above the first item only shows the drop indicator when first dragging out of the item and then back), but I prefer not to fix this glitch right now because this would require a more intrusive change, and I do not want to risk regressions because is not much time left to fix them before 4.9.0 is released. Thanks to Peter Penz for providing some advice about this issue. CCBUG: 302557
2012-06-02Always support a moving animation in case of the details viewPeter Penz
This fixes the issue that resizing items results in flickering when expandable items are shown.
2012-05-28Implement dropping of items into the Places PanelPeter Penz
Some polishing regarding the icons and group-alignment must still be done, but at least the basic functionality is back again.
2012-05-26Further preperations for drag & drop support in the places panelPeter Penz
2012-05-21Places Panel: Show drop indicatorPeter Penz
The dropping itself has not been implemented yet.
2012-05-18Enable basic drag and drop support for the Places PanelPeter Penz
The dropping has not been implemented yet, however in the context of this step the creating of the drag-pixmap is now forwarded to the item-widgets. This allows creating some optimized dragging-pixmaps e.g. for the details-view, where only the name and icon should be provided as drag-pixmap.
2012-05-17Fix crash related to group-headersPeter Penz
If multiple ranges are inserted or removed, the updating of the group-headers may only be done after _all_ ranges have been inserted/removed and not after each individual range. Otherwise the layouter-cache is not in a consistent state yet.
2012-05-09Let the group-headers respect the item-offsetPeter Penz
2012-05-02Places Panel: Allow showing of hidden itemsPeter Penz
2012-05-02Places Panel: Fix implementation issues when hiding itemsPeter Penz
2012-05-01Places Panel: Allow hiding of itemsPeter Penz
Related changes: - Animate changed items for the details-view in case it is not expandable - Remove the hardcoded "isHidden"-code in KStandardItemListWidget and allow derived widgets to define themselves what means "hidden" within their context. The current code needs a lot of bugfixing, but lets make this in smaller steps during the next days...
2012-04-30Fix crash when closing Dolphin during generating previewsPeter Penz
BUG: 299108 FIXED-IN: 4.9.0
2012-04-24Provide additional default groups for the Places PanelPeter Penz
If Nepomuk is enabled, it is now possible to easily search for some most common queries by having additional groups.
2012-04-23Details mode: Fix wrong required column-width calculationPeter Penz
BUG: 298577 FIXED-IN: 4.9.0
2012-04-21Inline renaming: Fix wrong assertionPeter Penz
BUG: 298512 FIXED-IN: 4.9.0
2012-04-21Prepare view-engine for non-KFileItem usecasePeter Penz
Up to now the view-engine only provided a model-implementation that supports file-items. The view-engine always had been designed to be able to work with any kind of model, so now a KStandardItemModel is available. The plan is to convert the places panel to the new view-engine. It should be no problem to fix this until the feature freeze - in the worst case the places-panel code could be reverted while still keeping the KStandardItemModel changes.
2012-04-17Implement inline-renaming for the new view-enginePeter Penz
BUG: 286893 FIXED-IN: 4.9.0
2012-04-14Allow to optionally limit the maximum number of text linesPeter Penz
Showing the whole filename unclipped seems to be a good default, however for users with a lot of files that have extremely long names this might get a problem especially in the icons-view. - Allow to limit the maximum number of lines in the icons-view - Allow to specify a maximum width in the compact-view (No limit is required for the details-view, as the name is shortened automatically to show other columns) BUG: 288596 FIXED-IN: 4.9.0
2012-04-11KItemViews: Internal directory restructurationPeter Penz
- Move all private headers from the kitemviews-directory into the 'private' subdirectory. - Get rid of DolphinDirLister and just use a directory-lister internally in KFileItemModel. - Minor interface-cleanups for signals
2012-04-05KItemListView: Minor internal cleanupPeter Penz
2012-04-05Fix filtering issuePeter Penz
When filtering items it might be possible that the update of the widgets is wrong although the model internally has a correct state. BUG: 297269 FIXED-IN: 4.8.3
2012-04-01Allow showing Nepomuk metadata inside viewsPeter Penz
Metadata like image-size, rating, comments, tags, ... can be shown now in the view (e.g. as column in the Details mode). Still open: The rating-information needs to be shown as stars. In the context of this feature also the following bugs have been fixed: - Fix visual glitches in the header of the Details mode - Improve the minimum column width calculation to respect also the headling and not only the content BUG: 296782 FIXED-IN: 4.9.0