Commit graph

6072 commits

Author SHA1 Message Date
Nate Graham 15928112ce Make "Show hidden files" action follow HIG
The action is a toggle action, for which the HIG prescribes that the
text should describe the action's checked state, and neither the text
nor the icon should change when the action is checked. Other toggle
actions in Dolphin follow these rules, but this one does not.

This commit makes the action follow those rules.
2020-09-22 20:22:43 +00:00
Ahmad Samir 9b83378c08 Check protocol Class before creating a StatJob
StatJob::mostLocalUrl only works with ":local" protocols, adjust the code
accordingly.

Make the code async.

Remove activeContainerLocalPath() method as it isn't needed anymore.

Drive-by change: minimum required version of Qt should be 5.12 because
that's what KF >= 5.73 already requires.
2020-09-20 21:29:23 +00:00
Ahmad Samir d0c71a1435 Fix mouse back/forward buttons
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-20 18:38:29 +02:00
Alexander Lohnau 827b79f5c8 Exclude trash settings from windows 2020-09-20 10:11:37 +02:00
l10n daemon script a32cb1c915 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-20 09:20:49 +02:00
Ayushmaan jangid bb85b6267a Fix unused variable warning 2020-09-18 17:21:37 +00:00
l10n daemon script 65c2d95a7d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-14 09:58:23 +02:00
l10n daemon script 1d47e96913 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-14 06:15:19 +02:00
l10n daemon script 7d3e9f726b GIT_SILENT made messages (after extraction) 2020-09-14 02:33:22 +02:00
Ahmad Samir b3c815d615 Fix style, not space between method name and (; improve wording
GIT_SILENT
2020-09-13 22:14:34 +02:00
Steffen Hartleib d7b33b76a1 Improve Touch support
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-13 18:53:32 +00:00
Ayushmaan jangid d899c2b401 Fix wreorder warning 2020-09-13 17:52:09 +00:00
Ahmad Samir 2abf1c9ddb TerminalPanel: StatJob::mostLocalUrl only works with ":local" protocols
StatJob::mostLocalUrl was changed to cancel the job automatically if the
protocol Class isn't ":local", mostLocalUrl only makes sense with ioslaves
that actually set UDS_LOCAL_PATH (which should have calss ":local").

I tested that kio-fuse still works, when having the terminal panel open and
changing direcotries in Dolphin, with an sftp:// server.
2020-09-13 16:49:43 +02:00
Carl Schwan ef68a41250 Update org.kde.dolphin.appdata.xml homepage url 2020-09-13 06:53:44 +00:00
Alexander Lohnau c31b08cf61 Do not build KCMs on windows 2020-09-10 22:37:21 +00:00
l10n daemon script 214b017266 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-10 10:12:36 +02:00
l10n daemon script ae5ac1dbb8 GIT_SILENT made messages (after extraction) 2020-09-10 08:53:28 +02:00
l10n daemon script 98acc7f193 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-10 06:35:50 +02:00
l10n daemon script 736c9958e7 GIT_SILENT made messages (after extraction) 2020-09-10 02:35:51 +02:00
Carl Schwan e8386a80ea Port to modern SPDX identifier 2020-09-09 21:39:03 +00:00
l10n daemon script ddccf4f320 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-09 06:36:13 +02:00
l10n daemon script f73917872a GIT_SILENT made messages (after extraction) 2020-09-09 02:44:30 +02:00
Nate Graham 67ebd66f94 Merge branch 'release/20.08' into master 2020-09-08 13:38:38 -06:00
Nate Graham 9fffa4b253 Fix untranslated spinbox suffix strings
BUG: 426286
FIXED-IN: 20.08.2
2020-09-08 10:59:34 -06:00
Elvis Angelaccio 576a97d8eb Merge branch 'release/20.08' into master 2020-09-05 22:55:59 +02:00
Elvis Angelaccio aee26d29f1 Revert "Set a better defaultDropAction for dragging"
This reverts commit 4440e961a0.

BUG: 425757
BUG: 426196
FIXED-IN: 20.08.2
2020-09-05 22:51:36 +02:00
Alexander Lohnau 8e2f0a1d5b Clear services model after KNS entries changed
We can not know if a service got deleted, so we clear
the model and reload the services. The issue that the entries are
not uninstalled has already been solved, this is just a patch to
fix the state of the UI.

CCBUG: 420312
2020-09-05 17:32:48 +00:00
l10n daemon script a1d5d75bea SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-03 06:10:45 +02:00
l10n daemon script 745fdeece3 GIT_SILENT made messages (after extraction) 2020-09-03 02:33:12 +02:00
l10n daemon script 49b07b3c5c GIT_SILENT made messages (after extraction) 2020-09-02 02:39:58 +02:00
l10n daemon script 4b438da3cb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-01 10:13:23 +02:00
l10n daemon script d624af1091 GIT_SILENT made messages (after extraction) 2020-09-01 08:46:02 +02:00
l10n daemon script f15f74e241 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-01 06:25:15 +02:00
Laurent Montel 7479fef799 Port away from deprecated Qt::MidButton 2020-08-31 21:24:03 +02:00
Christoph Feck 6ffa7f460e GIT_SILENT Update Appstream for new release 2020-08-31 20:52:32 +02:00
Christoph Feck eafaca44da GIT_SILENT Update Appstream for new release
(cherry picked from commit 6ffa7f460e)
2020-08-31 20:52:32 +02:00
Alexander Lohnau e8c4500459 Do not build KNS installer and KNS button on Windows 2020-08-31 16:57:03 +00:00
Alexander Lohnau 8d7775b174 Allow Open Terminal action on Windows 2020-08-31 08:21:59 +00:00
Alexander Lohnau 5360bc3ab3 Merge branch 'release/20.08' 2020-08-30 18:49:22 +02:00
Alexander Lohnau 004734e832 Fix file preview for desktop files with absolute icon paths
BUG: 423326
FIXED-IN: 20.08.1
2020-08-30 18:46:32 +02:00
Nikita Churaev 7c2559dd0b Text style fixes 2020-08-26 03:37:31 +03:00
Elvis Angelaccio 6072005ddc Merge branch 'release/20.08' into master 2020-08-26 00:49:00 +02:00
Alexander Lohnau e42f42fa27 Fix nullptr crash on Windows 2020-08-25 19:36:03 +02:00
Elvis Angelaccio 954e8c4790 Output of licensedigger + manual cleanup afterwards.
Unfortunately licensedigger does not strip the trailing * characters.
While at it, use a common style for all source files.
2020-08-25 17:07:38 +00:00
Nate Graham a47d8c0e97 Change group spacing from 18px to 12px
This is the value used in QML-based software, so now Dolphin's form
layout settings dialogs look consistent.
2020-08-24 12:35:08 -06:00
Elvis Angelaccio 438620f2b7 Merge branch 'release/20.08' into master 2020-08-23 23:54:23 +02:00
Nazar Kalinowski 771b9c8fc2 Fix 'show space' setting not being re-applied
BUG: 425542
2020-08-23 23:52:13 +02:00
Ahmad Samir 257eeebf4b Port KRun to OpenUrlJob
In DolphinMainWindow, since KRun allows running executables by default, use
setRunExecutables(true) so as not to change the behaviour.

Remove the now redundant slotHandleUrlStatFinished, that whole StatJob
logic is now handled by OpenUrlJob.

Bump KF required version to 5.73, since that's where
OpenUrlJob::setShowOpenOrExecuteDialog was introduced.
2020-08-18 08:43:58 +00:00
Elvis Angelaccio 864b59fcf1 Port away from QWheelEvent::orientation()
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-08-17 20:19:44 +00:00
Yuri Chornoivan 97a14db70d Merge branch 'release/20.08' 2020-08-08 15:57:02 +03:00
Yuri Chornoivan df85f24ecb Fix i18n 2020-08-08 15:34:17 +03:00
Christoph Feck 5c41350eec Merge branch 'master' of invent.kde.org:system/dolphin 2020-08-05 09:43:32 +02:00
Christoph Feck e9e74dcad9 GIT_SILENT Update Appstream for new release
(cherry picked from commit a499df21bc)
2020-08-05 09:42:52 +02:00
Christoph Feck a499df21bc GIT_SILENT Update Appstream for new release 2020-08-05 09:42:51 +02:00
Ismael Asensio 73cac464c5 Merge branch 'release/20.08' 2020-08-04 22:39:11 +02:00
Ismael Asensio f9fd0e7be3 [search] Close tags menu after click when there is only one tag
It stays open otherwise to allow checking/unchecking several tags at a time

BUG: 424873
FIXED-IN: 20.08
2020-08-04 22:34:05 +02:00
Antonio Rojas 7bbae2940d Merge branch 'release/20.08' into master 2020-08-02 18:51:03 +02:00
Antonio Rojas 48158d7079 Remove MaximumSize entry from kdeglobals when settings the preview file size limit to "No limit"
Instead of setting it to 0, which KIO's PreviewJob interprets as "No previews", breaking previews in konsole and Plasma desktop

BUG: 424403
2020-08-02 16:45:15 +00:00
l10n daemon script 52a7af86c5 GIT_SILENT made messages (after extraction) 2020-08-02 07:59:53 +02:00
l10n daemon script 4c3924d923 GIT_SILENT made messages (after extraction) 2020-08-02 02:29:12 +02:00
Timothée Ravier 6faaf3e9e8
Icon: Update with latest breeze icon 2020-07-26 12:11:13 +02:00
l10n daemon script e25d3c9bba GIT_SILENT made messages (after extraction) 2020-07-23 02:35:24 +02:00
Nate Graham bb7bdbc911 Merge branch 'release/20.08' 2020-07-19 12:23:25 -06:00
Antonio Rojas ce981c3e4a Fix "Show folders, tabs, and window state from last time" feature
We were using the DBus interface before declaring it, oops.

BUG: 422300
FIXED-IN: 20.08.0
2020-07-19 08:03:56 -06:00
Alexander Lohnau 00e4571e3c Fix deprecated knsrc file location
This fixes the `kf.newstuff.core: Using a deprecated location for the knsrc file "servicemenu.knsrc"` warning.
2020-07-18 16:43:43 +02:00
Alexander Lohnau be182ae30b Fix deprecated knsrc file location
This fixes the `kf.newstuff.core: Using a deprecated location for the knsrc file "servicemenu.knsrc"` warning.
2020-07-17 19:31:03 +02:00
l10n daemon script 1995668f8e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-15 05:52:19 +02:00
Laurent Montel 675699dfc0 Use camelcase includes (scripted) 2020-07-13 14:03:00 +02:00
Ismael Asensio bf2eb0d69d Fix selection rect after porting from QFontMetrics::width()
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-12 23:30:14 +02:00
Ismael Asensio 76a46fd909 Fix selection rect after porting from QFontMetrics::width()
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-12 21:28:02 +00:00
Ismael Asensio 2fc117703f Add support to tags: scheme in DolphinQuery
It allows to start a search from a `tags:/mytag/` view.
The use case is to refine a search on additional terms (another tags,
ratings, etc)
2020-07-11 18:33:58 +00:00
Elvis Angelaccio 85241a9246 Port away from QLinkedList
`QLinkedList` has been deprecated and should not be used in new code. Port
to `std::list` instead.
2020-07-06 07:16:27 +00:00
Ismael Asensio ee97db4dfc [search] Fix corner cases when using quotes in filenames
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\"\""
```
2020-07-05 17:15:31 +00:00
Ismael Asensio ec03435022 [search] Do not update text input when it has focus
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
2020-07-05 17:14:19 +00:00
Elvis Angelaccio 275d7b537d Merge branch 'release/20.04' 2020-07-05 17:26:52 +02:00
Wolfgang Bauer 7a6956da99 Write correct value for "Open in application" script execution setting
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
2020-07-05 15:22:47 +00:00
Christoph Feck bbae04bc4e GIT_SILENT Update Appstream for new release
(cherry picked from commit a91d1db062)
2020-07-03 22:53:42 +02:00
Christoph Feck a91d1db062 GIT_SILENT Update Appstream for new release 2020-07-03 22:53:42 +02:00
Yann Holme-Nielsen 86e3b82efb ## Summary
* 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
2020-06-29 22:27:33 +00:00
Alexander Lohnau d1baf3398e Merge branch 'release/20.04' 2020-06-23 17:42:06 +02:00
Alexander Lohnau 37df39b93b Fix file preview for desktop files with absolute icon paths
BUG: 423326
2020-06-23 08:22:42 +02:00
Ismael Asensio f57ee4b64d Expand DolphinQuery to support different Url schemes 2020-06-22 12:33:29 +00:00
Kai Uwe Broulik f2c09faf00 Generalize Player protocol support
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
2020-06-22 09:51:35 +00:00
l10n daemon script db408cf09d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-18 08:34:48 +02:00
l10n daemon script 5a9a644fb8 GIT_SILENT made messages (after extraction) 2020-06-18 07:20:24 +02:00
l10n daemon script aea6128fe6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-18 05:48:38 +02:00
l10n daemon script af93215bfd GIT_SILENT made messages (after extraction) 2020-06-18 02:28:52 +02:00
l10n daemon script d5c1ac07db SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-17 16:57:19 +02:00
l10n daemon script 418b225f89 GIT_SILENT made messages (after extraction) 2020-06-17 15:40:57 +02:00
l10n daemon script 9c43e3de7d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-17 14:16:01 +02:00
l10n daemon script d6f95521b3 GIT_SILENT made messages (after extraction) 2020-06-17 11:41:34 +02:00
Méven Car c81927651a Places: Use Solid::Device::DisplayName for DisplayRole
Summary:
BUG: 415281
FIXED-IN: 20.08
Counter-part of D26113

Test Plan:
Before:
{F8215025}
After:
{F8215027}

Reviewers: ngraham, #dolphin

Reviewed By: ngraham, #dolphin

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D26114
2020-06-16 19:37:18 +02:00
l10n daemon script 799c532d23 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-13 05:34:06 +02:00
l10n daemon script 85f5156a33 GIT_SILENT made messages (after extraction) 2020-06-13 02:21:10 +02:00
Gastón Haro 0f0d14d4c2 Provide ability to configure size cut-off for local file previews
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-06-09 11:05:55 -06:00
Christoph Feck ecc8b18b2a GIT_SILENT Update Appstream for new release
(cherry picked from commit 9e3c8a06ee)
2020-06-08 19:47:52 +02:00
Christoph Feck 9e3c8a06ee GIT_SILENT Update Appstream for new release 2020-06-08 19:47:51 +02:00
Méven Car bf4388c755 Status bar: Hide the space free bar when size is unknown
Summary:
BUG: 420027
BUG: 422226
FIXED-IN: 20.08

Test Plan: {F8312398}

Reviewers: #dolphin, ngraham, broulik, #vdg, elvisangelaccio

Reviewed By: #dolphin, ngraham, #vdg, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29213
2020-06-08 07:49:45 +02:00
Ismael Asensio f7a3318fa5 Detect animated format using mimeType instead of file path
This allows to extend the functionality to non-local files and avoids a warning
on such files (`QFSFileEngine::open: No file name specified`)
2020-06-06 18:40:03 +02:00
Nate Graham f987a1c404 Merge branch 'release/20.04' 2020-06-03 11:51:01 -06:00
Nate Graham 70b3f61e1e Show progress when duplicating items
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
2020-06-01 09:58:25 -06:00
Elvis Angelaccio c16f777b28 Fix FIFO usage
`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-31 23:45:07 +02:00
Ahmad Samir 664f97ff0d [DolphinStatusBar] Fix free space info height with bigger fonts
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.
2020-05-31 21:30:22 +00:00
Méven Car 770d083182 Prevents warnings
Warnings such as :
kf5.kio.core: Invalid URL: QUrl("")

It happened for instance with recentlyused:/ ioslave
2020-05-31 21:19:09 +00:00
Méven Car 8aa7cde289 Prevents showing StatJob Progress info
BUG: 422121
Was introduced in ac234a9c55
2020-05-30 15:01:56 +02:00
Elvis Angelaccio b65576a131 Port away from deprecated QFontMetrics::width()
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-29 23:23:55 +00:00
Adriaan de Groot 7df39255a6 Non-functional change: consistent indentation
Use 4-space indents consistently, rather than a mix of 2- and 4-.
2020-05-28 23:42:23 +02:00
Adriaan de Groot d3963a7765 Make ruby, and Gem:test-unit, optional
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.
2020-05-28 23:39:52 +02:00
Elvis Angelaccio 0d679da0a3 Port to non-deprecated variant of QPixmapCache::find()
We need to pass the pixmap by address, not by reference.
2020-05-28 23:04:04 +02:00
Elvis Angelaccio cbb35681f5 Add some missing const qualifiers 2020-05-28 22:42:40 +02:00
Elvis Angelaccio 46c4b902c1 Drop incorrect emit keywork
This is not a signal.
2020-05-28 22:09:38 +02:00
Elvis Angelaccio c886d3736d Fix clazy-range-loop warning 2020-05-28 22:02:03 +02:00
Elvis Angelaccio 51441cd3c2 Port away from deprecated qrand() 2020-05-28 21:59:39 +02:00
Méven Car f6afbbc240 KDirectoryContentsCounter: scan first path not in cache
Use a secondary QLinkedList to store the priority path.
2020-05-25 15:31:51 +00:00
Nate Graham b6700f77dd Merge branch 'release/20.04' 2020-05-24 08:26:34 -06:00
Piotr Henryk Dabrowski 29e6cf01df use KSycoca for updating OpenPreferredSearchTool action
Summary:
Remove all random updates of OpenPreferredSearchTool action, and
use KSycoca for updating it as discussed in https://phabricator.kde.org/D22594#663847

Enhancement for D29441 for bug #420911 caused by D22594.
The bug was fixed by D29442.

CCBUG: 420911

Test Plan:
```
$ cd ${KDE_INSTALL_DIR}/usr/share/applications

$ sudo mv org.kde.kfind.desktop org.kde.kfind.desktop_
$ kbuildsycoca5

$ sudo mv org.kde.kfind.desktop_ org.kde.kfind.desktop
$ kbuildsycoca5
```

Reviewers: broulik, elvisangelaccio, ngraham, #dolphin

Reviewed By: elvisangelaccio, #dolphin

Subscribers: anthonyfieroni, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29568
2020-05-24 08:26:25 -06:00
Méven Car eda05b12fb KDirectoryContentsCounter: don't schedule scanning a folder already in the Queue
Use a QLinkedList to check for presence in the queue.

merge request !2
2020-05-20 07:45:58 +02:00
Elvis Angelaccio a3052c3942 DolphinView: rename new methods to copy/move urls
DolphinView doesn't know anything about split views and it shouldn't.
Rename these new methods to what they actually do (just copy or move to a
given QUrl).
2020-05-19 00:30:47 +02:00
Nate Graham 1ee665bac8 Move search and filter bar close buttons to the right
Summary:
Close buttons for windows, tabs, and pretty much everything else in KDE are on the right,
not the left. This patch makes Dolphin's search and filter bars follow that.

BUG: 421372
FIXED-IN: 20.08.0

Test Plan: {F8314176}

Reviewers: abetts, #dolphin, #vdg, elvisangelaccio, GB_2

Reviewed By: #dolphin, #vdg, elvisangelaccio, GB_2

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29693
2020-05-18 07:30:12 -06:00
Méven Car a058c64eba Merge branch 'release/20.04' 2020-05-18 08:17:01 +02:00
Méven Car 99cf24c03d Left-elide file/folders while keeping their extension visible
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-18 08:14:47 +02:00
Nikolai Krasheninnikov 9b7fc506aa Added VCS plugins signals connections for outOfVersionControl() actions.
Summary:
Plugins can now do out of version control actions (D29041), so we need them to inform of their state.
This change connects every plugin signal to Dolphin on plugin instantiation.

Test Plan:
1. Try SVN Update of inaccessible repository: see SVN error message shows up.
2. Try pull inaccessible git repository: see GIT error message shows up.
3. Try SVN Commit: see SVN message.

Reviewers: #dolphin, meven, elvisangelaccio

Reviewed By: #dolphin, meven

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29488
2020-05-15 23:09:05 +03:00
Antonio Prcela a291c59990 Allow to copy or move selection to the other split view
Summary:
FEATURE: 276167

Default keyboard shortcuts set to `SHIFT+F5` for `copy`, `SHIFT+F6` for `move`

Reviewers: #dolphin, elvisangelaccio, ngraham, meven, dfaure

Reviewed By: #dolphin, elvisangelaccio, ngraham, meven, dfaure

Subscribers: yurchor, kde-doc-english, dfaure, meven, kfm-devel

Tags: #dolphin, #documentation

Differential Revision: https://phabricator.kde.org/D29006
2020-05-14 16:20:14 -06:00
l10n daemon script 57d9eee900 GIT_SILENT made messages (after extraction) 2020-05-13 09:20:03 +02:00
l10n daemon script 8cb3521cb7 GIT_SILENT made messages (after extraction) 2020-05-13 02:40:37 +02:00
Christoph Feck 2afd02f5ee GIT_SILENT Update Appstream for new release 2020-05-11 23:07:46 +02:00
Elvis Angelaccio 42148dd356 DolphinView: rename cutSelectedItems to cutSelectedItemsToClipboard
For consistency with d1a70c0b62.
2020-05-11 22:54:08 +02:00
Alexander Lohnau 2b58f0457e Dolphin: Cleanup service settings page
Summary:
Just some little things :-)
- Refactor foreach
- Fix minor formatting issues
- Use auto keyword where appropiate

