This prevents a delayed update when resizing the window e.g. in the details
view. As no animated item position changes can happen for dynamic item sizes
the synchronous relayout is fine from a performance point of view.
BUG: 290953
FIXED-IN: 4.8.0
If the graphics-effect-level has been set to NoEffects (systemsettings -> Appearance
-> Style -> Fine Tuning), the smooth scrolling in Dolphin will be disabled.
Additionally the duration for the smooth-scrolling has been decreased from 200 ms
to 100 ms to reduce the lag.
A wrong calculation of the end-value has been fixed that might trigger
a wrong position of the content.
BUG: 291740
BUG: 291607
FIXED-IN: 4.8.0
Note that the clearing is not done on mouse press, but on mouse release.
The reason is that there are situations when multiple items are selected
and pressing the mouse on one of them should not clear the selection
(e.g., drag and drop of multiple items).
BUG: 290854
REVIEW: 103703
FIXED-IN: 4.8.0
(cherry picked from commit 9f711b5f2e)
When downloading a large file the preview should not be recreated each time
a change-notification has been received. Create the preview after getting
the first file change, but postpone creating the next previews until no change
has been done during a longer period of time.
BUG: 290698
FIXED-IN: 4.8.0
When a selection has been done with non-linear ranges, it was possible that
the anchor item pointed to an invalid index that resulted into an invalid
selection.
As part of this fix the sorting for DolphinView::selectedItems() has been
disabled (if the caller assumes a sorted selection he must manually adjust it).
BUG: 288908
FIXED-IN: 4.8.0
Don't check whether the m_layoutTimer is active: Changing the
item offset must always trigger a synchronous layout, otherwise
the smooth-scrolling might get jerky.
When groups are enabled in Dolphin the key-up and key-down keys did not behave
consistent in comparison to traditional views or like done in editors.
CCBUG: 261995
CCBUG: 262038
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
- 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
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
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
The patch 30ae57ba80 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
Also in case if only one item is shown the navigation-keys should
trigger a selection of the current item. This works now consistent
within all view-modes (there have been been behavior differences
in Dolphin 1.7 depending on the used mode).
BUG: 289589
FIXED-IN: 4.8.0
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
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".
Respect the graphicseffect level in the system settings. This will disable
all item-animations if the graphicseffect level is "NoEffect".
The smooth scrolling won't be disabled in this case, but the duration has been
made smaller so that it is not recognized as an animation.
BUG: 289238
FIXED-IN: 4.8.0
If dynamic item sizes are used don't animate the size of the widget
in along the dynamic direction. This prevents unnecessary animations when
increasing the window width in combination with e.g. the details view.
- 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
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.
- 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
MSVC tries to import the specialized class from the library, which fails because only the generic version can be exported.
GCC probably silently ignores the export.
If the user has changed the sort-role or sort-order by clicking on the view-header of the details-view, the settings have been adjusted to the model but not remembered in the directory settings.
We need now explicitly to scroll to the item when the current item has been changed, as this is not done automatically in the scope of KItemListView.
BUG: 288745
FIXED-IN: 4.8.0
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
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
The font settings have been ignored currently because of the transition to the new view-engine.
The patch is based on the work of Janardhan Reddy and has been extended by the helper class ViewModeSettings.
BUG: 288395
FIXED-IN: 4.8.0
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
Bring back the functionality that a context-menu is opened if the "menu key" has been pressed. In opposite to Dolphin 1.7 the context-menu is shown above the selected item and not on the (probably unrelated) mouse position.
A new method KItemListView::itemContextRect() has been introduced: The method is now also used as reference for tooltips which fixes the issue that tooltips had a wrong horizontal alignment in the details-view.
BUG: 288366
FIXED-IN: 4.8.0
If the split-view is used and/or the Folders Panel is activated
it might happen that the "unknown"-icon of an item is shown instead
of the correct icon. The root-cause is that one model might already
have been resolved the MIME-type of a KFileItem while the other
model has not updated the icon yet. As KFileItems are shared the
check whether the MIME-type has been resolved is wrong. As at that
stage it is assured anyhow that the MIME-type is known just
applying the icon-name in any case won't slow down the performance.
The size of the icon boundaries should be as minimal as possible.
The patch for fixing the zooming-issues with the selection resulted
into a minor regression where the icon boundaries might be too large.
This patch remembers the original size of the pixmap to be able
to scale m_iconRect.
- Remember selection + current item when switching view-modes
- Fix the current item indicator alignment for selections
- Set the item as current item when the selection toggle has
been clicked
The maximum scroll offset must be the maximum y-range of the last
row, not only the maximum of the last item.
Thanks to Frank Reininghaus for analysing the root-cause and
for providing the initial patch!
BUG: 287211
FIXED-IN: 4.8.0
When KFileItems get removed from the model it is temporary possible
that the pending items are still part of the KFileItemModelRolesUpdater
while they have already been removed from the model (this happens
in the context during the signal itemsRemoved() gets emitted).
BUG: 287642
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
This fixes the problem that clicking an unselected item in order to drag
it would result in dragging all previously selected items as well. With
this commit, previously selected items are unselected when a new item is
clicked.
The reason why clearing the selection was moved to MouseReleaseEvent()
in commit b583dd6d4d was that clicking one
of several selected items should not result in unselecting the other
items (to make sure that dragging multiple items is possible). However,
this can also be assured by just checking in MousePressEvent() if the
clicked item has been selected already and not clearing the previous
selection in that case. This applies equally to the case that a context
menu is requested when several items are selected.
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
The following functionality from Dolphin 1.x has
been ported to the new view-engine:
- Allow expanding/collapsing of items
- Automatically select the current item
- Context menu for items
Related improvements to the view-engine:
- Make the expanding/collapsing interface already accessible
in the base classes KItemModelBase and KItemListView. If
no expanding/collapsing is supported at all by derived models
(which is usually the default case) simply not reimplementing
those 3 methods is sufficient and it does not introduce an
additional complexity like in QAbstractItemModel/QModelIndex.
- Automatically handle the expanding/collapsing in KItemListController.
This also includes the key-handling, which is quite special for
expandable items.
- Don't let KItemListView automatically scroll to the current item
if the current item got changed. The automatic scrolling should
only be done if the current item has been changed by the user.
Hence this functionality has been moved to the KItemListController
which currently only triggers the automatic scrolling if the current
item has been changed by the keyboard (we might extend the usecases
later if required).
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.
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.
Don't use a custom drawing code for showing the hover-indication
or selection of the text.
- The default style for items is used.
- Merge icon-rectangle and text-rectangle if possible.
- Fix background and minor focus-issues
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
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.
- 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.
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.