Commit graph

6496 commits

Author SHA1 Message Date
Lothar Paltins 129570b131 Fix wrong parameter in function call
In KDirectoryContentsCounterWorker::CountResult, the first parameter in
the call of walkDir was wrong. It should be path without conversion,
because the conversion is done in the called function.

BUG: 428282
2020-10-27 15:54:03 +01:00
Alexander Lohnau 2448f88c5f Use mutable iterators where required 2020-10-24 16:46:34 +02:00
Alexander Lohnau 97415729c3 Compile with QT_NO_KEYWORDS 2020-10-23 18:23:06 +00:00
Alexander Lohnau a24327cd50 Compile without foreach 2020-10-23 18:23:06 +00:00
Elvis Angelaccio 360a8dd883 DolphinTabWidget: prefer QUrl::toDisplayString() for tooltips
This is better for remote urls.

!35
2020-10-23 19:15:07 +02:00
Elvis Angelaccio be3ffecf0b KItemListSizeHintResolver: remove no longer used member 2020-10-23 19:02:32 +02:00
Nate Graham c733b3aa97 Don't session-restore invalid paths
When session restore is populating the main window, it's unconditional;
you'll get whatever was there before. This can be a problem if any of
those things are now missing. For example, maybe you were browsing files
on a removable disk, then quit Dolphin, and finally removed the disk. The
next time you launch Dolphin again, it will try to show you the
view from the now-missing removable disk.

To prevent this, we now look at all the URLs in all of the view
containers that were created after session-restore has finished doing
its thing; if any of them are invalid local URLs, we change the URL to
the home folder instead to avoid showing the user a view with an invalid
location in it.

BUG: 427619
FIXED-IN: 20.12
2020-10-23 17:00:09 +00:00
Nate Graham ae1d441dac Show home folder if needed after unmounting mounted disk
Right now, when you unmount a device that any active view containers are
displaying, nothing in the view changes. As a result, it's possible to
try to navigate to files or folders in that view, which cannot be done
because the disk that the files or folders are located on has been
unmounted!

With this commit, we detect that case and switch the view containers
to show the home folder after the disk whose contents they are displaying
gets unmounted.

BUG: 158934
FIXED-IN: 20.12
2020-10-23 17:00:09 +00:00
Nate Graham 1501825d44 Fix DolphinMainWindow::viewContainers() to take into account split views
The function was previously assuming that each tab view has exactly one
view container, which is not necessarily accurate; some could have a
split view open.
2020-10-23 17:00:09 +00:00
Laurent Montel 47a5071fc9 If include is define in .h remove it if it's defined in .cpp too (scripted) 2020-10-23 07:43:43 +02:00
Henri Chain eb441b1188 D-Bus activation systemd service
Correctly scopes dolphin in systemd service `app-org.kde.dolphin.service` when dbus-activated (while still working if systemd is not present), as per https://systemd.io/DESKTOP_ENVIRONMENTS/

uses new ECM modules:
- https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/5 to simplify the systemd service templating + install
- https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/17 to generate the dbus service file automatically

needs https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/25
2020-10-21 10:20:56 +00:00
Laurent Montel 40cc911319 Remove not implmemented method 2020-10-17 18:05:17 +02:00
l10n daemon script 20a919b787 GIT_SILENT made messages (after extraction) 2020-10-17 02:34:34 +02:00
Elvis Angelaccio 29b894dbba Port away from QTimeLine::setCurveShape()
As recommended, we now set `easingCurve` directly.
2020-10-15 01:27:28 +02:00
Elvis Angelaccio 1ded75ce44 Stop using QVariant < operator
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.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio d9956c620e Drop obsolete version check
We require Qt 5.14 now.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio de69336178 Port to non-deprecated QLabel::pixmap()
Quoting from:
714409b23c

