Related changes:
- Animate changed items for the details-view in case it is not expandable
- Remove the hardcoded "isHidden"-code in KStandardItemListWidget and
allow derived widgets to define themselves what means "hidden" within
their context.
The current code needs a lot of bugfixing, but lets make this in smaller
steps during the next days...
Implement adding, editing and removing of entries. Note that the
result currently is still not stored in bookmarks.xml (this needs
to wait until the hiding is implemented in the model).
When changing the sort-column the sort order should always be reset
to 'ascending' to by consistent with the QListView behavior.
BUG: 298830
FIXED-IN: 4.9.0
This fixes two problems:
1. KItemListKeyboardSearchManger can cancel the current search when a
new folder is opened (note that this action removes the current item
from the view).
2. The view can underline the new current item (which is the item that
used to be below the removed item). Note that this did not work
before because the view did not receive a currentChanged() signal in
this case and therefore did not update the "current item" status of
the new current item.
CCBUG: 297488
CCBUG: 298782
REVIEW: 104709
(cherry picked from commit 68ce395a19)
This patch restores the Dolphin 1.x behaviour that Esc clears the
selection (Dolphin 2.0 did not have an easy way to clear the selection
using the keyboard so far). Moreover, Esc now also cancels the current
keyboard search. This fixes the problem that the only way to cancel the
search is to wait until the timeout has expired.
CCBUG: 298742
CCBUG: 297458
(cherry picked from commit d3b1312d3e)
It turned out that the longer timeout, introduced recently in
02eab49b2d, not only made multi-letter
keyboard searches easier, but also had some unwanted side effects. I
hope that 1 second, which is between the previous value of 5 seconds and
the pre-KDE 4.8.2 value of 0.4 seconds, is a compromise which will fit
most users' needs.
We will try to improve the situation further in future releases by
providing visual feedback about the keyboard search, but such a change
would not be suitable for a bug-fix release.
(cherry picked from commit d8732a59d3)
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.
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
Showing the whole filename unclipped seems to be a good default,
however for users with a lot of files that have extremely long names
this might get a problem especially in the icons-view.
- Allow to limit the maximum number of lines in the icons-view
- Allow to specify a maximum width in the compact-view
(No limit is required for the details-view, as the name is shortened
automatically to show other columns)
BUG: 288596
FIXED-IN: 4.9.0
- 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
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
The feedback on bugs.kde.org has shown that the previous behavior
(= show size with best-matching unit) is preferred by most users.
I initially wanted to make this configurable, but for implementing
it in a non-hacky way extending KLocale from kdelibs would have
been required. I'm not sure whether the usecase in Dolphin justifies
having such a configuration in KLocale - however as kdelibs is frozen
at the moment this is no option and the old behavior has been
restored.
BUG: 289850
FIXED-IN: 4.9.0
It is up to the plugins to decide what sensible size is required for
creating a preview, this cannot be decided by the user for all
plugins. A maximum size only makes sense for remote files, where
the user implicitely decides how much of the bandwith may be used
for having previews.
BUG: 273226
FIXED-IN: 4.9.0
When dragging a file within the same Dolphin window and the Ctrl, Shift
or Alt-key is pressed the shape of the cursor was not changed to
indicate the copy/move/link-operation.
BUG: 293850
FIXED-IN: 4.8.3
The option is currently hidden as up to now only Nuno requested it,
but it seems to be urgent: "my icon making productivity has drop subtantialy"
((c) 2012 Nuno)
As I don't want to get blamed for an outdated Oxygen-icon-set I have
no other choice ;-)
CCMAIL: nuno.pinheiro@kdab.com
When filtering items it might be possible that the update of
the widgets is wrong although the model internally has a correct
state.
BUG: 297269
FIXED-IN: 4.8.3
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
It's now possible to change the timeout, after which any call of
KItemListKeyboardSearchManager::addKeys(const QString&) starts a new
search, from the default value of 5000 milliseconds. This is not used
in Dolphin at the moment, but it permits to reduce the timeout to a
small value in the unit test. Before this change, the unit test took
more than 5 seconds to complete.
(cherry picked from commit 82fc1b54bd)
The previous timeout [QApplication::keyboardInputInterval()] was too
short to do a multi-letter search for users who do not type extremely
fast.
(cherry picked from commit 02eab49b2d)
- Remove KItemListView::preferredRoleColumnWidth() and allow implementing
this as part of derived classes from KItemListWidget. Those derived
classes are aware about the layout and hence also can provide the
preferred role width.
- Make KItemListView::itemSizeHint() non-virtual and also allow
implementing the size hint as part of derived classes from KItemListWidget.
Let derived classes from KItemListView just implement
preferredColumnWidth() for one role of an item instead of returning
a hashtable for a given item-range.
Until now when a new column is added in the case where custom column widths
are used, the automatic resizing has been turned on again. The patch fixes
this so that the current widths stay and the new column gets a proper default
width.
If the user changed a column-width in the details-view, up to now
the width got reset when changing a directory or when restarting
Dolphin. Now the column-widths automatically get remembered for each
directory in case if the user has modified the width. The automatic
resizing is still turn on per default. The storing of the custom
column-width can easily be reset by right clicking on the header and
selecting "Automatic Column Widths" from the context-menu.
Some finetuning is still necessary (e.g. the "Adjust View Properties"
dialog currently is not aware about this setting) but this will
be fixed during the next weeks.
BUG: 264434
FIXED-IN: 4.9.0
With the new view-engine the name-column always has been expanded
to the maximum width of all available names. But this makes it
impossible to see other columns without scrolling when having long
filenames, so per default the Dolphin 1.x behavior has been applied
to the new view-engine so that the name-column-width gets decreased
to be able to show the other columns.
This patch will be released with KDE applications 4.8.2. For
Dolphin 2.1 (KDE applications 4.9) user-modified widths of the
columns will be remembered per directory also between different
sessions.
CCBUG: 264434
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.
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
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.
The option for turning off expandable folders has been removed with
the new view-engine. Due to several requests this option has been
readded again.
As for 4.8.x no new user-interface strings may be introduced, the
line
ExpandableFolders=false
must be manually added below the section "[DetailsMode]" in the file
~/.kde/share/config/dolphinrc if the expandable-folders feature
should be disabled.
Thanks to H.H. "cyberbeat" for the initial patch!
BUG: 289090
FIXED-IN: 4.8.2
Up to now the alternating backgrounds just have been calculated by
checking whether the item index is odd. This does not work well when
grouping is enabled: In this case the alternate background color
of the first item of a group should stay consistent.
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
Up to now KItemListView has not been aware to which column or row
an item belongs to. This has been handled internally in
KItemListViewLayouter. But for deciding whether a move-animation
might result in overlapping items it is mandatory to be aware about
the column/row. The current approach to guess a column/row change
by comparing the source- and target-rectangle works very well but
breaks on some corner-cases when e.g. zooming.
Now the layouter allows to access the information. This assures
that in the vertical alignment no move-animation is done between
rows and the in the horizontal alignment no move-animation is
done between the columns.
As no rubberband-selection is enabled for the Folders Panel it does
not make sense to keep the selection region as small as possible.
BUG: 294111
FIXED-IN: 4.8.1
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.
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
- Don't use a margin for the first group header
- Provide margins between the groups
- Use a more subtle coloring
- Prevent animation glitches when resizing a window
- No padding should be applied to the icon-rectangle
- Base the selection-toggle size on the icon-size of the style not
the actual pixmap content, as this might lead to smaller selection-toggles
when having pixmap-previews with a small height.
- Differ internally between margins and paddings
- Add a small padding in the icons-view and the compact-views
- Optimize the width of the icons-view if previews are shown
- Use a simpler background and colors as suggested by Martin Zilz.
This is just an early draft, I need to post some comparison screenshots to
Martin for review.
- Fixes of some layout issues that have been revealed because of adjusting
the group header heights.
- More clever animation/no-animation detection when doing listview-property
changes in parallel.
Usecase:
- No scrollbar is shown
- Window size will be decreased so that a scrollbar gets necessary
The decreased window size minus the space required for the scrollbar
results in a relayout of the items. In 99 % of all
cases a decreased window size won't result in showing more items in parallel in
comparison to a larger window size. However in the remaining 1 % this can
happen (e.g. see bug 293318 for a sample). This results in an endless loop as
now no scrollbar is required anymore, the layout changes again, the scrollbar
is required again, ...
BUG: 293318
FIXED-IN: 4.8.1
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 89082ca391)
- Assure that landscape-previews use the whole available width of the icon-area
instead of only using the square width. This waste of space occured if the
text-width was larger than the icon-width.
- Only use one margin instead of two between the icons and the text to improve the
visual appearance (thanks to Martin Zilz for the hint)
BUG: 293268
FIXED-IN: 4.8.1
CCMAIL: martin@kreativkonzentrat.de
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
When counting the number of sub-directories consider unknown file types
as potential directories. In the "worst case" an expansion toggle will be
shown although the directory contains only files, however from a performance
point of view this seems to be an acceptable compromise.
BUG: 292642
FIXED-IN: 4.8.1
At the moment, only key press events are tested, and the current item
and selection after the event are verified.
Moreover, this commit makes sure that
KItemListController::keyPressEvent() really does not select anything
if the selection mode is NoSelection.
(cherry picked from commit 7457f4868c)
The asynchronous resolving to bypass performance bottlenecks is not necessary
anymore as multiple ranges can be inserted in one step now. This solves the issue
that e.g. opening a tree resulted in temporary unknown icons for a short period
of time.
Having animated items is useful when e.g. deleting or inserting one
item or when the size or position slightly changes by increasing the
zoom level or the window size. However if the number of rows or columns
change, the animation gets obtrusive and in this case lets just apply
the final layout.
The problem was that m_keyboardAnchorIndex and m_keyboardAnchorPos were
not updated when Home or End are pressed. This causes the following
unexpected behavior in Icons View: Press Home, then Right, then Down,
then Home, finally Down. One would expect that the first item in the
second row is the current item then, but before this commit, it was the
second one because the controller still remembered that the second
column was active before Home was pressed.
(cherry picked from commit 999234a94a)
- Assure a proper minimim width in the compact mode.
- Don't calculate the old position of hidden items to animate the
moving. Just show them directly.
Only animate the moving of items if the new position is within the same
row or the same column. Otherwise just fade in the icon on the new position.
This makes the the animations when resizing the window or changing the zoom-level
a lot more pleasant.
CCBUG: 289238
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 80d9bfec58)
This commit fixes a problem in KItemListView::doLayout(): This function
assumed that firstVisibleIndex is a constant.
However, if the view is scrolled to the bottom with previews enabled,
and then previews are disabled (and the icon size is much smaller
without previews), this function changes the scroll offset, which also
changes the the first visible index. Using the unchanged variable causes
trouble later on (i.e., it makes items which are actually inside the
view area invisible).
lastVisibleIndex is not needed before the scroll offset change and is
const after that, so its calculation is moved a few lines down.
CCBUG: 291841
FIXED-IN: 4.8.1
(cherry picked from commit cc8f5b4939)
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.