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
When user drag and drop to another splitted view, the view will be activated,
thus if user close the split view, the view will be closed, while this is
usually the case when user copy file to remote/removable media.
REVIEW: 110167
CCBUG: 312834
When 'browse through archives' is enabled, open archive files
like folders on middle clicking, context menu -> new tab action
and context menu -> new window action.
BUG: 196035
REVIEW: 110487
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
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
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
- Updated both the Dolphin KPart and context menu to use the new
DolphinRemoveAction class to manage "Delete/Move to Trash" actions.
See also https://git.reviewboard.kde.org/r/107509/.
REVIEW: 108802
This way when another read only query is added, the internal state is
changed and the search label gets updated.
REVIEW: 110324
BUG: 315796
FIXED-IN: 4.10.4
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
Most error messages are only relevant when trying to open a URL, e.g.,
they inform the user that opening the URL failed. After the next
successful URL change, these errors are not relevant any more.
Therefore, it makes sense to hide the message widget automatically to
prevent that the user is forced to close it manually.
BUG: 312872
FIXED-IN: 4.11.0
REVIEW: 110369
The recent commit 022b564831, which added
a few source files to kitemlistcontrollertest, caused a crash in that
test - an assert was hit because now a different virtual method was
called in one place (KStandardItemListView::initializeItemListWidget()),
and qobject_cast could not cast the 'item', which is of type
KFileItemListWidget, to its base class KStandardItemListWidget. Adding
the source file kfileitemlistwidget.cpp fixes this.
CCMAIL: ps_ml@gmx.de
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
Finding out whether shift is pressed initially can be done
with qApp->keyboardModifiers(), and finding out that the user is pressing
or release shift can be done with keyPressEvent/keyReleaseEvent.
This required to inherit from KMenu rather than having the KMenu
as a member.
KModifierKeyInfo is only implemented on X11, so this makes the code
more portable. If similar solutions can be found for other users of
KModifierKeyInfo, it will be deprecated in KF5.
REVIEW: 110303
The "Rename" button in the dialog should be enabled if and only if the
"new name" pattern is valid. This is the case if the pattern contains
exactly one sequence of '#', which will be replaced by digits.
This patch fixes the problem that
(a) A pattern that contains a single '#' is not considered valid, and
(b) A pattern without any '#' at all is not recognized as invalid.
BUG: 318942
FIXED-IN: 4.10.3
REVIEW: 110223
Conflicts:
plasma/applets/folderview/folderview.cpp
CCMAIL: ignat.semenov@blue-systems.com
@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!
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
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
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