┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
AgeCommit message (Collapse)Author
2012-01-31Fix sorting issuesPeter Penz
For some roles the sorting has not been implemented. BUG: 292941 FIXED-IN: 4.8.1
2012-01-28Fix regression: Respect "natural sorting" settingPeter Penz
BUG: 292270 FIXED-IN: 4.8.1
2012-01-25Handle folder names containing spaces correctly in the Folders PanelFrank Reininghaus
The problem was that KFileItemModel::setExpanded() used KUrl::url() to determine the names of the subfolders. This method encodes special characters, such that comparing the folder names with the unencoded URLs stored in the model fails. Using KUrl::path(), which does not encode special characters, fixes the problem. BUG: 291781 FIXED-IN: 4.8.1
2012-01-15Don't show a expanding-toggle in the Folders Panel if there are no ↵Peter Penz
subdirectories BUG: 290745 FIXED-IN: 4.8.0
2012-01-06Details view: Fix wrong expansion levelPeter Penz
The calculation of the root-expansion level had been incorrect which lead to a wrong indentation on some directories. BUG: 290757 FIXED-IN: 4.8.0
2012-01-05Fix issue that an empty directory is shown in the split modePeter Penz
Root-cause was that the signal KDirLister::completed(KUrl) must be watched by the model and not KDirLister::completed(). BUG: 290182 FIXED-IN: 4.8.0
2011-12-25Fix grouping issuePeter Penz
When switching to a group that is not shown currently, the group headers won't be updated. The root-cause was that the m_groups-cache must be reset when the roles have been changed. CCBUG: 289654
2011-12-25Fix wrong grouping of typesPeter Penz
- Uninitialized types count as one group - Let the receiver of the signal itemsMoved() decide whether unmoved items really result in an unchanged visual appearance. This might e.g. be the case if the grouping is turned on and the group-names change although the items themselves have not changed their position. BUG: 289654 FIXED-IN: 4.8.0
2011-12-24Fix sort-issue for treesPeter Penz
If a protocol like fish is used, the sorting of sub-trees was wrong. The root cause was a wrong comparing of URLs where the protocol was not initialized. BUG: 289697 FIXED-IN: 4.8.0
2011-12-23Don't show the name as part of the "path" rolePeter Penz
This allows a useful grouping by paths when e.g. searching files. BUG: 269335 FIXED-IN: 4.8.0
2011-12-23Introduce "isExpandable" rolePeter Penz
The role is used to determine whether a directory can be expanded at all. This is e.g. not the case if a directory has 0 items or the target-URL is different from the item-URL. The expansion toggle will get hidden if a directory is not expandable. CCBUG: 288521
2011-12-23Fix possible double entries in details viewPeter Penz
The patch 30ae57ba807ecadfdef833a4895621fc330badc9 did not resolve the issue completely: The pending items to insert must be dispatched before checking for duplicates. Related to this report the expanding for the remote-protocol has been disabled. BUG: 288521 FIXED-IN: 4.8.0
2011-12-22Don't show child items of collapsed parent itemsPeter Penz
If a parent item got expanded and collapsed again, KDirLister keeps the items of the previously expanded directory. Hence inserting new items there will result in emitting the signal newItems() and a check must be done whether the parent is still expanded. BUG: 289598 FIXED-IN: 4.8.0
2011-12-20Remove child items when a parent item gets deletedPeter Penz
BUG: 289447 FIXED-IN: 4.8.0
2011-12-20KFileItemModel: Always use upper case letters to group by nameFrank Reininghaus
This fixes the following problems: 1. In a folder containing the items ~a and b, the first group, containing ~a, is named "Others". 2. In a folder containing the items a, ~b, ~c, and ~d, the first group "A" contains a and ~b, and the other two items are in the group "Others".
2011-12-17Force a root-expansion level for the trash protocolPeter Penz
2011-12-17Determine the path of the trash-protocol correctlyPeter Penz
2011-12-16Minor layout and coding style cleanupsPeter Penz
- Disable performance debugging output - Force a synchronous layout during scrolling. This prevents having a jerky scroll-animation if there are pending operations ongoing in parallel. - Minor coding style cleanups
2011-12-15Fix descending sort order issuePeter Penz
If the sort order is descending and directories and files are shown on the same hierarchy level, the sorting was partly wrong.
2011-12-15Don't show an expansion toggle for locked expansionsPeter Penz
2011-12-14Fix expansion levels for search resultsPeter Penz
Force an expansion level of 0 for search results to prevent showing tabbed child items without parent items.
2011-12-14Fix filtering issue in combination with expanded itemsPeter Penz
When items have been expanded they should never get filtered, as each child item must have a parent item.
2011-12-14Improve private method KFileItemModel::expansionLevelsCompare()Peter Penz
Get rid of the hack to access the m_itemData member for getting the parent of an item during sorting. ItemData has been extended by a parent-member which allows a fast and save way to do this. Sadly this makes the unit-test for expansionLevelsCompare() more complex and it has been temporary deactivated. I'll take care to fix this during the next week.
2011-12-14Fix commentPeter Penz
2011-12-13Fix several sort-issuesPeter Penz
- Treeview: When sorting descending assure that the parent item is still ordered before the child items and not afterwards. - Treeview: When sorting by other roles than names expansionsLevelCompare() had been buggy and resulted in ordering child items below wrong parent items. - General: When sorting by another role than names and the role of two items had been equal a case sensitive sorting of the names had been done. This has been fixed by using the default name sorting as fallback. BUG: 286726 FIXED-IN: 4.8.0
2011-12-10Support wildcards for the filterPeter Penz
Thanks to Janardhan Reddy for the patch! BUG: 155986 FIXED-IN: 4.8.0
2011-12-10Resort items when they have been changedPeter Penz
This assures that when renaming an item the sort-position will be adjusted. Thanks to Frank Reininghaus and Janardhan Reddy for the patch and the tests. BUG: 288311
2011-12-09Fix issue with duplicate items in details viewPeter Penz
When expanding an item, collapsing it and expanding it again before the items for the first expanding could be loaded, it was possible that items have been inserted twice into the model. BUG: 288521 FIXED-IN: 4.8.0
2011-12-08Fix "show hidden files" issuesPeter Penz
Use KFileItemModel instead of KDirLister for toggling the whether hidden files should be shown. This assures that the signal KFileItemModel::loadingCompleted() will be emitted. In the longterm Dolphin should only use the KFileItemModel, so that the KDirLister instance is used only internally as implementation detail in KFileItemModel. Although there are only a few cases left where KDirLister is used instead of KFileItemModel this cleanup will be postponed to after the 4.8 release... BUG: 287314 BUG: 288213 FIXED-IN: 4.8.0
2011-12-04Update the view if an item is renamedFrank Reininghaus
2011-12-04Fix crash #1 when filtering itemsPeter Penz
When filtering items it was possible that the current index got an invalid value which resulted in accessing the URL of a null-KFileItem. There is still one (general) open issue in KFileItemModelRolesUpdater (crash #2) where a KFileItem that is already null gets read. It is not really related to filtering but can be triggered quite easy when filtering huge directories with enabled previews. CCBUG: 287642
2011-11-30Reimplement name-filteringPeter Penz
The filtering of items has not been implemented yet in the KFileItemModel of the new view-engine. The patch brings back this functionality again, but some minor issues are open: - When filtering trees expanded directories should only get hidden if no child is visible - Regular expressions are not supported yet (they have not been supported in Dolphin 1.x but it is now quite simple to implement). - When filtering previews and removing the filter it might be possible that the preview is not shown (is most probably an an already existing bug in KFileItemModelRolesUpdater). BUG: 287642 FIXED-IN: 4.8.0
2011-11-27Apply icon effect for cut itemsPeter Penz
Fix issue that no icon effect got applied to icons that have been cut.
2011-11-25Use KFileItem::text() instead of KFileItem::name().Sebastian Trueg
This way Nepomuk search results get their proper user readable names. BUG: 287472 REVIEW: 103237
2011-11-24Fix restoring expanded URLsFrank Reininghaus
When navigating back or forward in history, DolphinView tells the KFileItemModel about the expanded URLs which should be restored before the folder is entered. In this case, the algorithm in the new function KFileItemModel::setExpanded(const QSet<KUrl>&) does not work. To fix this, the old function KFileItemModel::restoreExpandedUrls(const QSet<KUrl>&) is restored. Unit test included.
2011-11-20Initial draft for bringing back the "Folders" panelPeter Penz
The folders panel has been adjusted to use the new view-engine. A lot of things don't work yet, but are mostly minor issues that should be fixable during the next 10 days.
2011-11-06Fix expansion-level issuePeter Penz
When the details-view has been used on / a wrong expansion-level has been calculated and hence no expansion-toggles have been visible.
2011-11-04Fix layout-issues when sorting by roles that are changedPeter Penz
When sorting is enabled for a role that gets changed e.g. because a value like the MIME-type is determined asynchronously, then the layout might get messed up. slotItemsMoved() has been adjusted to invalidate the sizehint-cache and to update the group-headers. BUG: 285542 FIXED-IN: 4.8.0
2011-11-04Don't use mixed units in size-column of details-viewPeter Penz
This makes it tricky to compare the filesizes without adjusting the sort-order, so now all sizes in the size-column are shown in KiB or KB (dependent on the KLocale setting). BUG: 219932 FIXED-IN: 4.8.0 Related fixes: - Stay consistent with the rounding when using the KiB/KB unit in the statusbar. - Fix sorting-by-size issue for folders - Show "Unknown" in the size-column when the number of items cannot be determined.
2011-10-31Internal KFileItemModel optimizations and cleanupsPeter Penz
- Use merge-sort instead of quick-sort. This assures a sane worst-case scenario where quick-sort has a runtime complexity of O(n*n) (e.g. when changing the sort-order from ascending to descending). - lessThan()-improvements: Change internal data-structures to allow a comparison of any role, not only roles available in KFileItem - Don't synchronously move an item if the value has been changed of a role defined as sort-role: This is too expensive in case if e.g. the sorting is done by "type" and the type is determined step by step.
2011-10-30Fix sorting-issues when value of a sort-role has been changedPeter Penz
If the value of a sort-role has been changed, emitting the signal itemsChanged() is not sufficient as from the KItemModelBase point of view an item has been moved or deleted/reinserted. Corresponding to the unit-test KFileItemModel::setData() respects this case correctly now, however there are some minor visual animation issues left that (hopefully) should not be tricky to solve.
2011-10-30Fix layout issue for groupsPeter Penz
When enabling a group where the sort-role is retrieved asynchronously (e.g. group by "type") the group-headers have stayed invisible.
2011-10-29Fix grouping-issue with not visible sorting rolesPeter Penz
It must be assured that the data for a sorting role always is determined even it is not shown as "additional info" in the view.
2011-10-29Implement grouping for all rolesPeter Penz
2011-10-27Fix minor visual issues in the view-enginePeter Penz
- Increasing the window-size should not result in increasing the size from previously invisible items - Rename group 'Numerics' to '0 - 9' - Fix "damaged" icons when changing the view-sizes or changing the view-mode
2011-10-24Make group-headers less uglyPeter Penz
2011-10-22Implement grouping for namesPeter Penz
- Use a custom header for KFileItems - Cache the groups - Allow enabling/disabling grouping dynamically Currently there is a random crash in combination with the groupheader-recycler, this will be fixed during the next days.
2011-10-18Implement group-header layoutingPeter Penz
The most tricky part for groups - the layouting - basically works now for all views (grouping was available only in the icons views for Dolphin 1.x) and is nearly equally fast as without groups. Still open: - Group headers are ugly screen rectangles - Return valid groups in KFileItemModel instead of the currently hardcoded testing values - Dynamically turning on/off groups does not work currently, the directory must be reentered
2011-10-15Interface cleanups to prepare the return of "grouped sorting"Peter Penz
- Rename setCategorizedSorting() to setGroupedSorting() - Change the model interface to allow enabling/disabling grouping without the need to declare a role (the sort role will be taken). - Add dummy group role implementation in KFileItemModel The grouping code itself requires some cleanups and might crash at the moment or lead to weird layouts.
2011-10-03Keep current item and selection when resorting, part 2Frank Reininghaus
This commit adds the missing pieces to KItemListView and makes KFileItemModel::resortAllItems() only emit the itemsMoved() signal.