Each time one uses any of the Nepomuk classes, an attempt is made to
connect to the database. This slows down the application since
connecting to Nepomuk is not so cheap.
BUG: 321299
Normally, we only allow renaming multiple files if the new file name
contains a contiguous sequence of '#' placeholders, which are then
replaced by numbers.
However, if all extensions are different, we can also rename the files
without such a placeholder because the original extension is preserved
when renaming.
This had been possible some time ago already. That this "accidental
feature" was lost was a side effect of the fix for bug 318942.
BUG: 321234
FIXED-IN: 4.10.5
REVIEW: 111079
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
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
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
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
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
This fixes the problem that the Dolphin window has a rather large
minimum size. A side effect of this was that splitting the view could
resize the window (because twice the minimum status bar width was
needed then).
BUG: 319373
REVIEW: 110966
FIXED-IN: 4.10.5
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
This is the real fix now - note that the last commit
4de9a23364 was actually the fix for bug
320823. Somehow, I have messed up the local branches in my git
respository clone - sorry for the confusion!
BUG: 319912
FIXED-IN: 4.10.5
REVIEW: 110908
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
Change the data in the model before the real renaming is done by KonqOperations::rename(),
but when the rename operation fails, revert the data changes in the model.
BUG: 319119
REVIEW: 110922
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.
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
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