┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
AgeCommit message (Collapse)Author
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.
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-09-22Remove debugging outputPeter Penz
2011-09-22Fixed bug for selecting files with --select parameter.Chirag Anand
Files selected via --select parameter did not get current item focus. And if files were deleted while being current item, updating the view would select the next item instead of the first item in the list. BUG: 257805 CCMAIL: [email protected] CCMAIL: [email protected]
2011-09-20Show the role-description in the header of the details viewPeter Penz
2011-09-18Implement 'Sort By Size'Frank Reininghaus
It only works for files so far. The sorting of folders by the number of items is more tricky to get right because this number is retrieved asynchronously by KFileItemModelRolesUpdater.
2011-09-18Implement some missing sorting optionsFrank Reininghaus
Changing the sort order and enabling/disabling the "Sort Folders First" option works now.
2011-09-17Implement restoring expanded folders in Details ViewFrank Reininghaus
2011-09-10Fix possible crash in KFileItemModel::slotRefreshItems()Frank Reininghaus
If the changed items have been created recently, they might not be in m_items yet. In that case, the list 'indexes' might be empty, which leads to a crash later on (I saw the crash in KFileItemModel's unit test).
2011-09-10Provide KVersionControlPlugin version 2Peter Penz
Based on the work of Vishesh Yadav some extensions where required for the KVersionControlPlugin interface that have found there way now into KVersionControlPlugin2. Beside some interface cleanups it is now possible that a version control plugin may also provide context actions for directories or files that are not versioned yet. REVIEW: 102541
2011-09-08KFileItemModel: emit itemsChanged() signalPeter Penz
2011-09-08Version control: Apply text-color if an item is versionedPeter Penz
2011-09-06First step to reactivate version control plugin functionalityPeter Penz
- Add a DolphinFileItemListWidget that provides icon-overlays and colored text for the version state (implementation is missing yet) - Allow KFileItemListWidget to have custom text colors - Update interface of VersionControlObserver to work with KFileItemModel instead of the old model-interface.
2011-09-04Improved drag and drop supportPeter Penz
2011-09-01Fix issue when moving items to trashPeter Penz
KDirLister does not emit a completed() signal when deleting files, only when files are listed.
2011-08-30Implement DolphinView::simplifiedSelectedUrls()Frank Reininghaus
Makes it possible to trash and delete items.
2011-08-29Added support for highlighting items by typing their name on the keyboard.Tirtha Chatterjee
2011-08-26Fix issue that removing an item is not recognizedPeter Penz
Thanks to Tirtha Chatterjee for the patch! REVIEW: 102435
2011-08-24Improve KFileItemModel::createMimeData()Peter Penz
Use the same approach like in KDirModel::mimeData().
2011-08-24Interface cleanups for drag and drop supportPeter Penz
2011-08-15Fix for KFileItemModel::expansionLevelsCompareFrank Reininghaus
Before this commit, expanding and collapsing folders in the details view would lead to strange results in a folder with the items "a", "a/a/", "a/a/1", "a/a-1/", and "a/a-1/1". The problem was that the comparison between "a/a/1" and "a/a-1/1" went wrong: the first character in which the paths differ is a "/" in one of the items, such that the code that reduces this 'index' in KFileItemModel::expansionLevelsCompare in order to find the 'common path' did nothing because it checked that only *one* of the two items does not have an "/" at the position 'index'.
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.