┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
AgeCommit message (Collapse)Author
2020-10-15Drop obsolete version checkElvis Angelaccio
We require Qt 5.14 now.
2020-10-15Port to non-deprecated QString::split() variantElvis Angelaccio
This requires Qt 5.14, which we now depend on.
2020-10-15Port away from QList::toSet()Elvis Angelaccio
The QSet range constructor requires Qt 5.14. In `DolphinView::slotHeaderContextMenuRequested()` the conversion from QList to QSet was pointless, so we just use a QList now.
2020-10-04Don't trigger rubberband with back/foward mouse buttonsAhmad Samir
Right now the back/foward mouse buttons work, but also if you hold either of them and move the mouse the rubberband selection is triggered. This is the correct fix (instead of commit d0c71a1435bc9d), to match the original code before the touch events patches, we need to check the back/foward buttons after mouseButtonPressed is emitted and before triggering the rubberbad selection.
2020-09-26Fix build failure after last commitElvis Angelaccio
2020-09-26Allow interaction with folder/files with the stylus againSteffen Hartleib
This Patch works for Wayland and X. BUG: 426582
2020-09-20Fix mouse back/forward buttonsAhmad Samir
We need to emit mouseButtonPressed (now in the onPress method) before the check needed to not select items on back/foward mouse button press events.
2020-09-13Improve Touch supportSteffen Hartleib
With this patch dolphin now supports the following touch gestures: * Tap gesture to interact/open with directories, files and so on * TapAndHold and release gesture for access to the context menu (main window, panel folder, places and information) * TapAndHold and moving gesture for drag and drop action (main windows, panel folder and places) * pinch gesture for zoom in main window * kinetic scrolling (QScroller) for main window, panel folder, panel places, panel information, setting preview and service * two fingers swipe gesture to left, right and up as shortcut to navigate back, forward and up * two finger tap gesture to toggle item selection, similar to Ctrl and left mouse click FEATURE: 385066 FIXED-IN: 20.11.80 You are currently rebasing branch 'touch' on '85241a924'.
2020-09-13Fix wreorder warningAyushmaan jangid
2020-09-05Merge branch 'release/20.08' into masterElvis Angelaccio
2020-09-05Revert "Set a better defaultDropAction for dragging"Elvis Angelaccio
This reverts commit 4440e961a07aaee5b5da7c8967ff05de14808ad4. BUG: 425757 BUG: 426196 FIXED-IN: 20.08.2
2020-08-31Port away from deprecated Qt::MidButtonLaurent Montel
2020-08-30Merge branch 'release/20.08'Alexander Lohnau
2020-08-30Fix file preview for desktop files with absolute icon pathsAlexander Lohnau
BUG: 423326 FIXED-IN: 20.08.1
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-08-17Port away from QWheelEvent::orientation()Elvis Angelaccio
We are supposed to use QWheelEvent::angleDelta() instead. Upon an horizontal/vertical scroll event, its `x()`/`y()` method will return a value different from zero.
2020-07-12Fix selection rect after porting from QFontMetrics::width()Ismael Asensio
After porting from QFontMetrics::width() to QFontMetrics::boundigRect().width() in system/dolphin!10 we have a visual bug on selection rects, that can be seen on details and compact modes. While from https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/ the use of `boundingRect()` would seem the right option to use (and I struggle to get the difference between the two methods when applied to a whole string and not a single char), in this case the `horizontalAdvance()` seems to return the value we need. BUG: 421973 FIXED-IN: 20.07.70
2020-07-12Fix selection rect after porting from QFontMetrics::width()Ismael Asensio
After porting from QFontMetrics::width() to QFontMetrics::boundigRect().width() in system/dolphin!10 we have a visual bug on selection rects, that can be seen on details and compact modes. While from https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/ the use of `boundingRect()` would seem the right option to use (and I struggle to get the difference between the two methods when applied to a whole string and not a single char), in this case the `horizontalAdvance()` seems to return the value we need. BUG: 421973 FIXED-IN: 20.07.70
2020-07-06Port away from QLinkedListElvis Angelaccio
`QLinkedList` has been deprecated and should not be used in new code. Port to `std::list` instead.
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-31Fix FIFO usageElvis Angelaccio
`m_propriorityQueue` and `m_queue` are used as FIFO queues, so we need to use `takeFirst()` instead of `takeLast()` when removing elements from the queue. While at it, add a comment so that we will remember these are FIFO queues.
2020-05-29Port away from deprecated QFontMetrics::width()Elvis Angelaccio
While the documention says to port to QFontMetrics::horizontalAdvance(), what we actually need is not the horizontal advance, but the width of the text. So we need to port to QFontMetrics::boundingRect().width(). Quoting from https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/: "Since it was not clear from the confusingly named function QFontMetrics::width() that it actually returned the horizontal advance, instead of the bounding width, this method is now obsolete. You must port to either QFontMetrics::horizontalAdvance() or QFontMetrics::boundingRect().width(). Please make sure you are aware of the difference, and do not port blindly. I am pretty sure that in most cases QFontMetrics::boundingRect() is what you want, unless you are writing custom text shaping/layouting code. Using the wrong function can cause clipped text or text that suddenly wraps to the next line despite calculating the width that it needs."
2020-05-28Port to non-deprecated variant of QPixmapCache::find()Elvis Angelaccio
We need to pass the pixmap by address, not by reference.
2020-05-28Add some missing const qualifiersElvis Angelaccio
2020-05-25KDirectoryContentsCounter: scan first path not in cacheMéven Car
Use a secondary QLinkedList to store the priority path.
2020-05-20KDirectoryContentsCounter: don't schedule scanning a folder already in the QueueMéven Car
Use a QLinkedList to check for presence in the queue. merge request !2
2020-05-18Merge branch 'release/20.04'Méven Car
2020-05-18Left-elide file/folders while keeping their extension visibleMéven Car
Summary: Tweak behavior introduced in D19471. BUG: 404955 Test Plan: Before: {F8325282} After: {F8325283} {F8325284} Reviewers: ngraham, #dolphin, elvisangelaccio, #vdg Reviewed By: ngraham, #dolphin, elvisangelaccio, #vdg Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29794
2020-05-06Port QRegExp to QRegularExpressionAhmad Samir
Summary: Port QRegExp::exactMatch() with QRegularExpression::anchoredPattern(). Port QRegExp::Wildcard with QRegularExpression::wildcardToRegularExpression(). Note that QRegularExpression::wildcardToRegularExpression() returns an anchored pattern. Test Plan: Using the filter bar in dolphin works as before. All unit tests pass, except: - kfileitemmodeltest (which is unrelated AFAICS); it fails on master too - placesitemmodeltest, which fails on master too Reviewers: #dolphin, elvisangelaccio, meven Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26215
2020-05-06Keep name readable on drag to matching backgroundChristian Christiansen
Summary: Previously, when a single item was selected and dragged, the name would become unreadable when the text colour matched the background colour it was dragged onto. This is now fixed by not deselecting the item (and hence keeping the highlighting around the text) before creating the pixmap for dragging. BUG: 405266 Test Plan: Tested with Breeze and Breeze Dark. Reviewers: #dolphin, elvisangelaccio, meven Reviewed By: #dolphin, elvisangelaccio, meven Subscribers: meven, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29378
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-05Fix Windows BuildMéven Car
Summary: Due to D25335 Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29425
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-13Merge branch 'release/20.04'Alexander Lohnau
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-03-30Set a better defaultDropAction for draggingTranter Madi
Summary: Because we use KIO::DropJob to determine the dropAction, so changing this one does not change anything else except the default cursor from the copy icon to the closed-hand one. Test Plan: Drag files without holding any modifier key and see the cursor. Reviewers: #dolphin, ngraham Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28370
2020-03-25Update dragCursor while draggingTranter Madi
Summary: While dragging, the user could want to change the modifier, so we should call event->acceptProposedAction() to do update the dragCursor. FIXED-IN: 20.04.0 Test Plan: While dragging files, change modifiers between Ctrl/Shift/Alt... and move the mouse at least 1px to see the cursor changes. Reviewers: #dolphin, meven, ngraham, davidedmundson, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28017
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
2020-01-27Merge branch 'release/19.12'Nate Graham
2020-01-27Change drop indicator colorGeorge Vogiatzis
Summary: Change drop indicator color form highlight to text. This makes more visible, when indicator is adjacent to a highlight item, of a list. BUG: 415010 Test Plan: Before vs After {F7974679} Reviewers: #dolphin, #vdg, elvisangelaccio, ngraham Reviewed By: #dolphin, #vdg, ngraham Subscribers: meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26936
2020-01-12Get rid of -Wdeprecated-copy warningIsmael Asensio
Summary: Remove the explicit copy constructor of `KItemListStyleOption`, since it does not add any logic to what the implicit copy constructor does, but triggers a compiler warning if we don't overload `operator=` too. Test Plan: Compiles without `-Wdeprecated-copy` warning No behavior changes Reviewers: elvisangelaccio, #dolphin Reviewed By: elvisangelaccio, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26585
2020-01-11Add only canonical paths to dirWatcherRobert Hoffmann
Summary: KDirWatch only works correctly with canonical paths, i.e. symbolic links resolved. Test Plan: 1. Create dirs: $ mkdir test1 $ mkdir test1/subdir $ ln -s test1 test2 2. Start dolphin, navigate to test2/subdir, then in terminal: $ echo test > test2/subdir/test Without the patch, test2/subdir/test won't be shown automatically, only after reload (F5). With the patch applied, test2/subdir/test will be shown automatically. 3. Restart dolphin, navigate to test2/subdir, then in terminal: $ echo test >> test2/subdir/test Without the patch, the increased size of test2/subdir/test won't be shown automatically, only after reload (F5). With the patch applied, it will be shown automatically. 4. Restart dolphin, navigate to test2/subdir, then in terminal: $ rm test2/subdir/test Without the patch, test2/subdir/test stays visible, will only disappear after reload (F5). With the patch applied, it will disappear automatically. Reviewers: dfaure, #dolphin, elvisangelaccio Reviewed By: dfaure, #dolphin, elvisangelaccio Subscribers: ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25732
2020-01-06Don't use nullptr for flag. Just use default argument hereLaurent Montel
2019-12-26Don't use nullptr/0 as flags (deprecated in qt5.15)Laurent Montel
2019-12-21Merge branch 'release/19.12'Nate Graham
2019-12-21Improve scroll wheel speed by basing it on label height, not icon heightNate Graham
Summary: Dolphin currently scrolls by the height of three items at a time per "step" when using a scroll wheel. Because item height is highly variable, this leads to scroll speed being inconsistent between views, and generally far too fast when using icon view with icons larger than 22px size. This patch makes the size of the scroll step based on the text label rather than the icon size just like D25683, ensuring that the scroll speed does not vary and become super fast when using large icons in particular. It also reverts 90beb4a5e37b887caad1e767046a42dad0af1ab3, which is no longer needed. BUG: 386379 FIXED-IN: 19.12.1 Test Plan: Use a mouse with a scroll wheel and scroll in Dolphin item views with list view, details view, icon view, etc, using different item sizes. Speed should be consistent in all views now, and also feel consistent with other KDE apps. Also try with multiple scale factors to make sure the behavior does not change. No change with high-resolution two-finger touchpad scrolling. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: ahiemstra, lots0logs, anthonyfieroni, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19190
2019-12-19GIT_SILENT: Port deprecated QSet::toList methodLaurent Montel
2019-12-09Merge branch 'release/19.12'Antonio Rojas
2019-12-09Fix build with Qt 5.14 RCAntonio Rojas
Add needed Qt includes that are no longer pulled transitively. BUG: 414492 Differential Revision: https://phabricator.kde.org/D25783
2019-12-06Make it compile against last kf5 version without deprecated methodsLaurent Montel