Commit graph

6278 commits

Author SHA1 Message Date
Méven Car 88d3f92dff Apply sugestions 2020-12-27 17:18:40 +00:00
Méven Car f6a465c911 Review feedback 2020-12-27 17:18:40 +00:00
Méven Car c1739d5c4d Version Control plugin: allow plugins to return repository root
Currently plugins `fileName()` only return path file extension.

This changes allows plugins to return the absolute file path to their repository root.

CCBUG: 430024
2020-12-27 17:18:40 +00:00
Nate Graham c6cdf4126a Fix typo
GIT_SILENT
2020-12-27 08:25:04 -07:00
l10n daemon script 3c85f4ce3d GIT_SILENT made messages (after extraction) 2020-12-24 02:40:02 +01:00
Méven Car f0d03c7dd7 Details View: display dates as relative Short dates
CCBUG: 340982
2020-12-24 00:11:21 +00:00
Nate Graham 9abe299c77 Merge branch 'release/20.12' 2020-12-23 11:40:09 -07:00
Eduard Manta 303740c68a Fix vertical scroll with horizontal component not being recognized properly
BUG: 430532

a scroll that includes an horizontal component != 0 might still be a vertical scroll
2020-12-23 17:17:19 +01:00
l10n daemon script 7f44b11a5e GIT_SILENT made messages (after extraction) 2020-12-23 02:43:39 +01:00
l10n daemon script ac796744ff GIT_SILENT made messages (after extraction) 2020-12-22 02:41:00 +01:00
Derek Christ 87bb0ca10b Allow non-local startup location
Only local directories were supported to be set as the starting location
of Dolphin. This commit fixes this by using an KIO::StatJob to determine
if the path is actually pointing to a directory or a file regardless if
it is a local or a remote path.

Additionaly a hard-coded exception for urls with the scheme "timeline"
was removed because with the new fix it is now obsolete.

BUG: 428885
2020-12-21 21:28:50 +00:00
l10n daemon script ecd5c7d678 GIT_SILENT made messages (after extraction) 2020-12-21 02:47:25 +01:00
Elvis Angelaccio 125c7aba09 DolphinContextMenu: drop wrong assert
`m_context` can also be `SearchContext` or `TimelineContext`, so this
assert has been wrong since 8b0c12a59c.
2020-12-19 18:25:07 +01:00
Carl Schwan b049f41d7b Improve AppStream description 2020-12-19 16:30:48 +01:00
Nate Graham 59f00343c9 Merge branch 'release/20.12' 2020-12-18 12:22:21 -07:00
Chris Holland ef09315404 Fix crash when device with capacitybar is dragged
BUG: 430441
2020-12-17 19:10:40 -05:00
Ilia Kats acc42f9189 fix display of folder sizes for empty folders
also fixes 1 byte error in size calculation for all folders
2020-12-17 13:04:01 +01:00
Ahmad Samir d74853ef85 Merge branch 'release/20.12' 2020-12-16 23:53:57 +02:00
Ahmad Samir c03b43b4a1 Use setShowOpenOrExecuteDialog(true) with OpenUrlJob
It makes more sense for a file manager to always ask the user:
 - whether to execute binaries
 - whether to open an executable script as text or execute it

The openOrExecute dialog from KIOWidgets has a "don't ask again" checkbox,
and that setting is also accessible from Dolphin's settings dialog.

See the discussion at https://bugs.kde.org/show_bug.cgi?id=429839#c10
2020-12-16 23:51:06 +02:00
Elvis Angelaccio 1b192c67f9 Merge branch 'release/20.12' 2020-12-15 23:28:15 +01:00
Elvis Angelaccio aeea98837d DolphinContextMenu: drop wrong assert
`m_context` can also be `SearchContext` or `TimelineContext`, so this
assert has been wrong since 8b0c12a59c.
2020-12-15 22:56:06 +01:00
Anthony Fieroni c95d7fae79 Fix access url navigator while creating new tab in filename search view
BUG: 429628
BUG: 430434

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2020-12-15 21:44:10 +00:00
David Faure 42cd439af8 Merge remote-tracking branch 'origin/release/20.12' 2020-12-15 18:48:11 +01:00
David Faure da636bf513 Fix KIO warning when URL is empty 2020-12-15 18:45:20 +01:00
Alexander Lohnau 20370b4c9f Do not create instance of GeneralSettings just to access static members 2020-12-11 20:06:51 +01:00
l10n daemon script 784586672d GIT_SILENT made messages (after extraction) 2020-12-10 02:44:34 +01:00
Laurent Montel d2f044b32d operator+/- is disabled for QFlags in qt6 2020-12-09 07:55:44 +01:00
Méven Car ce3c243525 ContextMenu: Allow plugins submenus to react to Shift modifiers
In 9e4642d435 support was added for the
NewFileMenu.
This adds support for the Plugins submenu provided they relay their
parentWidget to their own menus.

