It will be removed in Qt 6 without porting strategy:
f43cb31ba0
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.
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.
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 d0c71a1435), 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.
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'.
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.
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
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
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
`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.
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."
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
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
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
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
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
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
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
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
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
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
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 90beb4a5e3, 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