```
The QLabel changes to the pixmap/picture getters provide the following
migration path:

QPixmap *ppix = l->pixmap(); // up to 5.15, warns in 5.15
QPixmap pval = l->pixmap(Qt::ReturnByValue); // new in 5.15, works in 6
QPixmap pixmap = l->pixmap(); // from Qt 6 on
```

Since we can't require 5.15 yet in dolphin, the port is done only when
building with Qt >= 5.15
2020-10-15 01:22:00 +02:00
Elvis Angelaccio a403df91b7 Port to non-deprecated QString::split() variant
This requires Qt 5.14, which we now depend on.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio 3bf2922e33 Port away from QList::toSet()
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-15 01:22:00 +02:00
tolu schr 31cba55cff Add tooltip to tabbar 2020-10-13 17:44:32 +00:00
Nate Graham b343fdffc5 Show "Open With" menu items even for empty dirs
We found some legitimate use cases for this after all! :)

This reverts 14f0cd52f6

BUG: 427573
FIXED-IN: 5.12
2020-10-12 18:16:53 -06:00
Nate Graham 4937992e93 When restoring former window state, append any URLs passed as args
Before, when Dolphin was closed but opened with any URLs, it would open
a new window with only those URLs, rather than restoring any window
state (if the user has this feature enabled).

Now, Dolphin will first restore state (if enabled) and then append any
URLs, rather than replacing the existing set of URLs.

The "new instance" case was previously handled automatically and now
needs to be explictly handled by checking for it, to make sure that new
instances give you a clean window rather than a state-restored window.

BUG: 427274
FIXED-IN: 20.12
2020-10-11 17:02:49 +00:00
l10n daemon script 95e34931c0 GIT_SILENT made messages (after extraction) 2020-10-10 02:33:01 +02:00
Carl Schwan 267237475e Update README.md to gitlab :D 2020-10-06 16:02:54 +00:00
Nate Graham 462982faa3 Merge branch 'release/20.08' into master 2020-10-05 15:19:04 -06:00
Jan Paul Batrina daa0fc341d When an invalid protocol is used, reset the navigator location to the previous url
BUG: 413478
2020-10-05 20:11:11 +00:00
Ahmad Samir aa12f9ec1d Don't trigger rubberband with back/foward mouse buttons
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.
2020-10-04 19:41:40 +00:00
Nate Graham 6cf628cbd0 Don't warn when closing multiple tabs if restoring window state
When we're using the "restore window state" feature, there's no need to
warn when closing multiple tabs, because they're saved and you can just
re-open the window.
2020-10-03 09:39:16 -06:00
Christoph Feck 3d8bb6c385 GIT_SILENT Update Appstream for new release
(cherry picked from commit 38f32d5232)
2020-10-03 14:10:20 +02:00
Christoph Feck 38f32d5232 GIT_SILENT Update Appstream for new release 2020-10-03 14:10:19 +02:00
Christoph Feck 8e6223385f GIT_SILENT Upgrade release service version to 20.08.2. 2020-10-03 12:47:40 +02:00
l10n daemon script e779e6af1a GIT_SILENT made messages (after extraction) 2020-10-02 08:21:10 +02:00
l10n daemon script f1a1711ec6 GIT_SILENT made messages (after extraction) 2020-10-02 02:29:19 +02:00
Elvis Angelaccio 041d6a4bd8 Fix build failure after last commit 2020-09-26 17:12:39 +02:00
Steffen Hartleib 81cf9f0375 Allow interaction with folder/files with the stylus again
This Patch works for Wayland and X.

BUG: 426582
2020-09-26 14:53:57 +00:00
l10n daemon script 71bc4498a3 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-24 10:10:10 +02:00
Jonathan Marten b02046c548 Select/Unselect dialogue: Retain a history of entries made there
It's a very useful facilitity, and having a history of entries and being
able to recall earlier ones makes it even more useful for repetitive
operations.
2020-09-23 11:07:29 +00:00
l10n daemon script 06d629ec6e 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-23 06:39:00 +02:00
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