BUG: 425997
2020-12-07 22:13:29 +00:00
Alexander Lohnau a4a7b5e8af servicemenuinstaller: Remove file if it already exists
This is the case when you update an entry.
2020-12-07 22:10:37 +00:00
Friedrich W. H. Kossebau ac97d98866 dolphinpart: fix broken part icon name 2020-12-07 22:09:58 +00:00
Friedrich W. H. Kossebau 9826d81034 dolphinpart: port to new KPluginMetaData-based KParts API 2020-12-07 22:09:58 +00:00
Friedrich W. H. Kossebau 07b7f76f7c dolphinpart: add JSON metadata to plugin, install into kf5/parts subdir 2020-12-07 22:09:58 +00:00
l10n daemon script 476fe42624 GIT_SILENT made messages (after extraction) 2020-12-06 08:14:05 +01:00
l10n daemon script 3c6f1e6881 GIT_SILENT made messages (after extraction) 2020-12-06 02:38:12 +01:00
Elvis Angelaccio 2274db954a Merge branch 'release/20.12' 2020-12-05 19:24:56 +01:00
Elvis Angelaccio c453393d35 Fix PlacesItemModelTest, 2nd try
This partly reverts 15a5189b11

The KDE CI does not have KDE_FULL_SESSION set, which means that KIO
doesn't add the recentlyused:// urls to the model, but defaults to the
old timeline:// urls instead.

In both cases KIO adds 2 places, so it is safe to always assume that the
expected model count is 14.
2020-12-05 19:15:51 +01:00
Elvis Angelaccio bc3e77d2ef Drop obsolete KF5 version check
We depend on 5.77 now.
2020-12-05 18:39:45 +01:00
Elvis Angelaccio c4a1903dd1 Add missing const 2020-12-05 16:58:04 +01:00
Ahmad Samir 1d64b9bb10 DolphinView: set the parent of layout in the ctor
This silences a runtime warning:
QLayout: Attempting to add QLayout "" to DolphinView "", which already
has a layout

Remove redudant setLayout() calls, passing a parent widget to the
Q*BoxLayout ctor sets that layout as the top-level layout for that widget.
2020-12-03 19:50:04 +00:00
Christoph Feck 9b8ac3ef3f GIT_SILENT Update Appstream for new release 2020-12-02 23:01:21 +01:00
Christoph Feck 16ec949f35 GIT_SILENT Update Appstream for new release
(cherry picked from commit 9b8ac3ef3f)
2020-12-02 23:01:21 +01:00
Méven Car 60b9eaa4c1 Toolbar: move and rename filter to edit menu above Search
This is to expose more filter.
Also rename "Show Filter Bar" to simply "Filter", keep "Show Filter Bar" as tooltip

Adds a toggle filter bar action.
2020-12-02 07:07:41 +00:00
Nate Graham ce11325115 Merge branch 'release/20.12' 2020-11-30 17:08:46 -07:00
Méven Car c2a7bde383 Re-allow to paste files via context menu
BUG: 429762
2020-11-30 22:18:48 +01:00
Alexander Lohnau dbf0f645d2 Utilize KFileItemActions::addActionsTo method from KIO 2020-11-29 14:34:07 +00:00
Nicolas Fella 94c1fe6299 Remove unused includes 2020-11-29 15:03:27 +01:00
Carson Black ad9c955835 [kitemlistview]: Animate rubberband fading out 2020-11-28 21:11:44 +00:00
Nate Graham 78c7429a35 Add placeholder text for empty views
Throughout our QML-based software, we now display placeholder text for
empty views so that the user knows that the view is actually empty, and
it's not that the software is just broken.

This commit introduces the same thing for Dolphin's main view.

BUG: 429248
BUG: 426354
FIXED-IN: 21.04
2020-11-28 19:06:28 +00:00
Friedrich W. H. Kossebau ac862c8e2d ui.rc files: consistenly use <gui> instead of deprecated <kpartgui> 2020-11-28 10:28:53 +01:00
Nate Graham 31528188c1 Merge branch 'release/20.12' 2020-11-24 13:53:33 -07:00
Nate Graham bcdb1957af Allow the openURLJob to run executables
Otherwise, excecutable files like AppImages won't be allowed to launch
even if they are correctly marked as executable.

BUG: 429603
FIXED-IN: 20.12
2020-11-24 13:47:48 -07:00
Derek Christ 9e4642d435 Fix delete action switching via 'Shift' when sub-context-menu is open
Switching the 'Move to Trash' action to 'Delete' using the shift key
does not work when the mouse hovers a submenu. This fix resolves the
issue by using an event filter instead of the key event functions.

