It's pointless to show the popout action when splitscreen is closed,
so we'll remove it as a child of the splitscreen action whenever the
screen is not split.
Now that it's a KMenuAction, it becomes impossible to trigger the root
action when it's in a menu. To work around this, we create a new action
that mirrors the state of the original. It also takes the default
shortcut.
If you have a split view open, you can now pop the active half out into a new window by clicking the "Pop out" button in the toolbar or by activating "View > Pop out".
BUG: 270604
Commit d27ee07d makes it impossible for applications embedding Dolphin part (for example, Konqueror) to react to middle mouse click on a file. If I understand correctly (I'm not familiar with Dolphin code) the `fileMiddleClickActivated` signal is connected with a slot in `DolphinViewContainer`, which is only used by Dolphin itself and not by `DolphinPart`. The result is that middle clicking on a file (except archives) from a Dolphin part has no effect.
To avoid this situation, I removed the check for `!archiveProtocolIsEmpty()` in the `else if` condition. This way, if `isTabsForFilesEnabled()` is `true`, which should be true if and only if the view is inside a `DolphinPart`, the `activeTabRequested` or `tabRequested` signal will be emitted, allowing the embedding application to respond however it wants. When the view is inside the Dolphin application, instead, `isTabsForFilesEnabled()` will always be `false`, so the new behavior will be used.
Currently, the session is saved only when the app quits normally. Save
the session after a fixed time interval from the last state change i.e.
anytime the url is changed, or a tab is opened or closed, or the active
view is changed.
BUG: 425627
Since now when duplicating items we automatically generate a name for the new item, we can do the same if an item with that name already exists.
BUG: 475410
If Dolphin terminal is open, and one types `exit` there and then closes Dolphin, Dolphin crashes due to a dangling pointer.
Konsole KPart is deleting itself when Konsole session exits, but Dolphin tracks it as a child of the Terminal Panel.
The Terminal Panel doesn't get destroyed when Konsole KPart does, and it tries to double free during children clean up.
(Thanks @sitter !)
Setting `m_konsolePart` to `nullptr` during exit signal fixes this, since there is already check in place for that in the destructor.
BUG:479596