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
The `filename` term in a search query is enclosed into quotes.
As the user can have additional quotes in the search term, there were several
corner cases where the parsing would fail to correctly split the terms
New test cases have been added to cover this possibility
Previous tests still passes to avoid regressions
BEFORE:
```
(filename/quoted) Compared values are not the same
Actual (query.text()): "xyz\"\""
Expected (expectedText): "\"abc xyz\""
(filename/mixed) Compared values are not the same
Actual (query.text()): "xyz\" tuv\""
Expected (expectedText): "\"abc xyz\" tuv"
(content+filename/quoted) Compared values are not the same
Actual (query.text()): "abc xyz xyz\"\""
Expected (expectedText): "abc xyz filename:\"\"abc xyz\"\""
```
When the user is entering a search term, a delayed search will be
emmited after a few seconds. This means updating the search URL, which
in turn gets parsed and reflected back on the search input.
To avoid interrupting the user input flow and unexpectedly move the
cursor to the end, let's update the input search box only when it
doesn't have the focus.
It's still updated on other interactions such as changing the search
options or clicking a saved search on the places panel.
BUG: 423328
FIXED-IN: 20.08
KIO actually uses "alwaysAsk", "execute", and "open" as possible values.
When reading the setting, map unknown values to "open" like KIO does.
That also provides compatibility with older dolphin versions.
BUG: 421294
FIXED-IN: 20.04.3
* Adds a "Copy location" item, after the "Copy" Context item and Edit Menu, which will attempt to copy the path of the fist item into clipboard.
## Reasoning
Most File Managers have this option through one or another way.
Also using the default Copy option often results in different behaviour depending on the target software, Konsole will take the path. Other Programs will use the URI. Which ultimately could lead to non optimal User Experience.
## Notes
* Should the target file **not** be on a local hard drive, this fallback to using the remote URL, feedback is wanted on that matter.
FEATURE: 407004
In preparation for AFC support in KFilePlacesModel.
This needs to go into stable since otherwise once Solid announces
AFC devices Dolphin would see them but try to open them as MTP URL
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
For unknown reasons, when I implemented this feature, I turned off
progress notifications. I don't think this makes any sense, and we just
got a bug report about it.
Accordingly, this patches turns on progress notifications.
BUG: 422335
FIXED-IN: 20.04.2
`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.
When the font height is more than the zoom slider height, use the former
to set the fixed height of the free space widget on the status bar.
Otherwise the text is cut-off.
This works with Breeze, Oxygen and Fusion styles.
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."
While this reduces test-coverage in cases where the user doesn't have
Ruby or the testing gem installed, it at least allows us to get
through configure and build without disabling **all** testing.