BUG: 425997
2020-11-23 22:07:31 +00:00
Alexander Lohnau c3b238bbe9 Move repetitive contextmenu related logic in one place
This makes a bit easier to handle the stuff.
Also we don't need the `addVersionControlPluginActions` utility method
and we can put it in the new utility method instead.
2020-11-23 21:58:36 +00:00
Felix Ernst b62095950a Merge branch 'release/20.12' 2020-11-23 13:38:22 +01:00
Méven Car 2cd1c07cad Places panel: highlight place only when it is displayed
BUG: 156678
FIXED-IN: 20.12
2020-11-23 00:02:59 +00:00
Elvis Angelaccio d5a4835f01 PlacesItemModelTest: consider also Pictures/Music/Videos folders
See a371e23b2b667bc85c311d04549f3d7348d00af5 in kio.
2020-11-23 00:40:53 +01:00
Elvis Angelaccio a218b2ce51 PlacesItemModelTest: use helper method to increase indexes
Instead of duplicating the logic all over the place.
2020-11-23 00:36:50 +01:00
Mufeed Ali 4f8c8955b9
Rename 'Url Navigator' to 'Location Bar' 2020-11-22 18:06:37 +05:30
Alexander Lohnau 3b74e4a3ab Remove unneeded version check 2020-11-22 08:42:18 +01:00
Alexander Lohnau 48fec6c9ec Add 'Open Terminal Here' action from dolphin to menu 2020-11-21 20:22:16 +00:00
Felix Ernst 760700819c Select last visited folder when going up/back
This commit fixes a regression introduced by
ad5d3367c7. A lot of connections were
changed there and at least one of them was wrong. The connections can
be separated into GUI connections and internal ones. This commit makes
it so the GUI stuff is connected to m_urlNavigatorConnected and
everything else to m_urlNavigator.

BUG: 429097
2020-11-21 18:24:24 +00:00
l10n daemon script 6171e08eaf GIT_SILENT made messages (after extraction) 2020-11-21 08:23:19 +01:00
Nate Graham f46e630dda Merge branch 'release/20.12' 2020-11-20 11:32:49 -07:00
Méven Car b3c37507dc Re-allow icons that are not theme icon
Particularly concerned are .desktop files.

See also:
15baa93640

BUG: 429113
2020-11-19 21:48:15 +00:00
Felix Ernst 50ca5af7e0 Allow having the UrlNavigators below the tab bar
This commit restores the possibility to have the UrlNavigators below
the tab bar. This will happen automatically whenever the UrlNavigator
is removed from the toolbar.

It is also now again possible to have the toolbar on the side. This
option is disabled while the toolbar contains the UrlNavigators.

This commit makes no changes to the new default which is having the
UrlNavigators in the toolbar but makes sure that upgrading users won't
be affected.
2020-11-19 21:22:27 +00:00
Alexander Lohnau 154843406d Different icon to launch Konsole terminal 2020-11-18 18:59:04 +00:00
Nate Graham b76cc3f6fa Separate Delete/Move To Trash menu items in context menu
Right now these actions are in a visual group with "Rename" and "Add to
Places" which is silly as those actions have no logical connection
whatsoever to deletion.

This commits moves those items into the section above, putting them in a
more logical place and leaving the Delete/Move To Trash item in its own
section.

