┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodelrolesupdater.cpp
AgeCommit message (Collapse)Author
2021-07-04Add support for hover sequence thumbnails (via ThumbSequenceCreator)David Lerch
This shows a slideshow of thumbs when the user hovers a file item.
2021-02-20KFileItemModelRolesUpdater: Avoid refreshing items when we receive their ↵Méven Car
content count It concerns the detail view. It can cause multiple preview to be generated for the same file. This is visible for directories whose icons use a random value for their inner files thumbnails. Only the view needs to be updated for this model change.
2021-02-17Apply 1 suggestion(s) to 1 file(s)Stefan Brüns
2021-02-15[FileItemRolesUpdater] Use STL-style iterator instead of iterating a copyStefan Brüns
QSet<T>::erase(it) is the save way of erasing from a QSet while iterating it. This saves creating a copy of the QSet, lookup of a node by value in `QSet<T>::remove(item)`, and repeated rehashing caused by `remove`.
2021-02-15[FileItemRolesUpdater] Reserve space in two temporary listsStefan Brüns
Reserve sufficient space to avoid reallocation later. Overallocating actually requires less memory than growing and copying it, and it is freed immediately after anyway.
2021-02-15[FileItemRolesUpdater] Fix reservation sizeStefan Brüns
The code below always adds the visible range, up to 5 pages before and after the visible range (each capped to ResolveAllItemsLimit/2) and the very first and last page (each up to m_maximumVisibleItems). Use this number to avoid growing the list later.
2021-02-15[FileItemRolesUpdater] Fix calculation of requested indexesStefan Brüns
In case the last and/or first page (a page being n=m_maximumVisibleItems items) overlapped the already inserted items, one item for each range would be inserted a second time, e.g. for the first page and last page: `beginExtendedVisibleRange == 0` => `endFirstPage := 0` => `0 <= 0` is inserted again. `count == 100; endExtendedVisibleRange == 99; m_maximumVisibleItems == 20` => `beginLastPage := 99` => `99 < 100` is inserted again.
2021-01-15fix folder size calculation on FUSE and network file systemsIlia Kats
KFileItem::isSlow uses hardcoded logic that returns true if the filesystem is Smb or Nfs. However, KFileSystemType::determineFileSystemTypeImpl on Linux returns Nfs also if the file system in question is a FUSE file system, which includes NTFS, sshfs, and others. BUG: 430778 BUG: 431106
2020-12-17fix display of folder sizes for empty foldersIlia Kats
also fixes 1 byte error in size calculation for all folders
2020-11-19Re-allow icons that are not theme iconMéven Car
Particularly concerned are .desktop files. See also: 15baa93640bbb49162f26d439e006729ee9c3441 BUG: 429113
2020-11-08Add missing referenceElvis Angelaccio
2020-11-08Iterate over a const copy list of containersIsmael Asensio
This effectively reverts the mutable iterations approach on 2448f88c5f42d7a2040fcf3bcd3c5f2a2f62cd03, and fix crashes and ghost items when using the filter bar BUG: 428374
2020-11-03FolderPanel: prevents scanning directory tree recursivelyMéven Car
KFileItemListView contents are periodically scanned by KFileItemModelRolesUpdater. It uses then KDirectoryContentsCounter to scan directories to determine their size possibly recursively. Introduce a scanDirectories setting to disable directory scanning by KFileItemModelRolesUpdater. BUG: 426617 FIXED-IN: 20.08.3
2020-11-01make sure we use valid iconsMartin T. H. Sandsmark
2020-11-01Fix warnings about scaling pixmapsMartin T. H. Sandsmark
2020-10-24Use mutable iterators where requiredAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-09-13Fix wreorder warningAyushmaan jangid
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2020-06-09Provide ability to configure size cut-off for local file previewsGastón Haro
Summary: FileWidgets read from kdeglobals the property "MaximumSize" under "PreviewSettings" to decide if a preview will be generated for that file. There is no current GUI to change that file size limit. On the other hand Dolphin ignores it. This patch aims to fix that by adding new configuration options to Dolphin. That is a new spinbox in Dolphin settings under General -> Previews tab. Test Plan: 1 - Set up a local folder with 2 jpg images of less and more than 1 MB respectively. 2 - Go to Dolphin Preferences. General -> Previews and check "JPEG Images" from the list. And set "Skip previews for files above:" to 1MB. 3 - Navigate to the afore mentioned folder. Only the image of size less than 1 MB should show a preview. BUG: 331240 Reviewers: ngraham, #dolphin, meven, elvisangelaccio Reviewed By: ngraham, #dolphin, meven, elvisangelaccio Subscribers: cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28402
2020-05-04[Details mode] Allow to fill the column size of directories with actual sizeMéven Car
Summary: Allow to compute the recursive size of directories to fill the details view size column. A setting allow to set a limit to the recursive level, allowing the user to have some power over the setting. When sorting by size and the feature is on, we get progressive ordering as the directory size are gathered. KDirectoryContentsCounter uses a cache internally to keep results so that it can display directory size faster, but counts the dir size of directories each time it is asked to count the size a directory nevertheless and when the size has changed, it is updated. KDirectoryContentsCounter uses one worker per instance only, meaning one process per view makes the disk spin. FIXED-IN: 20.08 BUG: 190580 BUG: 158090 Test Plan: With some recursion allowed: {F8267580} Without any recursion allowed (default): {F8267581} Reviewers: elvisangelaccio, ngraham, #dolphin Reviewed By: elvisangelaccio, ngraham, #dolphin Subscribers: feverfew, anthonyfieroni, iasensio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25335
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-01-11Consti'fyLaurent Montel
2018-12-07Remove unused parameter warningShubham Jangra
2018-10-25Fix minor typosYuri Chornoivan
2018-09-11Revert "[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve"Kai Uwe Broulik
Sometimes causes the first thumbnail to not be loaded :/ This reverts commit 033eb6b3a35ca60ce78ce7ccfeeec26d70205aa8.
2018-09-11[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolveKai Uwe Broulik
This avoids requesting a thumbnail twice for certain files, typically the first or last one in a folder. Differential Revision: https://phabricator.kde.org/D15404
2018-09-06Make thumbnail frame-and-shadow drawing criteria match those of the file dialogNathaniel Graham
Summary: KIO's file dialog already has logic to avoid drawing frames around images detected as likely to be icons, which is improved with D15071. Since Dolphin doesn't use KIO for any of this (boo) we have to pull it over here too; this patch brings the same feature to Dolphin, as well as the feature to disable frames and shadows for all thumbnails at very small sizes, which improves clarity. With this patch, Dolphin's frame drawing behavior becomes consistent with that of the file dialog (as of D15071). BUG: 295526 FIXED-IN: 18.12.0 Test Plan: Icons no longer have frames: {F6214279} Images without transparency still have frames: {F6214280} Nicer presentation for folders with mixed image types (images without transparency get frames; images without it don't): {F6214278} At small sizes, thumbnail clarity is improved by omitting the frame and shadow. Before: {F6214296} After: {F6214294} Reviewers: #dolphin, broulik, elvisangelaccio Reviewed By: #dolphin, broulik, elvisangelaccio Subscribers: markg, anthonyfieroni, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D15069
2018-07-11[KFileItemModelRolesUpdater] Fix preview scaling for frameless previewsKai Uwe Broulik
Follow-up to D11319 for e.g. folder previews Differential Revision: https://phabricator.kde.org/D14047
2018-04-01Use rightRef() instead of right()Elvis Angelaccio
As recommended by the clazy qstring-ref check.
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-03-03Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-11-16Use KConfig::readEntry()'s default argument properlyNathaniel Graham
Summary: Follow-on patch to D7440 to use KConfig::readEntry()'s default argument properly to reduce some unnecessary code Test Plan: Tested in KDE Neon. no regressions; by default, all plugins are enabled if the key is not set, and if it is set, user changes to the list are remembered Reviewers: #dolphin, elvisangelaccio, dfaure, apol Reviewed By: #dolphin, elvisangelaccio, apol Differential Revision: https://phabricator.kde.org/D8846
2017-11-15Turn on Dolphin icon previews by defaultNathaniel Graham
Summary: BUG: 338492 BUG: 350212 By default, turn on all preview plugins and turn on previews themselves. Depends on D8347 Test Plan: Tested this change in an up-to-date KDE Neon: removed the existing dolphinrc file, deployed Dolphin with the change, and observed that previews are now turned on for all file types for which a plugin exists except for text files, which are in the blacklist because they're mostly useless at nearly all icon sizes (still available in case people want them, though). Here's how Dolphin's main window looks by default now in KDE Neon: {F5441184} (You may notice that there are no previews for the video files; that's because Neon doesn't ship with any plugins for them, so that would be expected at this point) And here is how the Settings > General > Preview window looks like now by default: {F5435391} Reviewers: #dolphin, #vdg, markg, abetts, dfaure, aseigo, elvisangelaccio Reviewed By: #vdg, abetts, dfaure, elvisangelaccio Subscribers: abetts, cfeck, andreaska, emmanuelp, andreask, markg, broulik, anthonyfieroni, davidedmundson, ltoscano, dfaure, elvisangelaccio, #konqueror Tags: #dolphin Differential Revision: https://phabricator.kde.org/D7440
2017-02-18Apply the file preview shadow frame to most previews instead of only image ↵Diego Soenens
file previews The patch applies the shadow to all previews except for folders, fonts and Win32 exe/dll previews, similar to how Windows and MacOS handles it. REVIEW: 129918
2017-01-18Port away from deprecated KIO::Job::ui()Elvis Angelaccio
It's equivalent to KJob::uiDelegate() from kcoreaddons.
2016-06-25add_definitions(-DQT_NO_URL_CAST_FROM_STRING) + fix compilationDavid Faure
This fixes some URLs built from local paths without scheme.
2016-05-21Fix crash when closing split view with ownCloud plugin loadedMartin T. H. Sandsmark
KPluginLoader::instantiatePlugins() wraps QPluginLoader::instace(), which doesn't return a new object for each call, so if we set the KFileItemModelRolesUpdater instance as parent to the plugin the shared instance will be deleted leading to crashes when other instances of KFileItemModelRolesUpdater tries to use their plugin objects. To fix this, set the QApplication as a parent. BUG: 357479 REVIEW: 127930
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-12-13Fix compilation when baloo is not presentValentin Rusu
2015-11-28Fix wrong path->URL conversion.David Faure
2015-11-04Use the new KOverlayIconPlugin interface from KIO::WidgetsOlivier Goffart
REVIEW: 125675
2015-10-10Only perform operations with Baloo if it is enabledVishesh Handa
REVIEW: 125584
2015-03-27review commentsDavid Edmundson
2015-03-26Make KPixmapModifier::applyFrame handle high DPI imagesDavid Edmundson
2015-03-25Provide scaled pixmaps in the main file modelDavid Edmundson
2015-02-25Move the KVersionControlPlugin2 interface from konqlib to Dolphin and remove ↵Emmanuel Pescosta
the deprecated KVersionControlPlugin interface from konqlib REVIEW: 122687
2015-02-06Fix includesMontel Laurent
2014-10-27Port to QDebug*. KVBox--Montel Laurent