┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
AgeCommit message (Collapse)Author
2012-05-26Show all items in the directory when the name filter is clearedFrank Reininghaus
The problem was the following: While a QMutableSetIterator iterates the items in the QSet m_filteredItems, all items that match the new filter are removed from the set. However, to ensure that the iterator still reaches all items in the set, one must not use QSet::remove(), but rather the iterator's remove() method (see QMutableSetIterator docs). CCBUG: 300504 (cherry picked from commit 288473a96cdd8888f7fc91d0a551d6cbde5fd5dc)
2012-05-26Use an italic font for symbolic linksFrank Reininghaus
BUG: 298218 FIXED-IN: 4.9.0
2012-05-26Minor coding style fixesPeter Penz
2012-05-16Shorten the "path" content if possiblePeter Penz
Replace the home-path by '~' for having a shorter content.
2012-05-06Fix sorting issues for Nepomuk-rolesPeter Penz
Just use a string-comparison as default-compare.
2012-05-06Additional information: Use "Audio" instead of "Music"Peter Penz
This is consistent to the term used in the places panel.
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-17Ensure authentication data is cached properlyPeter Penz
The attached patch sets the main window on the main directory lister in DolphinView and KIO jobs in DolphinMainWindow to ensure that login data for remote protocols such as sftp, ftp are cached properly for the duration of the application. Otherwise, the end user is going to end up being unnecessarily re-prompted to enter password login information. Thanks to Dawit Alemayehu for the patch! REVIEW: 104614 FIXED-IN: 4.9.0
2012-04-11KFileItemModel: interface cleanupsPeter Penz
Fix some naming inconsistencies regarding the usage of 'dir' vs. 'directory' vs. 'folder'.
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-10Improvements for slow sorting rolesPeter Penz
If the sorting is done for data which is resolved asynchronously (e.g. rating), it is important to give a visual feedback about the state of the sorting. This is done now by a progress indication in the statusbar. Also optimizations for "Sort by type" have been done: Although resolving a type can be expensive in the most often case it is a very cheap operation. So it the sorting is done by type, try to resolve the type synchronously for at least 200 ms to prevent a asynchronous resorting. This is usually sufficient to have resolved types even for directories with several thousands of items. BUG: 292733 FIXED-IN: 4.9.0
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.