BUG: 429256
FIXED-IN: 21.04
2020-11-17 22:21:19 +00:00
Elvis Angelaccio b03607b20b Add missing kconfig_version.h include
This should have been part of edced8460b.
2020-11-17 22:54:22 +01:00
Nate Graham e636bae43e Correct indentation and whitespace in prior commit 2020-11-17 09:40:05 -07:00
Domenico Panella edced8460b Allow folder creation on desktop via F10 shortcut 2020-11-17 16:18:54 +00:00
Nate Graham a3c0a822ca Merge branch 'release/20.12' 2020-11-16 10:26:04 -07:00
Méven Car f2d2f325b6 PlacesPanel: tooltip, use toLocalFile instead of path
To avoid Windows compatiblity issues.
2020-11-16 06:59:59 +01:00
Elvis Angelaccio 8fd0d685a6 Merge branch 'release/20.12' 2020-11-15 22:46:34 +01:00
Felix Ernst 8999580e2a Increment kpartgui version
The defaults changed in 37327c9b0a but
I forgot to also bump the kpartgui version so this commit rectifies
that.
2020-11-15 15:21:44 +01:00
Méven Car 5c99790c94 Context Menu: Only add paste action to folders
Either the viewport, or the selected folder is used as destination.
The paste action is only added when enabled.
2020-11-14 20:28:01 +01:00
l10n daemon script 2bfe601272 GIT_SILENT made messages (after extraction) 2020-11-14 02:37:30 +01:00
Felix Ernst 4f645f1b29 Fix navigator alignment for right-to-left localizations 2020-11-13 11:29:54 +01:00
Alexander Lohnau 1208f86696 Fix qrc icon
Apparently the icon was not null, because the mimetype was known.
But there was no icon associated with it and we got an
icon which is not null, but has a null pixmap.
2020-11-12 17:16:50 +01:00
Alexander Lohnau 208d733ae3 Set empty value for packagekit transaction flags
Otherwise the value would be Trusted Only, which will
forbid installing local packages
2020-11-12 17:15:01 +01:00
Méven Car 6b1524e4ff Places panel: show a tooltip after 500 ms
BUG: 426455
FIXED-IN: 20.12
2020-11-10 08:04:15 +00:00
Felix Ernst 63f4981fe0 Adress the third round of Angelaccio's review comments
Additionally remove some redundant code concerning UrlNavigator visuals.
2020-11-09 23:49:07 +01:00
Felix Ernst 2d4d2ce9a1 Adress most of the second round of Angelaccio's review comments
This commit applies most suggestions which were made on the MR.
Most notably the DolphinUrlNavigator class is split up which leads to
the creation of a DolphinUrlNavigatorsController class.

Additionally some minor coding style and const correctness changes are
included.

The error value of cached integers is changed from -1 to INT_MIN
because situations could come up in which -1 would be a valid value.
2020-11-09 23:49:07 +01:00
Felix Ernst 4202383137 Apply Méven Car's suggestions 2020-11-09 23:49:07 +01:00
Felix Ernst a418d6229e Fix a crash and extract unrelated changes
The secondary UrlNavigator is now created when and only when:
- split view mode is activated for the active tab
OR
- switching to a tab that has split view already enabled.
This fixes a crash that occurs when the setting to always start in
split view mode is enabled.

An animation for activating split view is also removed from this and
moved into a separate MR. Another unrelated name change left over from
a previous commit (viewContainers() -> activeViewContainers()) is
dropped.
2020-11-09 23:49:07 +01:00
Felix Ernst 37327c9b0a Make UrlNavigators in the toolbar the only option
The UrlNavigators will be automatically added to the toolbar. The Sort By
action is removed from the default toolbar to make space.

Remove all options to have UrlNavigators outside the toolbar and remove
those code paths.

Make it so the new NavigatorsWidgetAction contains two UrlNavigators when
in split view mode. Spacing was also added to align these UrlNavigators
with the ViewContainers when enough space is available.

Force the toolbar to be either at the top or bottom of the window.

Set a sane sizeHint for DolphinUrlNavigator. It would be better to do this
in KUrlNavigator in the future.

This commit also contains a changes which should be moved to a separate
merge requests before this gets merged:
- Add an expansion animation when split view is enabled by the user
2020-11-09 23:49:07 +01:00
Felix Ernst 6151a7aec0 Add the UrlNavigator to the toolbar automatically if needed
This commit adds the DolphinUrlNavigatorWidgetAction::addToToolbarAndSave()
method which changes the users toolbar configuration to contain an
Url Navigator. This way the user doesn't need to do anything manually.

Aside from that a bunch of minor fixes like renaming and reordering
2020-11-09 23:49:07 +01:00
Felix Ernst b6fc58c3c3 Adress the first round of Angelaccio's review comments
- Split the viewContainers(bool includeInActive) into two methods
    without parameters
- Prevent users from accidently hiding all Url Navigators by
    preventing the dangerous action and then displaying a helpful
    message instead
Unrelated to review comments: Remove a useless line of code
2020-11-09 23:49:07 +01:00
Felix Ernst 00abc6d280 trailing whitespaces 2020-11-09 23:49:07 +01:00
Felix Ernst ad5d3367c7 Add an option to use an UrlNavigator in the toolbar instead
This commit adds a locationInToolbar KToggleAction to switch between
using a location bar to navigate or using a new custom QWidgetAction
in the toolbar.

A big portion of this MR is refactoring because until now the
UrlNavigator was tightly intertwined with the DolphinViewContainer.
With this MR an UrlNavigator for controlling a View can be freely
connected or disconnected with a single method call.

A DolphinUrlNavigator class is created in the process which contains all
Dolphin-specific UrlNavigator code which did previously reside in the
DolphinViewContainer class. Other application parts that belong to
UrlNavigator-management are also moved here.
2020-11-09 23:49:07 +01:00
Méven Car 880766bd56 PlacesItemListWidget: Use Solid to check if device is a network share 2020-11-09 12:30:43 +00: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
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
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
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
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
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
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