Assign the new session Id equal to the maximum existing Id + 1.
The session Id may be displayed in the tab title. If we open 2 tabs and
then close the second one, then the next opened tab will get number 3
instead of number 2, which can be confusing for the user.
BUG: 440878
With this change, the tests which are implemented check that ProcessInfo can read attributes of a process properly.
The checked attributes are the current working directory of the process, the validity of the process and the name and arguments of the process.
Instead of calling ProcessInfo::readArguments and
ProcessInfo::clearArguments in ProcessInfo::update,
encapsulate logic of refreshing ProcessInfo::_arguments
into ProcessInfo::refreshArguments and call
the method whenever ssh is detected as process.
Currently, all the processes created by the application are housed
within the application's cgroup without any futher categorisation.
This causes the entire application to be killed if a process in the
aforementioned cgroup triggers an OOM event.
To prevent the entire application from being killed, a new child cgroup
is created for each new tab. Child cgroups for individual tabs are
named according to this template "tab([session pid for the tab]).scope".
"Background" processes (e.g. such as the main process for running
konsole) are stored in the child cgroup "main.scope".
This restricts the OOM event to only killing the tab which contains
the offending process.
BUG: 439805
To prevent the entire application from being killed, a new child cgroup is created for each new tab.
Child cgroups for individual tabs are named according to this template "tab([session pid for the tab]).scope".
"Background" processes (e.g. such as the main process for running konsole) are stored in the child cgroup "main.scope".
This restricts the OOM event to only killing the tab which contains the offending process.
BUG: 439805
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
Add a profile option to follow Unicode standard for the display width of
characters, where this width differs from glibc's wcwidth.
Currently the only character affected by this is soft hyphen (unicode 0x00ad).
Konsole generally follows wcwidth() function when determining the display
width of characters, since this is behaviour expected by libreadline, and
doing otherwise corrupts lines containing problematic characters. When such
characters are used more for display, then on the command line, following
the Unicode standard may be prefferable.
The default for this option is disabled - that is follow wcwidth().
CCBUG: 464823
Fixes a potential crash when opening the right mouse button context menu
just after launching some process in the shell, before konsole has had
any chance to update the foreground process group information.
BUG: 454122
BUG: 458157
we need this to happen before KSandbox::makeHostContext because the
first argument is not necessarily the shell command anymore afterwards,
confusing the legacy logic inside Pty. simply move the manipulation into
Session.cpp
this should make the flatpak build work properly
the resetting was nonesense, Pty appends _environment on top of the
existing environment, so concat the two for potential sandboxing (the
ksandbox class will only apply the diff to system environment anyway).
once the sandboxing was applied reset the actual process environment to
the original variable rather than emptying it, this prevents us from
losing variables when outside a sandbox
BUG: 458591
(cherry picked from commit 252eab8537)
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