┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
AgeCommit message (Collapse)Author
2012-04-07Just use "-" instead of "No destination" for the destination-rolePeter Penz
2012-04-04Extract sorting-algorithm from KFileItemModel into custom classPeter Penz
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
2012-03-21KFileItemModel: Fix triggering of wrong assertionPeter Penz
When switching from the details-mode of a search-view into any other mode, the m_expandedParentsCountRoot is set to ForceExpandedParentsCountRoot.
2012-03-21Prevent flickering when updating itemsPeter Penz
When downloading images from e.g. the camera-IO-slave the files will be downloaded as *.part files and renamed afterwards. The renaming results in an undetermined mimetype and hence the probably already available preview or icon gets replaced by a dummy icon. The patch fixes this by keeping the old values as long until they have been resolved by KFileItemModelRolesUpdater.
2012-03-20Fix sorting-issue when "Sort folders first" is disabledPeter Penz
The comparison of expanded trees may not assume that directories are always sorted first and must respect the "Sort folders first" setting. The sorting-unittest has been extended by a sub-tree and the usecase of bug 296437. The already deactivated test for KFileItemModel::expandedParentsCountCompare() has been completely removed as it has been replaced by testSorting(). BUG: 296437 FIXED-IN: 4.8.2
2012-03-20KFileItemModel: Remove minimum-update timerPeter Penz
The timer became unnecessary after introducing the behavior to collect all new items until KDirLister emits a completed()-signal.
2012-03-14Use sub-menus for the "Sort By"- and "Additional Information"-menuPeter Penz
This allows doing some grouping for the visible roles by e.g. Image, Document, Music or whatever.
2012-03-13Remove RolesInfoAccessorPeter Penz
Now KFileItemModel provides a way to access the available roles including their translations. Note that the 3 roles "comments", "rating" and "tags" have not been implemented yet in KFileItemModel and turning them on does not work currently.
2012-02-23Whitespace cleanups and documentation fixesPeter Penz
2012-02-21Don't trigger assert when switching to details-viewPeter Penz
If the visible roles of the details-view are equal to the visible roles of other views, then switching to the details-view will trigger an assert because the invisible roles don't get updated. Thanks to Frank Reininghaus for the detailed analyses! In the context of this fix optimizations have been done when switching view-modes: The "don't-animate-workaround" could be removed. BUG: 294531 FIXED-IN: 4.8.1
2012-02-14Details view: Fix filter issue with sibblingsPeter Penz
When the filter has been enabled, the sibblings got not updated. Explicitely update the sibblings when inserting, removing or moving items. For layouting implicitely update the sibblings only for recycled widgets.
2012-02-14Details view: Fix indicator-branchesPeter Penz
Up to now no indicator-branches have been drawn when showing a tree. The patch fixes this so that that the style-dependent branches are drawn. The main part of the patch is the implementation of KItemListView::updateSiblingsInformation(). Most of the other changes are related due to an internal renaming of the expansionsLevel-role to expandedParentsCount and some related cleanups. BUG: 290276 FIXED-IN: 4.8.1
2012-02-08Drag and drop: Adjust destination if the item is no directory or desktop-filePeter Penz
The URL of the view should be used as destination target if a dropping is not done above a directory or desktop-file. BUG: 293511 FIXED-IN: 4.8.1
2012-02-05Replace setExpanded(const QSet<KUrl>&) by expandParentItems(const KUrl&)Frank Reininghaus
The use case of this function (Folders Panel) requires the expansion of the parent items of a single URL, so it's not needed to handle a full set of URLs in this function. Moreover, the issue that not only the parents, but also the URLs themselves were expanded is fixed by this commit. (cherry picked from commit 89082ca391807abdc26d8985efe6b4c27183a9b1)
2012-02-03Show the value "Unknown" for the item-count only after it has been verifiedPeter Penz
During determining the item-count for directories just show an empty string until either the item-count has been calculated or if the item-count is unknown. Thanks to Nikita Skovoroda for the initial proof-of-concept patch. BUG: 291823 FIXED-IN: 4.8.1
2012-02-02Fix sorting issue when sorting by "size"Peter Penz
Root cause of the issue was an overflow in: result = a - b; where result is 'int' and a and b are 'KIO::filesize_t'. BUG: 293086 FIXED-IN: 4.8.1
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. CCBUG: 291781 FIXED-IN: 4.8.1 (cherry picked from commit 80d9bfec580bf01b0ee584fc4bb46e3d59a0ba7c)
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.