show_information_panel is only created when building with baloo. only
access it when built with baloo, otherwise always report the panel as
off.
this fixes a nullptr deref because action() would return a nullptr since
show_information_panel isn't a thing in all build configurations
(full disclosure: I can't reproduce the crash, nor did I build without
baloo)
BUG: 431730
This is a backport of b1cadeba93
From b1cadeba93 Mon Sep 17 00:00:00 2001
From: Nate Graham <nate@kde.org>
Date: Tue, 15 Dec 2020 23:03:00 -0700
Subject: [PATCH] Show button to open knetattach inline with URL nav on
Remote:// view
In conjunction with
https://invent.kde.org/frameworks/kio/-/merge_requests/260,
the net result is to hide the knetattach launcher in the view, and show
it inline with Dolphin's URL navigator toolbar when viewing the
remote:// view, just like how we add an "Empty Trash" button when
viewing trash://.
The backport ensures that even with frameworks << 5.78 only one network
button is shown.
BUG: 431626
KFileItem::isSlow uses hardcoded logic that returns true if the
filesystem is Smb or Nfs. However,
KFileSystemType::determineFileSystemTypeImpl on Linux returns Nfs also
if the file system in question is a FUSE file system, which includes
NTFS, sshfs, and others.
BUG: 430778
BUG: 431106
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
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.
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
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.
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.
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.
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.
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
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
- 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
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.