Test Plan: Compiles

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29560
2020-05-11 20:02:23 +02:00
Elvis Angelaccio d1a70c0b62 DolphinView: rename copySelectedItems to copySelectedItemsToClipboard
This makes it explicit that this is just a copy to clipboard, so that
we can use the name for an actual KIO::copy().
2020-05-11 19:31:29 +02:00
l10n daemon script 5ad49db96d GIT_SILENT made messages (after extraction) 2020-05-10 09:03:41 +02:00
l10n daemon script 2c7c8b83f2 GIT_SILENT made messages (after extraction) 2020-05-10 02:45:11 +02:00
Albert Astals Cid 3017f115a8 is use -> is used
CCMAIL: meven29@gmail.com
2020-05-10 00:36:54 +02:00
Méven Car 5936492ab6 Prevent crash in Windows
Summary: https://phabricator.kde.org/D25335#664304

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29470
2020-05-08 13:21:37 +02:00
Ahmad Samir e3c03e466e Port QRegExp to QRegularExpression
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-06 11:37:38 +02:00
Kai Uwe Broulik 37deaaef2c Merge branch 'release/20.04' 2020-05-06 10:52:38 +02:00
Kai Uwe Broulik 801fdf4c59 Don't update preferred search action on window activation
I don't see why this is necessary and causes a blocking(!) StatJob every single time the window is focussed,
worse, ends up in an infinite loop when the window loses focus on an auth prompt.

