Commit graph

6581 commits

Author SHA1 Message Date
Elvis Angelaccio
e5d137b81d Merge branch 'release/20.12' 2020-11-08 23:24:12 +01:00
Elvis Angelaccio
f6327ffec8 Add missing reference 2020-11-08 23:23:07 +01:00
Ismael Asensio
ee4ab8ce69 Iterate over a const copy list of containers
This effectively reverts the mutable iterations approach on
2448f88c5f, and fix crashes
and ghost items when using the filter bar

BUG: 428374
2020-11-08 21:59:34 +00:00
Albert Astals Cid
dd9e25cde5 GIT_SILENT Upgrade release service version to 21.03.70. 2020-11-08 18:33:53 +01:00
Albert Astals Cid
e270aae920 GIT_SILENT Upgrade release service version to 20.11.80. 2020-11-08 17:46:54 +01:00
Alexander Lohnau
801fb7e0fd Do not expose KCMs in application launchers
We still need to build them, because they
are also loaded on konqueror.
2020-11-07 14:51:20 +00:00
Méven Car
1c2fbdef09 KDirectoryContentsCounter: fix support of symlinks dir
BUG: 428712
FIXED-IN: 20.12
2020-11-07 06:21:11 +00:00
Elvis Angelaccio
465e06138e Add support for KUserFeedback
This commit introduces KUserFeedback in dolphin with some basic data
sources and with a settings page to configure the telemetry values.

There are also a couple custom data sources as proof of concept: a bunch
of settings and the count of available network shares as listed by Solid.

The settings page is shown only if the user feedback framework is
enabled, but currently in Plasma we don't have a global kill switch to
disable it.

At the moment we never show an encouragement message. We need to connect
to the `Provider::showEncouragementMessage()` signal, but first we
should agree to a common way to show a non-annoying message to the users.
2020-11-05 18:31:28 +00:00
Méven Car
61bf84c13d Details view: display empty text instead of unknown for sizeless dirs
BUG: 420037
BUG: 420040
FIXED-IN: 20.12
2020-11-05 08:50:55 +01:00
Chris Holland
6a196bf69d Move m_textInfo to fix ctor warning, and document why it's protected. 2020-11-04 23:16:13 +00:00
Chris Holland
70656d08f9 Use QDeadlineTimer instead of QDateTime.
Use early returns instead of deeply nested if/else.
2020-11-04 23:16:13 +00:00
Chris Holland
60c3fa8d39 Cleanup imports 2020-11-04 23:16:13 +00:00
Chris Holland
9e9cb4d1e1 Remove wip debugging 2020-11-04 23:16:13 +00:00
Chris Holland
ee743717e5 Fix freeSpaceInfo cache not being reset. 2020-11-04 23:16:13 +00:00
Chris Holland
b8e68a5ea9 Use KDE GitLab url instead of the GitHub mirror 2020-11-04 23:16:13 +00:00
Chris Holland
4a0dbdea4f Cleanup unused colors. Use const. Use KColorScheme danger.
The draw code is more like the last state of D21312 now.
2020-11-04 23:16:13 +00:00
Chris Holland
89ede4b9a1 Refactor capacity by to use async KIO FreeSpaceJob.
Based on this kio filepicker patch:
933887dc33
2020-11-04 23:16:13 +00:00
Chris Holland
8f76df41da Only show capacity bar for devices (has a udi). 2020-11-04 23:16:13 +00:00
Chris Holland
e75326077b Only check if place url is mount point once during polish event.
The capacity bars will no longer update when capacity changes. It only
checks the size on init.

Updating during polish event is only a temporarily solution just to
draft code flow for seperating logic from painting. Eventually this
logic update should be in a worker thread detached from blocking the
rendering thread that blocks launching the dolphin window.
2020-11-04 23:16:12 +00:00
Chris Holland
ac6de72048 Draw 2 Rectangles below mount points to represent a disk capacity bar
Draws overtop text that's goes below the baseline like a 'j'. It's
fairly difficult to add extra space below the text as the places view
is a "details" view, so the text is vertically centered in the
widget's "row" as you'd desire it to in the main file view.

We can make the widget 8px taller, adding 4px above and below so
there's adequate room for the capacitybar, but that wastes 4px for
each mount point.

Ideally we'd use the "compact" view, which displays the text/size in a
column beside the icon. However the compact view was not designed to
take up the entire width of the viewport. It's also designed to
overflow with a horizontal scrollbar.
2020-11-04 23:16:12 +00:00
Ezike Ebuka
e9a39700fc Improve padding in the Places View 2020-11-04 21:54:10 +00:00
Elvis Angelaccio
957cc92f46 Revert "D-Bus activation systemd service"
This reverts commit eb441b1188.

We'll push it again after we branch 20.12. We don't want to push a too
recent version of KF5 on distros.

!27
2020-11-04 01:12:48 +01:00
Méven Car
c7d4c37534 Compute text width taking into account the zoom level
This makes the icon view less crowded.
2020-11-03 10:03:45 +00:00
l10n daemon script
af1e13f9fa 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-11-03 06:20:03 +01:00
Méven Car
ffe01ee840 FolderPanel: prevents scanning directory tree recursively
KFileItemListView contents are periodically scanned by KFileItemModelRolesUpdater.
It uses then KDirectoryContentsCounter to scan directories to determine their size possibly recursively.

Introduce a scanDirectories setting to disable directory scanning by KFileItemModelRolesUpdater.

BUG: 426617
FIXED-IN: 20.08.3
2020-11-03 02:21:43 +00:00
l10n daemon script
5e9a869a39 GIT_SILENT made messages (after extraction) 2020-11-03 02:35:33 +01:00
Elvis Angelaccio
15a5189b11 Fix PlacesItemModelTest
Since 3dfa0c1c2f87bf1e6bc9 in kio timeline:// is no longer in the places
model.
2020-11-02 01:09:55 +01:00
Elvis Angelaccio
299aff588d servicemenuinstaller: use Q_GLOBAL_STATIC
Global statics should be avoided when possible.
This fixes a clazy warning.
2020-11-02 00:03:20 +01:00
Elvis Angelaccio
6496721110 Port away from deprecated QWheelEvent::delta()
QWheelEvent::angleDelta() returns a QPoint instead of int, so we need to
use its y() value to get the number of steps.
2020-11-01 23:42:46 +01:00
Elvis Angelaccio
327c22bc3b Use QString::rightRef() as suggested by clazy 2020-11-01 23:31:58 +01:00
Martin T. H. Sandsmark
15baa93640 make sure we use valid icons 2020-11-01 22:17:17 +00:00
Martin T. H. Sandsmark
891ebf5758 Fix warnings about scaling pixmaps 2020-11-01 22:17:17 +00:00
Christoph Feck
adfca90730 GIT_SILENT Update Appstream for new release
(cherry picked from commit 92d41a7433)
2020-10-31 17:58:55 +01:00
David Faure
97fbcf3ab5 Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation
They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
2020-10-31 14:31:22 +01:00
Nate Graham
bf11c835eb Disable session management for daemon
We don't need to autostart the daemon if it was running at logout.

BUG: 417219
FIXED-IN: 20.12
2020-10-29 15:00:39 -06:00
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