┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
AgeCommit message (Collapse)Author
2019-11-19Port deprecated methodsLaurent Montel
2019-11-16Use URLs with transport encryptionYuri Chornoivan
2019-11-12Allow dolphin to format DateTime at later stage than KBalooRolesProviderMéven Car
Summary: KFileItemListWidgetInformant::roleText expected imageDateTime value to be a QDateTime but KBalooRolesProvider formatted it to QString previously, preventing KFileItemListWidgetInformant::roleText to format properly the imageDateTime BUG: 411173 Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25242
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-10-26When the selection is deselected, restart the keyboard search from the beginningMéven Car
Summary: BUG: 411538 FIXED-IN: 19.12 Test Plan: Open a directory with 3 files starting with the same letter. 1. Press this letter key twice 2. The second file is selected 3. Deselect the file with the mouse or using Esc 4. Wait 1 second 5. Press the same key again Before: The third file gets selected After: The first file get selected ctest Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23716
2019-10-20Avoid emitting twice twice selectionChanged when keyboard changes the ↵Méven Car
selection, fix slotChangeCurrentItem Summary: In KItemListController::slotChangeCurrentItem searchFromNextItem use was bugged : The two branches of `if (searchFromNextItem)` both looked for the next keyboard with indexForKeyboardSearch(text, currentIndex (the first one with just a +1 modulo). But when searchFromNextItem is false, we are supposed to start to look for the next indexKeyboard from the start of the list `0`, not from the `currentIndex` Reviewers: elvisangelaccio, #dolphin Reviewed By: elvisangelaccio, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24505
2019-10-10Refactoring: add shouldClearSearchIfInputTimeReached to ↵Méven Car
KItemListKeyboardSearchManager
2019-09-29KItemListHeaderWidget: drop unnecessary remove() callElvis Angelaccio
If a key is not in the hash, there is nothing to be removed.
2019-09-16[KStandardItemListWidget] Request the pixmap size we want and let the icon ↵Kai Uwe Broulik
loader scale it I noticed that depending on the configured icon size it would spend a significant amount of time in KPixmapModifier::scale. I don't see a point in requesting a fixed icon size and then scale it down manually as opposed to having the KIconLoader do the scaling for us. Especially for SVGs it could then even serve us a properly rendered SVG for this size rather than a scaled down pixmap version. Differential Revision: https://phabricator.kde.org/D22116
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-08-24Middle-elide file/folder labels so the extension is always visibleNate Graham
Summary: This ensures that the filename extension is always visible, and also is just a nicer way to elide file and folder names in general. BUG: 404955 FIXED-IN: 19.12.0 Test Plan: Details view: {F6648784} Icons view with limited label height: {F6648785} Reviewers: #dolphin, #vdg, elvisangelaccio, GB_2 Reviewed By: #dolphin, #vdg, elvisangelaccio, GB_2 Subscribers: GB_2, ndavis, rooty, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19471
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-07-17Fix rubber band not going away after right-clickJackson Reed McNeill
Summary: Fix rubber band not going away after right-click in the folder view Test Plan: Hold left click Drag to make rubber band Right click Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham Subscribers: elvisangelaccio, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21590
2019-06-24Fix minor typosYuri Chornoivan
2019-06-05Scroll when pressing PageUp/PageDownTranter Madi
Summary: Add `PageUp/PageDown` to the `navigationPressed` variable. Remove the `m_view->firstVisibleIndex()` and `m_view->lastVisibleIndex()` tests because sometimes it does not work correctly. BUG: 407118 Test Plan: Press PageUp/PageDOwn: it scrolls Press Up/DOwn: it always scrolls Reviewers: #dolphin, Zren, cfeck, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21573
2019-05-30handle maps with multiple or single entries from BalooAlexander Stippich
Summary: Handle maps which may contain multiple entries with the same key. Bumps frameworks to 5.58. Equivalent to D20739. Reviewers: #dolphin, elvisangelaccio, bruns Reviewed By: #dolphin, elvisangelaccio, bruns Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21157
2019-05-13Summary: Fixes crash when hiding devicesDavid Hallas
Summary: Fixes crash when hiding devices. The crash is caused by KStandardItem::setDataValue which calls the KStandardItemModel::onItemChanged function, and that function will delete the KStandardItem if the data value being set is the hidden attribute being set to true. To fix this KStandardItem now derives QObject so that we can use deleteLater. Test Plan: Right click a device in the places panel and select hide Right click the places panel and select show hidden Right click the hidden device and select show Right click the same device and select hide BUG: 403064 Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21050
2019-05-12Fix indentationElvis Angelaccio
GIT_SILENT
2019-05-12[Inline Rename] Move cursor to correct position on pressing Home and EndChinmoy Ranjan Pradhan
Summary: When pressing home or end key on a wrapped file name the cursor should move to beginning or end of the whole file name instead of the last line (which is the default behaviour of any textedit widget). BUG: 363179 Reviewers: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21031
2019-05-05Get rid of ugly static_cast usages in connect() callsElvis Angelaccio
2019-05-04Fix wrong apidoxElvis Angelaccio
There is no KStandardItemView class in dolphin. This apidox has been wrong since the beginning (see commit ae4d11d918938fd9087f2035dac). GIT_SILENT
2019-04-12Scroll to item if it's not visible on keyPressTranter Madi
Summary: Always scroll to item if it's not visible on keyPress, even if it's the current index. Test Plan: Select the last item, scroll up to make it not visible > press the `End` key > Dolphin now scrolls to that item. Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20152
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-03-01Use new display string function from KFileMetaDataAlexander Stippich
Summary: Delete all the custom formatting functions and use the ones provided from KFileMetaData. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: bcooksley, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19105
2019-02-24Fixes memory leak of KItemListHeaderDavid Hallas
Summary: Fixes memory leak of KItemListHeader The KItemListHeader passed the listView parent object to the QObject base class, but that pointer seems to always be nullptr causing the KItemListHeader to not be memory managed by anything. Instead simple use the listView as parent pointer. Test Plan: This leak was found using Address Sanitizer Reviewers: elvisangelaccio Reviewed By: elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D14453
2019-02-18Fix crash during shutdownDavid Hallas
Summary: Fix crash during shutdown. The root cause is that when Dolphin in stopped as part of an activity, the KItemListViewAccessible destructor is called after QApplication::exec has returned causing Qt to already having cleaned up the QAccessibleInterface instances kept in KItemListViewAccessible. Instead of storing the pointers to QAccessibleInterface we store the QAccessible::Id so that we can use the QAccessible::deleteAccessibleInterface function for deleting the instances. BUG: 402784 Test Plan: I wasn't able to reproduce the crash in the first place, but I have just opened and closed Dolphin a few times and verified the the QAccessibleInterface instances are correctly cleaned up. Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19083
2019-01-11Consti'fyLaurent Montel
2019-01-07Merge branch 'Applications/18.12'Alexander Stippich
2019-01-07fix display of image orientationAlexander Stippich
Summary: The name of the orientation property for baloo/kfilemetadata was false, leading to an always empty image orientation field. Test Plan: Look at an image in Dolphin details view which has the exiv orientation tag set. Orientation column is not empty. Reviewers: #dolphin, ngraham Reviewed By: #dolphin, ngraham Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D18008
2018-12-07Remove unused parameter warningShubham Jangra
2018-12-04Merge branch 'Applications/18.12'Elvis Angelaccio
2018-12-03KItemListWidget: Use initStyleOptionAnton Kreuzkamp
Instead of using QStyleOption::initFrom, let's use QGraphicsWidget::initStyleOption, which is made for exactly the purpose of KItemListWidget. This is especially important since, according to the docs of QGraphicsItem::paint "The widget argument is optional. [...] For cached painting, widget is always 0.". Even though currently no code in dolphin does cached painting, for the sake of modularity one should not rely on widget to be non-null. Using QStyleOption::initFrom does assume that, though. In fact, GammaRay asks the items to do cached painting when attaching it to the application, causing it to crash.
2018-12-02[KItemListController] Make event-handling functions privateElvis Angelaccio
There is no reason why these event-handling custom functions should be public, so make them private instead.
2018-12-02[KItemListController] Drop virtual keywordsElvis Angelaccio
We are never overriding these functions, so there is no reason to declare them virtual.
2018-12-02[KItemListController] Drop unused functionsElvis Angelaccio
2018-12-01Merge remote-tracking branch 'origin/Applications/18.12'Thomas Surrel
2018-12-01Fix selection when navigating back, with size sorting.Thomas Surrel
Summary: KItemListSelectionManager::itemsMoved (called when sorting by size) was re-activating anchor selection regardless if we actually were doing an anchored selection. This was leading to an incorrect selection when navigating back. BUG: 352296 Test Plan: In any folder, sort by size then move to a subfolder. Navigate back to the parent folder: only the parent folder should be selected. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, broulik, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17042
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-25Fix minor typosYuri Chornoivan
2018-10-24Merge branch 'Applications/18.08'Kai Uwe Broulik
2018-10-24[KStandardItemListWidget] Pass icon state to overlay painterKai Uwe Broulik
Ensures the overlay is painted in the same icon state, especially the selected one so dark overlays turn white. Differential Revision: https://phabricator.kde.org/D16307
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