┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
AgeCommit message (Collapse)Author
2026-03-09kitemviews: add "Folder Name" column to details viewJussi Räsänen
BUG: 433937
2026-02-16kitemviews: add duplicate column values to video details view where appropriateArie Miller
2026-02-11kitemviews: add columns for audio/video codec, color space, and pixel formatArie Miller
2026-02-01Support drop onto executable to run itKai Uwe Broulik
We already support dropping onto desktop files. This is also something that KDirOperator did but Dolphin does not.
2026-02-01Use currentMimeType for temp file filterKai Uwe Broulik
All temporary file types are identified by glob (file extension), so we don't need to resolve the final mime type here. The model filter is generic but effectively right now only used for filtering temp files. Should this change in the future, it needs to be revisited.
2026-01-22clang-tidy: fix modernize-loop-convertMéven Car
2026-01-20dolphinview: when creating a subfolder expand to it if in details modeMéven Car
So the new folder is in view.
2025-12-08kfileitemmodel: Fix folder/file icon rating displayPan Zhang
Fix the issue where enabling icon rating always showed five white stars. Retrieve the correct rating from KFileMetaData::UserMetaData for local files and insert it into the item data. This ensures both files and folders display the updated rating correctly. BUG: 512940
2025-09-03Fix several user-facing and non-user-facing typosKunda Ki
Found via `codespell -S "*.desktop,*.po,*.svg,*.xml,./po" -L aparent,childs,goup,lokal`
2025-02-17kfileitemmodel: allow more than 2 single quotes in translated stringsSergey Katunin
This change concerns `timeRoleGroup`.
2025-02-01Ignore diacritical marks for keyboard searchThomas Moerschell
When using keyboard search, normalize the item names and remove marks first. Now, items containing characters with marks can be found using keyboard search. BUG: 482394
2024-11-19natural sort: exclude extension when comparing filenamesEren Karakas
Currently natural sort compares the entire filenames (basename.extension) when sorting. This causes eg. "a 2.txt" to appear before "a.txt" when sorted by ascending. This is unintuitive since people prioritize basenames more than file extensions. Instead, change natural sort to compare by basename only and fallback to comparing extensions if basenames were equal. This change causes "a.txt" to appear before "a 2.txt" and matches how other platforms such as GNOME and Windows behave. BUG: 416025 BUG: 470538 BUG: 421869 BUG: 312027
2024-10-28Overhaul main view accessibilityFelix Ernst
This commit brings the main view of Dolphin into a usable state accessibility-wise. Users of screen readers should have a way better experience while browsing files and folders and navigating along the file system hierarchy. This commit fixes most of the remaining already-identified accessibility issues listed in https://invent.kde.org/teams/accessibility/collaboration/-/issues/28, but not all. Namely, these should now be fixed: 1. Orca should read the element type in dolphin (file, folder, device, link to folder, link to file) 2. Orca should read complete label in icon and compact view mode, currently it only speaks the name, but there could be additional information like the number of elements or the file size. 3. Orca is not able to announce Selecting / Unselecting files in Dolphin. It also never announces how many items are selected in total. (Announcing the total selection can be done by reading out the view element or by pressing the Tab key to get to the status bar with the relevant information.) 4. Dolphin opens on the home directory, but Orca doesn't tell you so. Consider enclosing the area in a frame/panel which updates its accessible name each time you modify the current path by entering or leaving a directory. 5. I don't know what the folder presentation widget is, but it should be presented as a grid view. Currently, we have a terrible experience because the entire row of folders is read at once, with no indication that we can move left and right with the arrows to go between the elements of a row. When I found that out, however, I discovered that when you're on the last icon of the first row and press right arrow, you get to the first icon of the next row, but that's not announced, instead, the whole row is announced at once 6. Orca should announce the current elements instead of "layered pane" when the Folder / File view gets the focus in dolphin 7. Orca reads only name in Table View only of Dolphin 8. Items are sometimes confusingly announced as "collapsed" in contexts in which there is no concept of collapsing/expanding e.g. in icon view mode. A lot of code was moved around and renamed. The three accessibility classes, which all used to be in the same file, are moved into separate files. *Acknowledgement* Thanks to Christian Hempfling and bgt lover for testing as well as originally identifying a lot of the pain points being addressed here. This work is part of a my project funded through the NGI0 Entrust Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology. https://kde.org/announcements/2024_ngi_openletter/
2024-10-19Add a sort by duration option for videosSomsubhra Bairi
BUG: 482508 Signed-off-by: Somsubhra Bairi <[email protected]>
2024-10-12KFileItemModel: fix `setData` in the renaming usageJin Liu
The `setData` function is used by inline renaming to update the `text` role (i.e. file name) in the model before actually do the renaming. However, the current implementation only updates `text` and url in KFileItem in this case, leaving the `url` role and the `m_items` cache untouched. This makes the cache incoherent, so `index()` won't find the renamed item. It also makes the `url` role incoherent with the `text` role. This also fixes the problem mentioned in bug #481561 where when inline renaming fails, it still shows the new name. (Because `m_model->index` fails to find the new name and rename it back on job failure.) BUG: 481561
2024-08-23Use QLocale to display localized time role groupJérôme Lécuyer
Use QLocale to format the QDateTime displayed as the role/label of a group. `QDateTime::toString` format the date and month names in English. `QLocale::toString` returns them localized. See the note about day and month names at https://doc.qt.io/qt-6/qdatetime.html#toString BUG: 488088
2024-07-22Notify users if authorization is required to proceedFelix Ernst
Previous to this commit entering a folder without read access would show the non-descriptive error message "Could not enter folder". If the user actually is not allowed to view the contents of the folder, this is indeed true and this commit will preserve this message as is. However, if an admin protocol is installed, users can actually view the contents of most folders after authorizing themselves as administrators. So this commit changes the error message in those specific circumstances to instead read "Authorization required to enter this folder." and provide a button to authorize themselves. This button is the "Act as Administrator" action. If no admin protocol is installed, this commit has no effect. The idea for this change came from Harald Sitter. I receive funding for changes like this by the Next Generation Internet Initiative, which (as I understand it) will no longer provide funds for future projects like this if the current EU draft budget goes through as it is.
2024-03-08Start autoActivationTimer only if hovering over a directoryAkseli Lahtinen
Before starting autoActivationTimer, check that we're hovering the item on top of a directory. If we don't check for it, the the autoActivationTimer will try to open the hovered item in it's default application, which can be distracting and break the actual action the user was trying to do, like moving the file to a directory. BUG:479960
2024-03-07Add option to completely disable directory size countingNico Kreipke
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:
2024-02-17Improve DnD handling in read-only dirsJin Liu
1. Places panel and tabbar update drag status in read-only dir 2. Don't create drop job in readonly directories
2024-01-23Slightly refactor count resortingFelix Ernst
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
2024-01-22Avoid sorting too frequentlyFelix Ernst
d98037745fe6b5efbe9b145da7d20fa2f731b6a6 changed the time from 500 ms to 50 ms. This commit changes it to 100 ms. Information relevant for sorting might change repeatedly. Prior to this commit here we would resort within 50 ms of sorting being requested. If a lot of resorts would be requested in a short time frame, this could lead to the item order changing within the view up to 20 times a second which would lead to a lot of unnecessary movement and make it impossible to read even file names during the repeated sorting. 100 ms is half as bad in that regard. Bigger values might be even better but it is a trade-off.
2024-01-14DolphinView: Use SingleShot and Queued ConnectionsAmol Godbole
A minor refactor where Qt::SingleShotConnection has been utilized. Also, signal delay using QTimer has been replaced with a Qt::QueuedConnection.
2024-01-13Add setting also hide application/x-trash files when hiding hidden filesMéven Car
BUG: 475805
2023-12-26Do not rely on KIO source-code compat codeAlexander Lohnau
2023-12-15Resort directory size count after refreshingAkseli Lahtinen
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
2023-12-15Change resortAllItemsInterval to 50msAkseli Lahtinen
Related to https://invent.kde.org/system/dolphin/-/merge_requests/675 Reduces the delay for sorting items when something changes
2023-09-10Merge remote-tracking branch 'origin/master' into kf6Méven Car
2023-09-10Replace qAsConst with std::as_constMéven Car
2023-09-04KFileItemModel: Delay emitting currentDirectoryRemoved() signalAmol Godbole
The KCoreDirLister object is modified before KCoreDirListerCache::deleteDir() returns because the signal currentDirectoryRemoved() is emitted. This prevents removal of the deleted lister from dirData.listersCurrentlyHolding in KCoreDirListerCache::forgetDirs() when the tab is closed, which causes the crash described in the bug. Hence, the signal currentDirectoryRemoved() is delayed to ensure this does not occur. BUG: 473377
2023-08-28Clean obsolete ifdefs since dolphin requires KF 5.101+Méven Car
2023-07-05Merge branch 'master' into kf6Nicolas Fella
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* 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
2023-06-28Merge branch 'master' into kf6Méven Car
2023-06-17Hide application/x-trash files following showHidenFilesMéven Car
BUG: 3212
2023-06-13Settings Add ViewModes > Content displayMéven Car
This does not move the settings location in files though. baby step for https://invent.kde.org/system/dolphin/-/issues/36
2023-05-26KDirectoryContentsCounter: show intermediate dir size counting results, ↵Méven Car
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.
2023-05-12Remove deprecated, ifdef'd code for old KIO versionsJakob Petsovits
2023-05-10Add a TODO KF6 to solve bug 464722Méven Car
CCBUG: 464722
2023-05-09Fix a bunch of Qt6/Kf6 warningsMéven Car
2023-03-16Prevent dragging on non-writable directoriesMéven Car
KFileItemModel::supportsDroppin now returns the rootItem when -1 is passed and checks for write access.
2023-02-15Consistent naming in tooltipsYuri Chornoivan
2023-02-14Add new settings for permissions column formatSerg Podtynnyi
Ability to configure column for the file/dir permissions in Numeric(Octal)/Textual/Combined style and update field display style to be right-alighed. Add toolips to column menu items BUG: 227745
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-02-04Add Page count and Publisher columnsSerg Podtynnyi
BUG: 374561
2022-11-29Exit the deleted directory when it is removedMéven Car
If current directory is a local file, try to find nearest dir ancestor and open it. Display warning to the user.
2022-11-28Port away from deprecated KDirLister APINicolas Fella
2022-08-21Fix sorting by file extensionEugene Popov
Folders don't have extensions
2022-05-31kfileitemmodel: sortRoleCompare: allow to sort by access time.Méven Car
We had all sorts of weird behavior when sorting by access time. The comparison was simply missing in sortRoleCompare.
2022-05-04REmove duplicate header between header/fileLaurent Montel