The old expected behaviour was that pressing Space would select
the current item. We now trigger selection mode instead and don't
select. At some point in the future we might want to instead have
Space trigger a "QuickLook" feature for quick viewing of full
files. In any case, the old behaviour of having Space select is
no longer expected, but Ctrl+Space can still be used for this.
It might also make sense to have Space trigger the old selection
behaviour if both selection mode and "QuickLook" are disabled, but
that is very low priority and will cause more code complexity than
the non-default benefits are worth.
Before this commit, the "Space" keyboard shortcut was bound to
triggering selection mode by default. After this commit, pressing
"Space" will only trigger selection mode when the file view area
has keyboard focus.
Pros:
+ Other buttons in the UI can be triggered with Space once again
just like it is expected from an accessibility point of view.
+ "Type-ahead" searching works once more when typing the space
char for file names containing such a space char.
Cons:
- "Space" can no longer be used to add the currently underlined
item to the selection. Instead "Ctrl+Space" needs to be used.
(However, this is the current status anyway unless a user has
manually unbound "Space" as a shortcut from Selection Mode.)
- The Selection Mode action will no longer show "Space" as its
shortcut in menus.
Overall, I see solutions to all of these problems, but they seem
over-engineered for the issues they are trying to solve, so I
believe this somewhat small commit is the best solution for now.
BUG: 458282
BUG: 458281
CCBUG: 463048
FIXED-IN: 23.04
Symlink contents should not be visited for the purpose of displaying sizes.
Not only is potentially misleading because the storage is actually used
elsewhere (the target location), it can be completely wrong as contents can
be visited multiple times, even recursively.
BUG: 434125
(cherry picked from commit 491068a440)
The `break` that is replaced by a `return` here would only break
out of the innermost while loop so the std::vector::end could still
become accessed after that. By returning here we completely exit
out of both nested loops and therefore don't access the
std::vector::end.
When one instance of Dolphin activates another it passes a startupId (X11) / activation token (wayland) along.
On X11 this is passed using the DESKTOP_STARTUP_ID environment variable. The code tries to read that through KStartupInfo::startupId().
That doesn't work though, since Qt at startup reads the environment variable afterwards. However, it is nice enough to allow us to access
it through QX11Info::nextStartupId(). Use that to read the token in the first instance and pass it to the second instance like we do on Wayland
The user-facing impact of this is minimal since KStartupInfo::setNewStartupId internally falls back to KWindowSystem::forceActiveWindow when no
startupId is passed.