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
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
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
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
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
The protection against unwanted execution of "rm -rf" when changing the
directory while entering the command did not work if there was never any
automatic "cd" command sent to the terminal before.
This patch ensures that Terminal Panel's member m_clearTerminal is
false after the initialization of the panel, such that the protection is
effective after that.
BUG: 316300
FIXED-IN: 4.10.2
REVIEW: 109431
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
This is analogous to commit e053ecdcd5,
which fixes the same problem for the case that the parent folder is
deleted.
BUG: 316335
FIXED-IN: 4.10.2
REVIEW: 109343
The slot DolphinViewContainer::focusView(), introduced in commit
2f0114730d, is actually unnecessary
because DolphinViewContainer::requestFocus() provides the same
functionality already.
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
This concept is not needed anymore because of the new "determine parents and
expansion levels" approach
Side effect:
Enables treeview for trash, ...
REVIEW: 109191
changes! :)
* Fixed the "Network browser" and "timeline" issues, by using the
KDirLister's itemsAdded(KUrl,KFileItemList) signal -> Use the
given Url to define the parent-child relationship.
* Changed the name of the slot "slotNewItems" to "slotItemsAdded"
for consistency with the signal.
* Use a QHash<KFileItem, ItemData*> instead of a QSet<KFileItem> to
store the filtered data (needed to keep the O(1) lookup for filtered
KFileItems in slotItemsDeleted + needed to fix bug 311912 "After
erasing a filter, some thumbnails randomly disappear")
* Made the determination of the "expandedParentsCount" slightly
simpler - just adding 1 to the parent's level (Also needed to fix the
"Network browser" and "timeline" issues)
FIXED-IN: 4.11.0
REVIEW: 109180
BUG: 304565
BUG: 311912
BUG: 312890
BUG: 315593
Devices can be added and removed while the context menu is open.
Sfter an action has clicked that needs to access a device, we therefore
have to check if its position in the model has changed, and more
importantly, if it is still there at all in order to prevent a crash.
BUG: 315298
FIXED-IN: 4.10.1
REVIEW: 108989
One one machine, I see that changing the global "single click" setting
fails. I don't know why that is the case, but I think we should better
just skip the test in that case and not hang forever.
There was some code in KStandardItemListView::itemSizeHintUpdateRequired
already that was supposed to prevent an expensive re-layouting of all
items when a preview is received. However, it didn't quite work as
intended because also the "iconOverlays" role changed.
The new approach is to only re-layout if text of a visible role changes,
because this is the only way how the space needed by an item might
change (see KStandardItemListWidgetInformant::itemSizeHint()).
BUG: 315315
FIXED-IN: 4.10.1
REVIEW: 108984
The method to make sure that the first item is visible turned out to be
less reliable than I thought. This could make the test hang forever.
Moreover, this commit removes some trailing whitespace that had been
added accidentally.
The opacity of the unhovered pixmap must be gradually reduced while
animating otherwise the alpha channel saturates.
REVIEW: 108858
BUG: 299371
FIXED-IN: 4.10.1
The previous approach, which was based on comparing the URLs as
strings, was not only very complex, but also could lead to
inconsistencies in the model, namely, that not all children were
removed from the model when the dir lister reported the parent as
deleted. Later on, this could even lead to a crash.
BUG: 311947
FIXED-IN: 4.11
REVIEW: 108766
1. It seems that it really can happen that KFileItems that we get from
the dir lister's itemsDeleted signal are not in the model any more,
e.g., if a folder where hidden files are shown is left and a folder
where hidden files are not shown is entered. There is no need to
output warnings then.
2. Remove the emptiness-check for the KFileItemList at the beginning.
Even in the unlikely event that we do get an empty list, we return
just a few lines later in the code.
These crashes were caused by the recent commit
ff3267c6dc. It introduced two problems:
a) A logic error in the code that removes the ItemData pointers from
m_itemData that could cause crashes if multiple item ranges are
removed, and there were un-removed items behind the last one.
b) The implicit assumption that any call of removeItems() will actually
result in items being removed in the model. This is incorrect if
the model is first cleared and then the hidden-files setting is
modified, which happens if "Save view properties for each folder" is
enabled, and a folder where hidden files are shown is left. In that
case, the dir lister emits itemsDeleted for the hidden items after
they have been removed from the model due to the folder change.
I'll add a unit test covering these issues soon.
Many thanks to Romário Rios and Hrvoje Senjan for testing!
BUG: 314046
@info indicates it's rich text and will be added <html> tag by kdelibs,
so just escape the text that will be set to label for KDE/4.10
REVIEW: 108584
BUG: 313992
The performance of this method is improved by:
a) Not removing items one by one, but doing it in a way that minimizes
the number of moves to prevent O(N^2) worst-case complexity.
b) Not sorting the removed items using the potentially extremely slow
KFileItemModel::lessThan. We can get the indexes of the removed items
very easily from the hash m_items, and sorting ints is a lot faster.
c) Preventing repeated rehashing of m_items when removing the deleted
URLs by replacing remove() by erase().
REVIEW: 108540
The benchmark executable must be run manually. It is not run
automatically with the other unit tests to prevent waste of CPU cycles
in the not-so-uncommon situation that only test failures attract
attention.
The Nepomuk ResourceWatcher emits 3 signals - propertyChanged,
propertyAdded and propertyRemoved. We should only listen to either the
propertyChanged signal or the propertyAdded + Removed signals. There is
no point in listening to all 3 signals. That will just result in
unnecessary updates.
Additionally, we do not need to listen to the resourceCreated signal.
That is only emitted when we are watching for a specific types, which we
are not.
REVIEW: 108543
Showing this message in the KMessageWidget above the view, which means
that the view contents are moved down, can be extremely annoying
according to user feedback. Just showing the message in the status bar
is probably enough.
BUG: 313466
REVIEW: 108483
FIXED-IN: 4.10.0
In fact, we could use the sorting functions provided by Qt or the STL.
The reason why we have our own is that we want to support parallel
sorting because sorting many items naturally by name can be expensive.
This might make it easier to reuse the parallel sorting code. Moreover,
some the upperBound/lowerBound functions have been removed because
equivalents are provided by the STL.
necessary, as actions is only called from the main thread.
Also it wasn't checked consistently; if the lock could not be taken, the
plugin was accessed anyway.
UpdateItemStatesThread, because m_itemStates is only accessed by the
when the thread is done, and set before the thread starts.
Also combine the setData function with the constructor.
UpdateItemStatesThread finishing and the finished() signal being
delivered.
In this case, a new thread was not created, because the old thread
still existed. However, pendingItemStatesUpdate was not set, because the
thread was not running. Instead, the old thread was restarted.
This meant that the finished() signal from the first run could be delivered
while the thread was running for a second time, causing the thread to be
deleted while still running and thus a crash.
Solution: set pendingItemStatesUpdate if the thread is non-null,
even if it is not running, knowing that slotThreadFinished has not yet run,
and will call updateItemStates itself.
BUG: 302264
FIXED-IN: 4.10
REVIEW: 107656
Emmanuel has contributed a lot of useful patches to Dolphin. Thank you
very much for that! The Dolphin community is looking forward to further
contributions from you.
CCMAIL: emmanuelpescosta099@gmail.com
The intention of the tinting was to make it more obvious in icons view
which icons are selected. However, some icons and previews look quite
ugly with the current tinting value of 1.0 (i.e., the value passed to
KIconEffect::colorize). A slight reduction of this value to 0.8 makes
this a little less ugly. However, the real fix is to remove the tinting
altogether and find something better to indicate which items are
selected.
CCBUG: 309722
The reentrant natural comparison of strings is the only really
expensive operation. Other comparison functions are much cheaper and
might not be reentrant at all. Therefore, we disable parallel sorting
when not sorting by name to prevent crashes and other unpleasant
behaviour.
BUG: 312679
FIXED-IN: 4.10
REVIEW: 108309
Only fixes the most obvious file name, the other entries in the table
probably have to be fixed in the FileMetaDataWidget.
REVIEW: 108307
BUG: 262464
(cherry picked from commit 3d7d900d28)
When trying to browse a N900 it crashed here because pathA was empty. Which
lead to index = maxIndex beeing -1 and pathA.at(index) crashing.
Reorder the while condition to prevent that courtesy of tsdgeos.
(cherry picked from commit f0c90a47de)
When trying to browse a N900 it crashed here because pathA was empty. Which
lead to index = maxIndex beeing -1 and pathA.at(index) crashing.
Reorder the while condition to prevent that courtesy of tsdgeos.
The string was added in ecb2715ead.
According to the soft message freeze policy on techbase, it's OK to fix
previously untranslated strings. Translators, please tell me if I'm
wrong, then I'll remove the string and the surrounding code and re-add
it to master later for KDE 4.11. Sorry for the trouble.
Thanks to David Faure for pointing out this mistake!
CCMAIL: kde-i18n-doc@kde.org
Fix Bug 308597 - Regression: Renaming a file/folder to something that contains a "/" will result in several message boxes
Uses the same solution as Dolphin-Rename-Dialog does. (KIO::encodeFileName)
BUG: 240820
BUG: 308597
REVIEW: 107681
FIXED-IN: 4.9.5
After 530c743a89, this fixes the other
places where the incorrect default value 'false' was used.
Thanks to Luc Menut for noticing this problem!
CCBUG: lmenut@free.fr
This reverts 951cb9c35d and
3143acc084, and fixes the crash caused by
nested event loops by delaying the deletion of the KItemListRoleEditor
until the next item is renamed inline.
BUG: 311206
FIXED-IN: 4.9.5
REVIEW: 107606
The problem was that we erased an iterator from the list and then
incremented it. This can lead to problems (namely, random crashes) if
the iterator pointed to the last list element.
Thanks to Sandro Mani for testing the patch!
BUG: 311246
FIXED-IN: 4.9.5
Fixes the problem that the "Recently accessed" entries in the Places
Panel might not be shown when using the default setup.
BUG: 310770
FIXED-IN: 4.10 Beta 2
REVIEW: 107464
Copied items should not be shown in gray. Thanks to Christoph Feck for
testing and reporting this regression!
CCBUG: 304615
CCMAIL: christoph@maxiom.de
The problem was that Qt tried to deliver an 'Enter' event to the
dangling pointer that once pointed to the tool tip.
Many thanks to G. Christ for finding a way to reproduce this crash!
BUG: 282257
BUG: 310579
FIXED-IN: 4.9.4
The 'make the new item the current one in all views' issue has been
around for quite some time, the unexpected selection was a recent
regression caused by commit b25059e803.
Thanks to Jaime Torres for finding the regression early and for testing
this patch!
BUG: 310219
FIXED-IN: 4.9.4
When renaming inline and starting a drag or invoking the context menu,
a nested event loop will be run. If the role editor loses focus and
emits roleEditingFinished(), we must prevent that deleteLater() is
called because this would delete the role editor inside a nested event
loop which is run from one of its own functions. We would get a crash
when returning from that event loop otherwise.
BUG: 308018
BUG: 309421
FIXED-IN: 4.9.4
We are already checking if kio_mtp is installed when we build the
predicate so we don't need to check if it is installed again.
Also, the fix for "Showing the product as a name for some kind of
massive storage" will have to be delayed to 4.9.4, so removing this.
This fixes the problem that copying the dolphinrc from another user
results in Dolphin starting up in a folder that might wither not be
accessible or not exist at all.
BUG: 308569
FIXED-IN: 4.9.3
Commit ea6a7c09a0 added a workaround for
bug 304986 (high CPU usage because KFileItemModelRolesUpdater requests
previews for the same files over and over again after, e.g., a rename
operation). The KDE/4.10 branch of kdelibs contains the real fix for
this issue (b8f64ca3f4b6311519c21046031d66d9d0a570c6), so the workaround
can be removed.
The real fix is in the KDE/4.10 branch of kdelibs
(commit b8f64ca3f4b6311519c21046031d66d9d0a570c6). We work around the
problem that the KFileItem that a preview has been requested for is
different from the KFileItems in the sets m_pendingVisibleItems and
m_pendingInvisibleItems by refreshing those sets when we detect that
the bug has been triggered.
BUG: 304986
FIXED-IN: 4.9.3
Basically adds a conditional that in case that mtp kioslave is installed
devices with MTP are added to the predicated.
REVIEW: 106651
(cherry picked from commit a09a237950)
KFileItemModel calls the dir lister's setMainWindow() method to make
sure that the dir lister caches authentication data. However, the method
used to determine the main window (qApp->activeWindow()) is not
guaranteed to yield the DolphinMainWindow or the KonqMainWindow. In
particular, if "Split View" is enabled in Dolphin's settings dialog, the
active window is the dialog, and when it is closed, any later access to
the stored pointer leads to a crash.
A better method is to verify that the model's parent is a QWidget and
then use this widget's window(). I had to make a small modification in
DolphinMainWindow to make sure that it also works correctly when the
view is split (the new view container had been created with a 0 parent
previously).
I tested it in Dolphin and Konqueror and verified that the "main window"
passed to the dir lister is really the application's main window.
BUG: 306459
FIXED-IN: 4.9.3
Dolphin is a file manager, and shouldn't be concerned with non-file
resources like notes, contacts and other stuff.
Use FileQuery instead of Query.
This also results in a faster queries. With File Queries Nepomuk can
perform some internal optimizations.
BUG: 306029
REVIEW: 106274
Cherry-picked from 6892d39d29
- Use QSet.erase() instead of QSet.remove() => no expensive Rehashing
- Get rid of += in sortAndResolvePendingRoles()
- Some other small changes
REVIEW: 106577
To change the icon size in the Places Panel to, e.g., 60 pixels, add
the following lines to $KDEHOME/share/config/dolphinrc :
[PlacesPanel]
IconSize=60
A value of -1 means that the standard "Small" size should be used
(which has been the default before this commit).
It is planned to add an "Icon Size" submenu to the context menu of the
Places Panel in KDE 4.10, but we cannot do this in the 4.9 branch
because of the string freeze.
FIXED-IN: 4.9.2
BUG: 301959
Added the license header in kitemlistviewaccessible.*
Accessibility headers not included when QT_NO_ACCESSIBILITY defined
Removed unnecessary debug statement
does not expand the dir => Bug discovered: When you drag a
item onto a folder-view-item and then move it away
instantly before the autoactivation event is triggered
(After 750ms), the folder will be opened anyway.
BUG: 305783
REVIEW: 106381
FIXED-IN: 4.9.2
(cherry picked from commit 9ab8bcd6aa)
That commit, which disregarded roles with empty text for the row number
calculation in Icons View, caused the problem that icons might jump
around while information was retrieved asynchronously because previously
empty roles could get a non-empty value, and the corresponding items
would need an additional row in the view.
Thanks to Hrvoje Senjan for testing this feature in master and reporting
this issue early, such that we could fix it quickly and prevent that
other users suffer from this bug!
CCBUG: 304752