CCBUG: 420911

Differential Revision: https://phabricator.kde.org/D29441
2020-05-06 10:52:09 +02:00
Christian Christiansen 1d72710039 Keep name readable on drag to matching background
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-06 09:40:55 +10:00
Alexander Lohnau 3e1cb2c7fb Dolphin: Implement package kit for deb/rpm/pacman service packages
Summary: The deb/rpm/pacman packages are now installed/uninstalled using packagekit.

Test Plan: Try to install deb package from kde store (search for `jetbrains`). Then uninstall it.

Reviewers: #dolphin, ngraham, elvisangelaccio, meven

Reviewed By: #dolphin, ngraham, elvisangelaccio, meven

Subscribers: cblack, anthonyfieroni, asturmlechner, meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29119
2020-05-05 17:26:13 +02:00
Kai Uwe Broulik ecede34048 Merge branch 'release/20.04' 2020-05-05 12:05:49 +02:00
Kai Uwe Broulik 9f268f5f76 Don't use local URL for KMoreTool
This method is called a billion times and spawns a blocking(!) StatJob.
KFind can search local URLs, too, so I don't see why this is necessary.
Either way, I'd rather have a non-KDE search tool broken than the app.
Ideally, I'd like this entire thing redone to use an async StatJob, if any.
Fwiw the KMoreTools in the free space bar doesn't use a local URL either.

