| Age | Commit message (Collapse) | Author |
|
Avoids the item being considered dirty when *we* changed it.
It is guarded in most places but wasn't done in the pixmap animation stuff
causing the item considered dirty whenever hovering it.
|
|
This all seems to be done by the PreviewJob in KIO already.
|
|
The preview job does an async stat on the file, so we might as well
use its information to determine the icon.
Also only determine mime type in the final "ResolveAll" step since
it will initially resolve roles but mime type isn't necessarily fast.
|
|
|
|
It's no longer true that KIO preview would block. It spawns an
asynchronous stat job if it needs to determine the mime type.
|
|
This patch checks the item first if the plugin it's using for it's previews even supports sequences. If not, we can then safely ignore the hover action for polling more sequences and avoid unnecessary work.
The sequencing support is false by default, so we set it true only when we know it's possible.
|
|
Folder count would not update properly when user would delete file from
a folder, or add a new file to it.
Previously when size value is set to -2 after update, the update will
never be called again unless user presses F5. This change will instead
reset that -2 to 0 whenever we are requesting for calculating
directory sizes.
We never updated the count when a file was deleted, so that has been added as well.
This change also calculates the item counts from the processedAmount, which is the total amount of items we're processing. From there we remove the unwanted items and get the final count.
For remote files, we set the count to -1 since we don't calculate them.
BUG: 500502
|
|
Now all overlays icons in kitemviews are added in
KStandardItemListWidget::updatePixmapCache.
data[iconOverlays] now contains icon names.
DolphinFileItemListWidget::refreshCache is the sole responsible of
setting the overlays either coming from KFileItemModelRolesUpdater or
KVersionControlPlugin.
This garantees consistency in rendering.
BUG: 497372
|
|
|
|
|
|
Instead of the pixmap size that won't be accurate.
It allow KGuiAddons::addOverlays to draw larger images to add overlays.
Consequently the emblems are not longer dependant scaled based on the pixmap aspect
ratio.
BUG: 498211
|
|
Also use dpr for icons.
Amends cebcf8db
BUG: 497576
|
|
If filename of an item was updated previously, it would modify the model
before the file was actually changed. This led to the model calling
a signal that would try to run a previewjob, but since the filename
is not actually changed yet on disk, it would fail.
This patch moves the model updating after copyjob. Copyjob
will take care of the file renaming if there is already existing file.
We just need to update the model correctly after the job has succeeded.
BUG:497555
|
|
The latter is what most other projects use
|
|
Dolphin shows the size of directories by listing their contents, which
for some users might cause unwanted load on the file system.
Depending on the size of the subdirectories in question and how the
storage is accessed, this might cause noticeable delays and even
freezing.
This commit adds a new option under "View -> Content Display" that
enables users to set "Folder size:" to "No size", completely disabling
directory size counting. Directory size counting is still enabled by
default.
As a third option for "Folder size" is added, the DirectorySizeCount
boolean setting is replaced with a DirectorySizeMode enum setting. The
old setting is migrated using a kconf_update script.
FEATURE: 477187
GUI:
|
|
The bug fix 8f043b2958477d3fe2ef094b7e42f792f4cf0b02 introduced a
secondary code path to trigger a resort of items. However, the previous
way to trigger it only required a small bug fix to work and gives us a
couple of optimisations for free. This commit removes the secondary code
path and fixes the primary one.
CCBUG: 473999
|
|
Signed-off-by: Méven Car <[email protected]>
|
|
|
|
After refreshing the view when
size count is selected as the sortRole,
count is 0 at first. When the actual count is loaded,
the sorting is done according to the count being 0.
This can break the sort order and cause view and model
to be out of sync.
Making sure we always resort all items
when the directory size/item count is changed fixes this
BUG:473999
|
|
Fixes a weird bug with the treeview if one has
```
[PreviewSettings]
Plugins=audiothumbnail
```
in their `dolphinrc`. It can be any PreviewSettings plugin, as long as there it at least one.
Check the bug report for more, but in short, the bug is reproducible like this:
```
create folder tree inside a test folder with
mkdir -p 1/A/B/C/D/E/F/G/H/I
mkdir -p 2/A/B/C/D/E/F/G/H/I
mkdir -p 3/A/B/C/D/E/F/G/H/I
make sure you see the test folder, and expand it
expand folder 1, no need to expand all sub folders
expand folder 2
collapse and expand test folder
3 loses its expansion arrow
if all folders are expanded, only 3 keeps its order
if 1 and all its subfolders are expanded, then test is toggled,
folder 2 also loses its expansion arrow
```
Video of the bug:

