┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
AgeCommit message (Collapse)Author
2013-06-20Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-06-20Make it possible to select files like "a_b" using keyboard searchFrank Reininghaus
The problem was that pressing the Shift key would reset the keyboard search. BUG: 321286 FIXED-IN: 4.11.0 REVIEW: 111102
2013-06-20Hide the "drop" indicator when an item is not hovered any moreFrank Reininghaus
This fixes the problem that the drop indicator might still be shown after the drag&drop operation in the Places Panel is finished. REVIEW: 111037
2013-06-20Some simplifications in KFileItemModelRolesUpdaterFrank Reininghaus
This removes some things that are obsolete after the recent commits: (a) resolveNextPendingRoles() is not called any more when the preview job is running. (b) In applyResolvedRoles(), we always load the icon if it isn't known yet. This ensures that every item has an icon. REVIEW: 111012
2013-06-20Try to do at least a "fast" icon loading for all itemsFrank Reininghaus
If all icons for the visible items could be loaded in 200 ms, we continue loading icons without mime type determination for all items until the 200 ms are over. This reduces the risk that the user ever sees "unknown" icons. REVIEW: 111011
2013-06-20Avoid a unnecessary resorting when items are changed, only resort the items ↵Emmanuel Pescosta
when the sorting role value is changed. BUG: 299565 FIXED-IN: 4.11 REVIEW: 111146
2013-06-20Make sure that all visible items have an iconFrank Reininghaus
We try to determine "final" icons, i.e., icons with known mime type, for 200 ms. If this does not succeed, we at least load "fast" icons, i.e., load the icons without determining the mime type. REVIEW: 111009
2013-06-20Prevent the selection rectangle from being reduced to 0pxEmmanuel Pescosta
width or 0px height, so the selected items can not be accidently unselected when the rectangle width/height becomes 0px. BUG: 320897 REVIEW: 111144 FIXED-IN: 4.10.5
2013-06-20Simplify handling of preview jobsFrank Reininghaus
This patch changes two things about the way we handle the preview jobs: (a) Rather than passing a KFileItemList to startPreviewJob(), remembering the leftovers in the member variable m_pendingPreviewItems and then starting a new preview job for these, we append items that need a preview to this member, and let startPreviewJob() take its input from there. This simplifies the code greatly. (b) To prevent that we start preview jobs with just one item and also that the GUI is frozen too long by startPreviewJob(), we take the following approach: * If the mime type of the first pending item is known, the function has probably been called by startUpdating(), which has determined mime types for the visible items already. startUpdating() has also blocked the GUI, so we just take all items at the beginning of the list with known mime type, and do not do any expensive mime type determination in startPreviewJob(). * If the mime type of the first pending item is unknown, the function has probably been called by slotPreviewJobFinished(). In that case, we can afford to block the GUI for a short while, so we determine mime types for 200 ms. REVIEW: 111008
2013-06-20Merge remote-tracking branch 'origin/KDE/4.10'Dawit Alemayehu
2013-06-18Ensure that the "Sort by Type" setting is respectedFrank Reininghaus
Before this commit, switching from, e.g., "Sort by Name" to "Sort by Type" sometimes had no effect until the view was refreshed. The problem was that the re-sorting was triggered before the type information was actually added to the model. BUG: 310705 BUG: 312014 FIXED-IN: 4.10.5 REVIEW: 111004
2013-06-10Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-06-10Do not rename files unexpectedly when changing the URLFrank Reininghaus
If the role editor loses focus, it considers the current renaming operation finished, and tells DolphinView to rename the file. This is a problem when changing the directory, because the URL change happens before DolphinView receives the signal, which results in a file in the new directory being renamed unexpectedly. The solution is to establish the connection to the slotRoleEditingFinished signal only when the "rename inline" editor is opened, and disconnect it when renaming is finished or canceled or the URL changes. BUG: 319912 FIXED-IN: 4.10.5 REVIEW: 110908
2013-06-07Remove unused argumentFrank Reininghaus
I saw a runtime warning from QMetaObject::invokeMethod() that KJob* is not a registered type. Since we don't use that argument in slotPreviewJobFinished(KJob*) anyway, it's best to remove it.
2013-06-06Ignore a changed item if it cannot be found in the modelFrank Reininghaus
This prevents repeated attempts to reload the data for the non-existing item. This was the root cause of bug 320791. Thanks to Hrvoje Senjan and Jekyll Wu for testing the new code and finding this bug! BUG: 320791
2013-06-06Make calls to resolveNextPendingRoles and resolveNextSortRole delayedFrank Reininghaus
This prevents that functions that call these indirectly call themselves recursively and cause trouble. BUG: 320791
2013-06-06startPreviewJob: if items is empty, delay call to slotPreviewJobFinshedFrank Reininghaus
This should prevent that other functions, which start preview jobs, eventually call themselves and thus cause trouble. CCBUG: 320791
2013-06-05KFileItemModelRolesUpdater: waste less ressources and fix some bugsFrank Reininghaus
The main change in this commit is that we do not determine expensive roles (like previews, mime types, etc) for all items, but only for the visible ones and those close to the visible area or on the first and the last page of the view. This prevents that the CPU and hard drive are kept busy for quite some time after entering a folder while all items are handled asynchronously. There is one known problem at the moment: when sorting by "Type" or another role that can be resolved by KFileItemModelRolesUpdater, the icons of the visible items are sometimes not loaded while the sorting is still in progress. I will try to fix this issue during the next few days. REVIEW: 110839
2013-06-05Reduce KFileItemModel memory usage by making use of implicit sharingFrank Reininghaus
The idea is based on http://milianw.de/blog/katekdevelop-sprint-vienna-2012-take-1 REVIEW: 110686
2013-05-25set KItemListView palette from scenes first viewThomas Lübking
REVIEW: 110505
2013-05-22Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-05-22KFileItemModel::insertItems(): guarantee O(N) run time complexityFrank Reininghaus
This commit prevents repeated insertions of single items into the list m_itemData, which shift all following items by one position and result in O(N^2) worst case complexity for the entire function. Moreover, the hash m_items is updated only for the items starting from the first inserted/removed item to save some superfluous calculations of hash values. REVIEW: 110355
2013-05-22Do not reset the 'isExpanded' state when an expanded folder is refreshedFrank Reininghaus
If an item is moved out of an expanded folder, the model receives the dir lister's refreshItems signal for the folder. The method retrieveData() then updates the folder's properties. This commit makes sure that the 'isExpanded' state is not touched by retrieveData(). A side-effect is that the 'isExpanded' role is not initialized to 'false', but this does not matter because trying to read a non-existing role from the QHash<QByteArray, QVariant> yields a default-constructed QVariant, which evaluates to 'false'. BUG: 299675 FIXED-IN: 4.10.4 REVIEW: 110401
2013-05-22KFileItemModelRolesUpdater: only update the size for changed foldersFrank Reininghaus
When using inotify, we also receive signals for modified files, even if we only ask KDirWatch to watch the directory containing them. In that case, we must not set the size to -1 (which means "unknown number of items" for folders) temporarily, or we end up with an apparent file size of 2^64 - 1 bytes. BUG: 309740 FIXED-IN: 4.10.4 REVIEW: 110428
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-05-11Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
Conflicts: CMakeLists.txt
2013-05-07Dolphin Places: React to Nepomuk system changesVishesh Handa
Reload the places panel when Nepomuk starts up and shutsdown. This way the user does not need to restart Dolphin to see the custom searches and places after Nepomuk switches on. BUG: 304918 REVIEW: 110323
2013-05-02Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-05-02Use the same text color for selected hidden and non-hidden itemsFrank Reininghaus
This fixes the problem that the names of selected hidden items are unreadable with some color schemes. BUG: 305734 FIXED-IN: 4.10.3 REVIEW: 110164
2013-04-23Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
Conflicts: plasma/applets/folderview/folderview.cpp CCMAIL: [email protected] @Ignat: We've been following a merge-based approach in kde-baseapps for quite some time now, see http://lists.kde.org/?t=134744909400005&r=1&w=1 It would be nice if you could merge KDE/4.10 into master after any non-trivial changes in folderview to prevent that others have to figure out how to resolve the merge conflicts. Thanks!
2013-04-23Disable Find/Replace in the "rename inline" line editFrank Reininghaus
These actions do not work correctly because renaming is considered finished as soon as the line edit loses focus, which happens when the "Replace" dialog pops up. BUG: 317772 FIXED-IN: 4.10.3
2013-04-23Do not dereference null pointer in KItemListViewAccessibleFrank Reininghaus
BUG: 316285 FIXED-IN: 4.10.3
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-04-12Merge remote-tracking branch 'origin/KDE/4.10'Aurélien Gâteau
2013-04-12Fix moving image while transitioning to hover pixmapAurélien Gâteau
See: http://youtu.be/OMYO0U0kSL0 REVIEW: 109960 FIXED-IN: 4.10.3
2013-03-27Merge remote-tracking branch 'origin/KDE/4.10'Luca Beltrame
Conflicts: plasma/applets/folderview/folderview.cpp
2013-03-27Update icon if it couldn't be determined upfront (.desktop file on slow mount)David Faure
This requires an up-to-date kdelibs >= 4.10. CCBUG: 290666
2013-03-26Improve grouping by name for non-ASCII file namesFrank Reininghaus
This commit prevents that all non-ASCII letters which are not umlauts are grouped in a single group "Others", and that the joint group of an ASCII letter and the associated umlaut in some locales is called "Others" if there is only the umlaut in the group. BUG: 315569 REVIEW: 109457 FIXED-IN: 4.10.2
2013-03-21Merge remote-tracking branch 'origin/KDE/4.10'Aurélien Gâteau
@emmanuel: this merge includes your fix from https://git.reviewboard.kde.org/r/109488/ . I assume this is not a problem. CCMAIL: [email protected]
2013-03-21Fix transition between m_pixmap and m_hoverPixmapAurélien Gâteau
The default SourceOver composition mode of QPainter cannot be used to interpolate between two images, we must use intermediate buffers to perform the interpolation and blend the result on the widget. More details are available in the review request. REVIEW: 109614 FIXED-IN: 4.10.2
2013-03-17Refresh all expanded directories too, when reloading a directory.Emmanuel Pescosta
BUG: 295300 FIXED-IN: 4.10.2 REVIEW: 109488
2013-03-15Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
2013-03-15Improve handling of filtered items when folders are deleted/collapsedFrank Reininghaus
If an expanded folder with filtered children is collapsed or removed, and the parent-child relationship cannot be determined by parsing the URLs, this patch makes sure that the filtered children do not reappear when the filter bar is cleared. REVIEW: 109455
2013-03-12Fix recent regressions when "Sort by Type" is usedFrank Reininghaus
This commit ensures that the mime types and icons are determined synchronously for 200 ms when "Sort by Type" is enabled. REVIEW: 109344
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
2013-03-10Merge remote-tracking branch 'origin/KDE/4.10'Frank Reininghaus
Conflicts: dolphin/src/kitemviews/kfileitemmodel.cpp
2013-03-10Remove filtered children if the parent folder is collapsedFrank Reininghaus
This is analogous to commit e053ecdcd57cc39fdcbc314fc8dd22c8b9dbdd4f, which fixes the same problem for the case that the parent folder is deleted. BUG: 316335 FIXED-IN: 4.10.2 REVIEW: 109343
2013-03-03Use a consistent way to group files by "Date"Daniel Kreuter
Before this change, files were grouped by calendar weeks if they were modified in the current month and ignoring the "first week day setting", but by the actual distance measured in multiples of seven days if the were modified last month. This not only fixes the "ignores first week day" bug, but also the problem that the inconsistencies in the algorithm could lead to a broken grouping in the first days of a month (see screenshot in the review request). BUG: 181337 FIXED-IN: 4.11 REVIEW: 108667
2013-02-27Removed everything related to m_expandedParentsCountRoot ->Emmanuel Pescosta
This concept is not needed anymore because of the new "determine parents and expansion levels" approach Side effect: Enables treeview for trash, ... REVIEW: 109191