BUG: 420911
FIXED-IN: 20.04.1

Differential Revision: https://phabricator.kde.org/D29442
2020-05-05 12:05:18 +02:00
Méven Car 91ea1e29ee Sort by file size according to DetailsModeSettings::directorySizeCount
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-05 07:31:57 +02:00
Méven Car 31f5dc7f7c Fix Windows Build
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-05 07:31:22 +02:00
Nikolai Krasheninnikov 2c72b18661 Fixes Dolphin crash on "Defocus Terminal Panel" menu click if no Konsole is installed.
Summary:
Dolphin crashes if no Konsole is installed and user clicks menu action "Defocus Terminal Panel".
This fix is pretty straight forward.

Steps to reproduce:
1. Run Dolphin without Konsole available.
2. Press F4 to open console window.
3. Click in service menu "Focus Terminal Panel".
4. Click in service menu "Defocus Terminal Panel". Observe the crash.

Test Plan:
1. Run Dolphin without Konsole available.
2. Press F4 to open console window.
3. Click in service menu "Focus Teminal Panel".
4. Click in service menu "Defocus Terminal Panel".
5. Click in service menu "Focus Terminal Panel".
6. Press F4 to close console window.

Reviewers: #dolphin, meven, elvisangelaccio, ngraham

Reviewed By: #dolphin, meven, elvisangelaccio, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29345
2020-05-04 22:40:06 +03:00
Nikolai Krasheninnikov a9e2f01add Fixes Dolphin crash on "Defocus Terminal Panel" menu click if no Konsole is installed.
Summary:
Dolphin crashes if no Konsole is installed and user clicks menu action "Defocus Terminal Panel".
This fix is pretty straight forward.