The path to the bug is: `KFileItemModelRolesUpdater::slotPreviewFailed` -> `KFileItemModelRolesUpdater::applyResolvedRoles` -> `KFileItemModelRolesUpdater::rolesData` -> `KFileItemModelRolesUpdater::startDirectorySizeCounting`.
This causes Dolphin with preview plugins enabled trying to count the directories again, and the data gets reset even if there is something there. This then resets the `isExpandable` flag and that breaks the treeview, causing all kinds of issues, like being able to expand non-directories and makes things out of sync.
BUG:477607
|
|
Capturing an index is unsafe as it could be out of date when this is
processed. The user could have changed directory inserted a file or
changed sorting order.
|
|
|
|
GIT_SILENT
|
|
|
|
|
|
Hide progressInfo for listDir job on the non-recursize path.
BUG: 472912
|
|
QT_MAJOR_VERSION is undefined, the proper thing is QT_VERSION_MAJOR
This causes the plugin query to not find any plugins
Since we only target KF6 we might as well hardcode that
|
|
|
|
* speeds up incremental builds as changes to a header will not always
need the full mocs_compilation.cpp for all the target's headers rebuild,
while having a moc file sourced into a source file only adds minor
extra costs, due to small own code and the used headers usually
already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
resulting in those quickly processed, while the minor extra cost of the
sourced moc files does not outweigh that in summary.
Measured times actually improved by some percent points.
(ideally CMake would just skip empty mocs_compilation.cpp & its object
file one day)
* enables compiler to see all methods of a class in same compilation unit
to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
moc code being sourced into the cpp file there definitions can be ensured
and often are already for the needs of the normal class methods
|
|
|
|
This does not move the settings location in files though.
baby step for https://invent.kde.org/system/dolphin/-/issues/36
|
|
improve stopping, improve data caching
Two user visible changes:
* we can see the dir size changing as it is updated.
* This makes the file counting a lot more reactive, when changing directories for instance.
`KDirectoryContentsCounterWorker::walkDir` is not recursive anymore.
The cache is now shared and only a single thread is used to count size recursively.
|
|
CCBUG: 464722
|
|
|
|
|
|
NO_CHANGELOG
|
|
We do not read the metadata anywhere, consequently we can allow empty metadata.
Consumers now don't have to provide a file and we do no spend time parsing the JSON.
Task: https://phabricator.kde.org/T14538
|
|
Two changes:
* Prioritise size counting for visible path
* stop the worker when switching dirs
|
|
This makes the behavior of kernel cifs/nfs mounts the same as with kio's
smb://. It also helps reduce the chance of the UI hanging due to
opendir/readdir slowing down stat calls on the UI thread.
Signed-off-by: Andrew Gunnerson <[email protected]>
|
|
|
|
|
|
|
|
|
|
If this role isn't in the model yet, it would be `QVariant::Invalid`
which is obviously a distinct type from an empty string list.
This means `KFileItemModel::setData` treats them non-equal and
potentially does expensive operations on the model, which is
called every time a role is resolved in `KFileItemModelRolesUpdater`.
With this change, the number of pointless layout calculations is
significantly reduced.
|
|
This way we get a build time warning if the var isn't defined at all, e.g.
a missing check_include_files() CMake call.
|
|
|
|
Currently, Dolphin doesn't have the ability to sort by file extension (sorting by type means that files will be sorted by mimetype but not by extension). This MR fixes this shortcoming.
BUG: 429579
|
|
With this change (plus https://invent.kde.org/frameworks/kio/-/merge_requests/702), slow files will be treated as remote files for generating previews. This should make browsing local mounts of remote locations smoother.
|
|
|
|
Folder thumbnails are not cached as we cannot know whether something
inside a folder changed. Moreover, they are also a collage of several
files and might even traverse into subdirectories. This takes time.
|