"Auto save output as" still became "Stop Autosave" when cancelling in file dialog.
Make SessionTask::execute return value that indicates the task has been spawned
successfully or not. So SessionController::autoSaveHistory could decide whether
to change the visibility of _startAutoSaveAction and _stopAutoSaveAction.
BUG: 507069
Using temporaries or non-const containers directly in range-based
loops can cause containers to detach, leading to unnecessary copies.
This commit ensures all range-based loops iterate over named,
const-qualified containers to prevent detachment and improve performance.
This commit fixes an issue with the hamburger menu not appearing in the
context menu. This typically happens when you split the view multiple
times. This is particularly bothering because you cannot show the menu
when it is hidden.
BUG: 476557
This PR introduces a feature to highlight the position of search results on the scrollbar, similar to how search results are highlighted in browsers like Google Chrome, editors like VSCode. The aim is to provide users with a visual indicator on the scrollbar, helping them quickly navigate through the results.
FEATURE: 302284
A new HamburgerMenu is added to the context menu each time it is opened
which causes a delay after enough invocations. Skip adding another if
one has already been added.
BUG: 495029
Adds `Ctrl+Insert` as a shortcut to `Copy`; this is an alternate keybinding to `Copy` that works across both KDE and Windows and doesn't conflict with `Ctrl+C` used to terminate terminal programs.
The autosave functionality is contained in a SaveHistoryAutoTask
class, which inherits from SessionTask. The autosave mechanism
hinges on two pieces of information regarding the autosave file:
the number of bytes used to store the contents of dropped lines
(represented by SaveHistoryAutoTask::_droppedBytes) and a list
of byte offsets corresponding to the start of the contents of lines
on the screen (represented by SaveHistoryAutoTask::_bytesLines).
Everytime a line is dropped, SaveHistoryAutoTask::_droppedBytes
is updated using _bytesLines. Everytime the output is read and
saved to file, the autosave file is resized to _droppedBytes and
the current screen output is appended. Everytime the output is read
or the screen is resized, _bytesLines is updated.
The autosave can be started using an "Auto Save Ouput As" button in
the "File" tab of the toolbar. Once the autosave is started, said
button is replaced by a "Stop Auto Save" button which allows the
user to stop the autosave. Internally, any errors encountered by
the program would result in an KMessageBox reporting the details of
the error and stopping the autosave as well. Clicking on the stop
button reveals the start button again.
Similar to SaveHistoryTask, there is a file dialog which allows the
user to choose which file they would like the autosave contents to
be stored in.
Apart from errors involving reading session output and writing to
file, modifying the file externally, renaming the file and deleting
the file will also result in an error. Emulation::_currentScreen
being changed will also result in an error.
The autosave is conducted at a fixed time interval, apart from an
edge case where an autosave is required immediately due to internal
constraints. Said fixed time interval can be set by the user in the
settings of their current profile, specifically the "Advanced" tab.
Details on the internals of the autosave functionality is documented
in the source files.
GUI
FEATURE: 208620
In some scenarios, users don't want to start a search again from the
top when they reach the end of the contents being searched. However,
if the contents are too large, it can be difficult to notice when
such jumping occurs. This commit aims to address this by adding an
option that disables the automatic wrapping in searches.
FEATURE: 303485
This merge request fixes the title case for three entries in the view menu
- One-Shot Monitors
- Read-Only
- Allow Mouse Tracking
and adds the icon "input-mouse-symbolic" for the Allow Mouse Tracking entry

Implemented methods which allow input to be copied to no other
session and to all sessions. In addition, users can also select
exactly which sessions to copy input to by passing a list of
Session ids. Calling supporting method copyingSessions() on a
session lists other sessions which are copying input from it.
Calling supporting method feederSessions() on a session lists
other sessions it is copying input from.
BUG: 307089
Certain user profiles crash here
from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
this=0x5555557c8da0, name=..., visible=true)
at src/konsole/src/session/SessionController.cpp:2206
mode=1) at src/konsole/src/Screen.cpp:2395
at src/konsole/src/Vt102Emulation.cpp:1071
this=0x555555dc2a30, cc=7)
* speeds up incremental builds as changes to a header will not always
need the full mocs_compilation.cpp for all the target's headers rebuild,
while having a moc file sourced into a source file only adds minor
extra costs, due to small own code and the used headers usually
already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
resulting in those quickly processed, while the minor extra cost of the
sourced moc files does not outweigh that in summary.
Measured times actually improved by some percent points.
(ideally CMake would just skip empty mocs_compilation.cpp & its object
file one day)
* enables compiler to see all methods of a class in same compilation unit
to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
moc code being sourced into the cpp file there definitions can be ensured
and often are already for the needs of the normal class methods
To prevent the search bar from continuing to show a match by emitting
green even after clearing scrollback and resetting, search is rerun
whenever the searchbar is opened.
BUG: 407317
Using "Yes" & "No" text labels on dialog buttons is discouraged by not
only the KDE HIG these days. Yet the legacy API of KMessageBox was
using Yes & No as terms in its API, conflicting with what the HIG
recommends and trapping HIG-unaware developers into thinking to use
Yes & No buttons.
New substitute API uses the term "action" instead, matching the concept
proposed by the KDE HIG.
GIT_SILENT
Similar to screen copy/scrollback mode it allows browsing the scrollback
and selecting text.
Selection is done either by standard GUI shift+arrows, or `vi` style with
`v` starting/ending selection.
BUG: 100317