┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
AgeCommit message (Collapse)Author
2022-04-26Revert "Combine modificationtime, creationtime and accesstime roles into one ↵Eugene Popov
group" This reverts commit b6640f4a135dce194242644d9d0622c0964e8f1d.
2022-04-26Eliminate remarksEugene Popov
2022-04-26Combine modificationtime, creationtime and accesstime roles into one groupEugene Popov
2022-04-26Add the ability to sort by file extensionEugene Popov
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
2022-04-19Add additional Document role for "Author"Kai Uwe Broulik
It comes in handy when organizing your books collection
2022-03-15Fix some compile error against qt6Laurent Montel
2022-03-04Fix issue where newly inserted items end up in the wrong directoryDavid Edmundson
If we have directory "a" and "a/b" and expand both, then collapse "a" we tell KDirWatcher to stop watching both these directories. However, KDirWatcher keeps them in the listersCurrentlyHolding list as well as the listersCurrentlyListing list and will still notify of changes. If a new file appears in "a/b/" we will still get change notifications. When dolphin processes these changes we cannot find the relevant parent node. It then gets confused and inserts the item into the root directory from the POV of the model notifications. When we then open the relevant folder the model knows a node with that URL exists and fails to add it correctly. This can also be reproduced by continually downloading files into a subdirectory tree and rapidly expanding and collapsing folders a few levels deep.
2022-01-25Add "Dimensions" (width x height) roleKai Uwe Broulik
It is more convenient to use than individual width and height properties
2022-01-14Utilize ecm_set_deprecation_versions to exclude deprecated APIAlexander Lohnau
2022-01-13Port away from deprecated I18N*_NOOP macrosAlexander Lohnau
2021-12-13Drop now unneeded QOverload statementsAlexander Lohnau
By defining the KF_DISABLE_DEPRECATED_BEFORE_AND_AT and QT_DISABLE_DEPRECATED_BEFOREvalues, the deprecated overloads are hidden. This way we only have the un-deprecated one visible.
2021-11-28Properly display parent folders when filtering is active and items are added ↵Eduardo Cruz
or refreshed The methods slotRefreshItems(), slotItemsAdded() and slotItemsDeleted() are adapted so they are now compatible with the new behavior of filtering expanded folders achieved in ed83f37f06bd5c4b38c100503c3ad4dec2a87912. The new behavior is that expanded folders are hidden from view if neither the folder itself nor any of its contents passes the filter. Previously expanded folders would always stay visible no matter the filter. A bug where the parent expanded folder would disappear after adding or refreshing an item while filtering is also fixed. Tests are added to make sure these behavior changes won't regress. BUG: 442275 FIXED-IN: 22.04
2021-10-04Rewrite filter algorithm to properly support filtering with expanded folders ↵Eduardo Cruz
under Detail View mode. BUG: 411878 CCBUG: 442275 FIXED-IN: 21.12
2021-08-29Revert "Revert "Disable Hidden Files Last sort by default""Elvis Angelaccio
This reverts commit 272aa65bb55dd31f58e8a8e24ea7bc8bd2712daa.
2021-08-29Revert "Revert "Configurable Show hidden files and folders last toggle""Elvis Angelaccio
This reverts commit bb67def173f31819bb9a696627f9af71c7037dcd.
2021-08-29Revert "Revert "Show hidden files and folders last""Elvis Angelaccio
This reverts commit 63e12c0cdf4e3437b95b9c50e5791dbf97183687.
2021-08-29Merge branch 'release/21.08'Elvis Angelaccio
2021-08-29Filter the items that have changedEugene Popov
2021-08-14Simplify KFileItemModel's sortingChristian Muehlhaeuser
Returns from function as soon as we encounter a decisive comparison, while ensuring the fallbacks provide a stable sorting. Added comment to clarify the situation.
2021-08-06Revert "Show hidden files and folders last"Nate Graham
This reverts commit 996e430b62075c5b69571f141456dbe5f2956679. The accompanying feature to make the behavior configurable and disable it by default was reverted in 21.08, so we need to revert the feature itself as well and only ship it in 21.12, to avoid changing people's setting back and forth, which is often not well-received.
2021-08-06Revert "Configurable Show hidden files and folders last toggle"Heiko Becker
This reverts commit 50149d6abb8a0a978db3c6afb5238bc42a4a89c8. It breaks the string freeze and I don't think it can count as a bug fix, so it breaks the feature freeze, too. CCMAIL: [email protected]
2021-08-06Revert "Disable Hidden Files Last sort by default"Heiko Becker
This reverts commit fd2203bb3925edb5d657d49a706e26ea736362d2.
2021-08-05Merge branch 'release/21.08'Nate Graham
2021-08-05Disable Hidden Files Last sort by defaultChris Holland
2021-08-05Configurable Show hidden files and folders last toggleGaston Haro
CCBUG: 241227 Revision: https://phabricator.kde.org/D29115
2021-07-19Use KDirLister directly now that it emits a jobError() signalAhmad Samir
Since KIO 5.82, KCoreDirLister (the base class of KDirLister) emits a jobError() signal when the ListJob used internally emits an error. Drop KFileItemModelDirLister class, now redundant. This also bump the KF version to 5.82.
2021-07-13Ensure stable sort order when sorting by sizeChristian Muehlhaeuser
Folders with equal size caused the sort operation to become unstable, as the result of lessThan was non-deterministic. We need the fallback mechanisms at the bottom of the function to resovle the situation and provide a stable sort order. This also fixes expanding the contents of a folder into the wrong parent. BUG: 433247 FIXED-IN: 21.08
2021-06-27KFileItemModel: Allow to group files and folder togetherMéven Car
When folders size is available and unless sort dir first is set, folders and files can be grouped together in the regular size groups. Without this you can end up with multiple groups being added each time a folder size alternates with a file size. Relates to d520b417c97bdbdfece2a497dac8b5384a80b597
2021-06-03Tell translators to leave the ' aloneAlbert Astals Cid
2021-05-10Show hidden files and folders lastGastón Haro
Hidden files and folders are always displayed after not hidden files. BUG: 241227 Revision: https://phabricator.kde.org/D29115
2021-04-24InformationPanel: Allow to refresh the panel when its displayed content changesMéven Car
BUG: 430095 BUG: 412902 FIXED-IN: 21.08
2021-04-05KFileItemModel: DetailsModeSettings::directorySizeCount forces m_sortDirsFirstMéven Car
Before this patch when !m_sortDirsFirst and DetailsModeSettings::directorySizeCount() == true, the ordering of folders before files would be affected by the sortOrder. I.e descending order would put the folders after the files.
2021-03-07KFileModel: Let Sort dir first affect size sortingMéven Car
BUG: 433207
2021-02-09Port to QRecursiveMutexNicolas Fella
QMutex::Recursive is deprecated
2021-02-08Port away from deprecated KIO signalsAhmad Samir
Use KDirLister::listingDirCompleted(const QUrl &) instead of completed(const QUrl &).
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-01make sure we use valid iconsMartin T. H. Sandsmark
2020-10-24Use mutable iterators where requiredAlexander Lohnau
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-10-15Stop using QVariant < operatorElvis Angelaccio
It will be removed in Qt 6 without porting strategy: https://github.com/qt/qtbase/commit/f43cb31ba00a431c6d0a0b17750483a72ae03bb0 We know that that variants will be either ints (for `count`) or longs (for `size`), so just convert them to longs (to avoid overflows) and compare those.
2020-10-15Port to non-deprecated QString::split() variantElvis Angelaccio
This requires Qt 5.14, which we now depend on.
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-05-05Sort by file size according to DetailsModeSettings::directorySizeCountMéven Car
Test Plan: Sort by file size in details view. Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29424
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
2020-04-12Fix crashing on starting and quittingMartin T. H. Sandsmark
QCollator (especially with Qt 5.14 and ICU 65.1) is very unhappy with threads. To avoid having to lock and unlock the mutex everywhere (and ensure it is unlocked before calling other things that might lock it, etc.), we do it as locally as possible. Even if for some reason Qt and ICU make QCollator threadsafe in the future locking here should have minimal impact. BUG: 419585 Differential Revision: https://phabricator.kde.org/D28659
2020-01-28Add natural sorting and case-insensitive sorting for all role-typesGeorge Vogiatzis
Summary: Add natural sorting and case-insensitive sorting, for all role-types that benefit from. BUG: 406296 FIXED-IN: 19.12.2 Test Plan: Sort by any role type specified in `isRoleValueNatural()` Before: Sorting is always case sensitive After: Sorting according to 'Sorting mode' in configuration. Reviewers: #dolphin, nicolasfella, meven, elvisangelaccio, ngraham Reviewed By: #dolphin, meven, elvisangelaccio, ngraham Subscribers: cfeck, meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25741
2019-12-06Make it compile against last kf5 version without deprecated methodsLaurent Montel
2019-11-19Port deprecated methodsLaurent Montel
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT