┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
AgeCommit message (Collapse)Author
2019-09-08GIT_SILENT: minor qstring optimizationLaurent Montel
2019-09-01Make non-empty textual columns come first in sortingNazar Kalinowski
Summary: Current behavior of dolphin in sorting of files with textual columns (e.g. tags) is to show files without this particular textual column (e.g. without tags) first. This patch changes this behavior so that dolphin shows the files with some value before the files without any value for chosen sorting method. BUG: 410538 Test Plan: Sorting by name (isn't affected by the patch): https://i.imgur.com/eqbYwyZ.png Sorting by textual column ("tags" in this particular example), old version (non-tagged files and folders come first): https://i.imgur.com/5KLLujU.png patched version (tagged files and folders come first): https://i.imgur.com/oUAeZ2z.png Reviewers: #dolphin, #vdg, ngraham Reviewed By: #dolphin, #vdg, ngraham Subscribers: elvisangelaccio, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23482
2019-08-27Always periodically dispatch pending itemsKai Uwe Broulik
"Local" URLs can also be slow. This might jeopardize loading large local directories where a resorting could take place but imho it's better than leaving the user wondering when files will finally show up. However, it takes some time for KDirLister to initially signal items having been added, and only then our 2 second timer starts. Also, stop the timer when loading has completed. Differential Revision: https://phabricator.kde.org/D23460
2019-07-28Fix name grouping feature for cyrillic namesAndrey Yashkin
Summary: All files and folders with cyrillic names are placed in latin 'A' group. This patch fixes this issue. CCBUG: 406867 Test Plan: Make grouping by name in the dir with cyrillic files or dirs in it. See screenshots below. Before {F6985465} After {F6985459} Reviewers: #dolphin, ngraham, cfeck, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: hein, cfeck, ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22303
2019-07-28Revert "Fix name grouping feature for cyrillic names"Elvis Angelaccio
This reverts commit dc586ada63d1822fbbe38a0dd3449c73b03928e0. D22303 had a wrong diff. CCBUG: 406867
2019-07-28Fix name grouping feature for cyrillic namesAndrey Yashkin
Summary: All files and folders with cyrillic names are placed in latin 'A' group. This patch fixes this issue. BUG: 406867 FIXED-IN: 19.11.80 Test Plan: Make grouping by name in the dir with cyrillic files or dirs in it. See screenshots below. Before {F6985465} After {F6985459} Reviewers: #dolphin, ngraham, cfeck, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: hein, cfeck, ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22303
2019-05-12Fix indentationElvis Angelaccio
GIT_SILENT
2019-05-05Get rid of ugly static_cast usages in connect() callsElvis Angelaccio
2019-03-30[KFileItemModel] Fix alignment of rolesInfoMapElvis Angelaccio
GIT_SILENT
2019-03-27Add "Aspect Ratio" and "Frame Rate" to additional video information columnsKochih Wu
Summary: Add options to show aspect ratio and frame rate. BUG: 366524 FIXED-IN: 19.08.0 Test Plan: Under Control -> Additional Info -> Video, there should be options for aspect ratio and frame rate. Reviewers: #dolphin, #kde_applications, ngraham Reviewed By: #dolphin, #kde_applications, ngraham Subscribers: astippich, ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20074
2019-03-10port to std::stable_sortLaurent Montel
2019-03-09Fix context for QDateTime::toString() translationsElvis Angelaccio
Summary: The documentation of QDateTime::toString() says that: Any sequence of characters that are enclosed in single quotes will be treated as text and not be used as an expression. This means that translators cannot replace single quotes with other characters such as «...». This is now described in the context of the affected strings. We also check that the translated string contains exactly 2 single quotes, and we use the untraslated string otherwise. BUG: 401382 Reviewers: lueck, aacid, cfeck Subscribers: ltoscano, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D18769
2019-01-11Consti'fyLaurent Montel
2018-12-01Do not sort twice when changing role and order at the same timeThomas Surrel
Summary: When using the list header to change the role and order, if one changes the order to descending and then changes role, dolphin also changes the order back to ascending. This results in sorting the list of files twice in a row. This patch removes the first (useless) sort. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17111
2018-11-21Avoid warning when translatedtext is nullLaurent Montel
2018-10-10Update hidden state correctlyThomas Surrel
Summary: When renaming a file from '.hidden' to 'not_hidden', the file would still be displayed like a hidden file with a semi-transparent icon and a grey text. BUG: 399599 Reviewers: #dolphin, elvisangelaccio Reviewed By: elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D16115
2018-08-20Read UDS entry times directly and pretty-print on-demandKai Uwe Broulik
This avoids creating a QDateTime object with all the timezone processing that comes with it since we're only interested in the actual pretty date once we show the role to the user. Differential Revision: https://phabricator.kde.org/D14880
2018-07-26Compare UDS entry times directly instead of going through KFileItemKai Uwe Broulik
This avoids creating a QDateTime object with all the timezone processing that comes with it since we're only interested in the relative order, not absolute precise date time values. CHANGELOG: Sorting files by date is significantly faster now Differential Revision: https://phabricator.kde.org/D14394
2018-07-14Speedup sortJaime Torres
Summary: Uses a reference to the collator instead of copying and reinitializing it again and again. This is the reason for the speedup. Changing the implementation from a Functor class to a Lambda removes some boilerplate code, but is not relevant for performance. This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361 Just a single comparison to force the clean state of QCollator. Test Plan: Sorting in a directory with 82874 images: [TIME] Sorting: 19883 (before) [TIME] Sorting: 4198 (after) kfileitemmodelbenchmark before: .............. Passed 29.36 sec kfileitemmodelbenchmark after: .............. Passed 20.39 sec Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns Reviewed By: #dolphin, markg, elvisangelaccio Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D13814
2018-07-14Revert to change the commit message.Jaime Torres
Summary: This reverts commit 765cc968c9dfbd4350226b775377506135c0442d. Test Plan: revert-hammer Reviewers: Subscribers:
2018-07-13Speedup sortJaime Torres
Summary: Use a lambda function to use only one QCollator initialized only once. This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361 Just a single comparison to force the clean state of QCollator. Test Plan: Sorting in a directory with 82874 images: [TIME] Sorting: 19883 (before) [TIME] Sorting: 4198 (after) kfileitemmodelbenchmark before: .............. Passed 29.36 sec kfileitemmodelbenchmark after: .............. Passed 20.39 sec Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns Reviewed By: #dolphin, markg, elvisangelaccio Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D13814
2018-07-07A complete build does not fix the crashes I'm having.Jaime Torres
I prefer to wait until QQCollator is thread safe or someone discovers why this is happening now and not before. Summary: This reverts commit 63825de82f3adc9376b0f0f27e24e21bccf62e2a. Test Plan: revert-hammer Reviewers: Subscribers:
2018-07-06Speedup sortJaime Torres
Summary: Use a lambda function instead of a class. This way the member QCollator is not copied and initialized several times. Test Plan: Sorting in a directory with 82874 images: [TIME] Sorting: 19883 (before) [TIME] Sorting: 4198 (after) kfileitemmodelbenchmark before: .............. Passed 29.36 sec kfileitemmodelbenchmark after: .............. Passed 20.39 sec Reviewers: #dolphin, #frameworks, markg, elvisangelaccio Reviewed By: #dolphin, markg, elvisangelaccio Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D13814
2018-07-04Use more nullptrFriedrich W. H. Kossebau
2018-05-22Properly sort int rolesKai Uwe Broulik
Use integer comparison for word count, line count, track, and release year. BUG: 394355 Differential Revision: https://phabricator.kde.org/D12948
2018-04-01Split Image Size into Width/HeightJulian Schraner
Summary: This patch splits the single property "Image Size" into "Width" and "Height", providing more fine-tuned control for power users. FEATURE: 374559 Test Plan: - Sorting works correctly - No real change, only exposed differently Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: ngraham, elvisangelaccio Differential Revision: https://phabricator.kde.org/D11816
2018-03-10Fix some compile warningsRoman Inflianskas
Reviewers: markg, elvisangelaccio Reviewed By: markg, elvisangelaccio Subscribers: chehrlic, rkflx, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10995
2018-03-05Revert "Fix some compile warnings"Elvis Angelaccio
This reverts commit 533f050855a50212bba7be57a1590f9ce743e26d. D10995 has not been approved.
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-04Fix some compile warningsRoman Inflianskas
Reviewers: #dolphin, markg Reviewed By: markg Subscribers: elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10995
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
2018-02-04Fix all krazy #include warningsElvis Angelaccio
- "include own header first line" - "put config.h in angle brackets line" - "do not include QtModule/QtClass line" `QElapsedTimer` was implicitly included by kfileitemmodelsortalgorithm.h, now we need to explicitly include it in kfileitemmodel.cpp. We also need to explicitly link to `Qt5::Concurrent`, otherwise we cannot `#include <QtConcurrentRun>`.
2018-01-23Add option to sort for original dateJulian Schraner
Summary: Takes the original date a photo was taken out of the data provided by Baloo & makes it available to the user FEATURE: 303645 {F5671033} Test Plan: - Works with a batch of time-tagged photos - Can be hidden/shown/sorted like any other property Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: elvisangelaccio, ngraham Differential Revision: https://phabricator.kde.org/D10059
2018-01-18Merge remote-tracking branch 'origin/Applications/17.12'Luca Beltrame
Conflicts: CMakeLists.txt [versions] src/panels/places/placesitemmodel.cpp
2018-01-03Revive folderpanel when outside $HOMEMichael Heidelbach
Summary: Currently the folderpanel is inert when browsing outside of home because urls end up as 'file:////a/b/c' and since Qt 5.10 this is an invalid URL: http://code.qt.io/cgit/qt/qtbase.git/commit/?id=f62768d046528636789f901ac79e2cfa1843a7b7 Premptive bug fix. Test Plan: Open dolphin Leave home directory Reviewers: #dolphin, elvisangelaccio Subscribers: dfaure, elvisangelaccio, ngraham, anthonyfieroni Tags: #dolphin Differential Revision: https://phabricator.kde.org/D9610
2017-12-14Use Kio::KPlacesModel as source model for PlacesItemModelRenato Araujo Oliveira Filho
Summary: Use Kio::KPlacesModel as source model for PlacesItemModel avoiding duplicated code. Depends on D8862 Depends on D8332 Depends on D8434 Depends on D8348 Depends on D8630 Test Plan: Unit test created Reviewers: elvisangelaccio, emmanuelp, mlaurent, mwolff Reviewed By: elvisangelaccio, mlaurent, mwolff Subscribers: mwolff, mlaurent, anthonyfieroni, nicolasfella, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D8855
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-09-21Add Bitrate to Dolphin's Additional InformationNate Graham
Summary: Adds Bitrate to Dolphin's Additional information columns. BUG: 368418 Test Plan: Tested in KDE Neon. A bitrate column can be added and shows the bitrate in kb/s: {F3907210} Works for audio as well as video files! Reviewers: #dolphin, #kde_applications, broulik, aacid, dfaure, emmanuelp Reviewed By: #dolphin, #kde_applications, emmanuelp Subscribers: rkflx, alexeymin, anthonyfieroni Tags: #dolphin Differential Revision: https://phabricator.kde.org/D7763
2017-09-13Add "Release Year" column to Dolphin's Details viewNathaniel Graham
Summary: Adds a "Release Year" column to Dolphin's Details view. BUG: 384317 Test Plan: Tested in a KDE Neon VM. Reviewers: aacid, broulik, #kde_applications, #dolphin, alexeymin, emmanuelp Reviewed By: #dolphin, alexeymin, emmanuelp Differential Revision: https://phabricator.kde.org/D7776
2017-09-01Limit folder panel to home directory if inside homeRobert Hoffmann
Summary: Added the option to limit the displayed folders in the folder panel (F7) to the tree below the user's home directory if the current URL is inside the home directory. This can be configured in the preferences General/Behaviour tab by checking the corresponding check box. Reviewers: #dolphin, elvisangelaccio, emmanuelp Reviewed By: #dolphin, elvisangelaccio, emmanuelp Subscribers: emmanuelp, elvisangelaccio, #konqueror, #dolphin Differential Revision: https://phabricator.kde.org/D7477
2017-08-27Add Genre to additional information for audio files. Fixes T5599Francisco Navarro Morales
Summary: I have just imitated the code that made this funcionality for artist and album additional information for audio files. Reviewed By: #dolphin, emmanuelp CCBUG: 374558 Differential Revision: https://phabricator.kde.org/D7215
2017-07-18Add role for file creation time.Tobias C. Berner
Summary: At least on FreeBSD UFS and ZFS support birthtimes of files. Reviewers: #freebsd, #dolphin Subscribers: #konqueror Differential Revision: https://phabricator.kde.org/D6243
2017-06-20Support "Deletion Time" role in TrashKai Uwe Broulik
This allows to sort by and show (both as additional data in icon view and column in column view) deletion date of files in Trash. CHANGELOG: It is now possible to view and sort by "Deletion Time" in Trash BUG: 153492 FIXED-IN: 17.08.0 Differential Revision: https://phabricator.kde.org/D6269
2017-03-08Honor KFileItem isHidden() in viewKai Uwe Broulik
Instead of just assuming hidden files always start with a "." The items were already filtered out but when showing hidden files they weren't painted at reduced opacity. Differential Revision: https://phabricator.kde.org/D4978
2017-01-21Change "Date" to "Modified" and allow access to new "Accessed" time fieldDon Nguyen
This is merge of #128964 and #128942. This will impelement changing the "Date" field to "Modified" and allow a new "Accessed" time field to be available. This also includes changes to update configuration files. REVIEW: 129077
2017-01-21Dolphin: directory loading progressDon Nguyen
Everything is already set up to show the directory loading progress in the status bar, but the signal KFileItemModel::directoryLoadingProgress is never emmited anywhere. I connected it to KFileItemModelDirLister::percent. This was difficult to test because I had a hard time finding a directory that didn't load almost immediately. I was able to verify the fix by listing a remote directory of 20,000 files (see screenshot) REVIEW: 129619
2017-01-12Add document title to additional informationKai Uwe Broulik
Allows showing the document title of e.g. a PDF alongside the file name BUG: 321356 Differential Revision: https://phabricator.kde.org/D3972
2017-01-03Fix 2 container-anti-pattern clazy warningsIlya Bizyaev
REVIEW: 129752
2016-09-25Used KUrlMimeData::setUrls for kfileitemmodel's createMimeData for ↵arnav dhamija
implementing the upcoming stash:/ ioslave
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771