Steps to reproduce:
1. Run Dolphin without Konsole available.
2. Press F4 to open console window.
3. Click in service menu "Focus Terminal Panel".
4. Click in service menu "Defocus Terminal Panel". Observe the crash.

Test Plan:
1. Run Dolphin without Konsole available.
2. Press F4 to open console window.
3. Click in service menu "Focus Teminal Panel".
4. Click in service menu "Defocus Terminal Panel".
5. Click in service menu "Focus Terminal Panel".
6. Press F4 to close console window.

Reviewers: #dolphin, meven, elvisangelaccio, ngraham

Reviewed By: #dolphin, meven, elvisangelaccio, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29345
2020-05-04 22:36:51 +03:00
Alexander Lohnau fd827e412e Dolphin: Cleanup kcms
Summary: Refactor forearch, adjust formatting, remove unnecessary version checks.

Test Plan: Compiles

Reviewers: #dolphin, ngraham, elvisangelaccio, meven

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29377
2020-05-04 20:36:15 +02:00
Antonio Prcela ddcca5fb91 Replace the list with the simplified list, instead of concatenate.
Summary: Replace the list m_selectedUrls with a simplified list, instead of concatenating the simplified list to the current one.

Reviewers: dfaure, meven

Reviewed By: dfaure

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29399
2020-05-04 08:00:07 -06:00
Méven Car e6ea3ab4c4 [Details mode] Allow to fill the column size of directories with actual size
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-05-04 07:26:59 +02:00
Alexander Lohnau d34559d1c1 Dolphin Service Menu Installer: Launch certain scripts in Konsole
Summary:
In general the issue with installers/uninstallers for the dolphin plugin is
that a lot of the scripts are intended to be run manually in a terminal.
For instance if a script uses `sudo make install` the user can't type in the password.

With this patch scripts that are executed without arg variants are
executed in konsole (if available).

Test Plan:
Tests still pass. Try to install the "Jetbrains Dolphin Plugin" tar.gz file from the kde store.
If you have the required dependencies etc. the konsole window should close.
If the install script fails (type in wrong admin password a couple of times) you
should have a shell opened.

Reviewers: #dolphin, ngraham, nicolasfella, elvisangelaccio, meven

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29089
2020-05-03 20:22:11 +02:00
Elvis Angelaccio 32308843f9 ServicesSettingsPage: add missing connection receiver 2020-05-03 19:05:32 +02:00
Alexander Lohnau e6d4afa927 Dolphin Services: Add search box
Summary:
You can now filter the list of installed services.
This is especially useful if you install additional service menus
from the kde store, because one instalaton can add a lot of services.
For instance the ReImage plugin.

Test Plan:
Compiles, search for a service menu.
Only services matching the query will show up.

Reviewers: ngraham, elvisangelaccio, meven

Reviewed By: meven

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29375
2020-05-03 12:50:24 +02:00