Looking at the crash backtraces from the bug reports, it seems this is what
happens, when you have two tabs open, then click the close button on the
non-current tab:
- QTabBar::currentChanged() is emitted, the TerminalDisplay pointer is
still not null at this point (the code checks for that)
- TabbedViewContainer::currentTabChanged()
- TabbedViewContainer::activeViewChanged()
- ViewManager::activateView(), at this point the TerminalDisplay pointer
could be null, which then crashes when we call Widget::setFocus()
BUG: 411962
FIXED-IN: 21.12
This happens because in ViewManager::sessionFinished(),
the 'view' is delayed deleted which means that it is not removed
from its containing splitter until the next event. However,
toggleActionsBasedOnState() is called immediately which makes its
decisions based on the current splitter state with the view still
present.
In order to avoid any possible object lifetime issues caused by
changing the way the view is deleted, or trying to remove it from the
view immediately, the call of toggleActionsBasedOnState() is instead
delayed until the view has been destroyed (and therefore removed from
its splitter).
This also allowed me to remove a few includes of Profile.h
around the codebase, that used Profile::Ptr. now the compilation
is a bit faster and also does not recompile things as often.
Add the move-tab-to-right and move-tab-to-left actions in
ViewManager to the _multiTabOnlyActions collection to allow
override them in Yakuake with grow-terminal-right and
grow-terminal-left
BUG: 415164
Add the switch-to-tab-%i actions in ViewManager to the
_multiTabOnlyActions collection to allow override them in Yakuake
BUG: 420503
(cherry picked from commit 13697e07d9290f3c14d57ec27884bb9756999f27)
Summary:
- Added handlig of mouse double click on view header bar to toggle
maximize.
- Added menu entry under View -> Split view, Toogle maximize view
Test plan:
A.1. Open Konsole and create split views
A.2. Double clicking a view header should toggle maximize/restore the view
B.1. Open Konsole and create split views
B.2. Go to menu View -> Split view -> Toggle maximize view
Focused TerminalDisplay is used as a source of tab and window name,
for activity monitoring, splits headers highlighting, etc.
With this change TerminalDisplay is considered focused even when actual
focus is e.g. in its search box or popup menu.
Currently the shortcut is Ctrl+Shift+L which is close too
Ctrl+Shift+K. Ideally we want detach tab to not be a shortcut that can
be accidently pressed.
See https://invent.kde.org/kde/konsole/-/issues/6
This reverts commit f96deb39aa.
This was anti-optimization.
QStringLiteral is a QString created at build time. Initialization of
QString with it has no overhead.
QLatin1String is 8 bit C string wrapper which needs run-time conversion
to 16 bit encoding used in QString.
Summary:
This should fix the terminal not gaining focus when using konsolepart.
BUG: 411181
FIXED-IN: 19.12.0
Test Plan:
- The terminal panels in Dolphin and Kate now always gain focus
properly, not just the first time you open them
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D25001
The format of the Konsole session file changed with 19.08. This was
overlooked and pre 19.08 files caused crashes. That crash was fixed
in 19.08.1 to just start the default profile.
This patch will allow pre 19.08 session files to be loaded correctly.
BUG: 412173
FIXED-IN: 19.08.2
Summary:
When restoring session in Konsole fails, the fallback code should
create a default view and session instead. However, the code omitted
adding this view to the container, which makes
- the window black (or grey in my case), see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935031
- konsole crash later, when you add a new tab and close it, because
code in ViewManager expects TerminalDisplays to be children of
ViewSplitter, which is not the case
This fix adds the view to activeController(), just like every other
code that creates TerminalDisplay.
Test Plan:
1. find a session in your $HOME/.config/session/ from konsole before 19.08
2. konsole -session xxxx (where xxxx are the numbers in the session file)
-> there should be a konsole window with usable terminal
3. add a new tab with C-S-T and close it
->there should be no crash
Reviewers: hindenburg, #konsole
Reviewed By: hindenburg, #konsole
Subscribers: tcanabrava, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D23601
Summary:
Randomize colors using HSLuv color space instead of HSL. It has
perceptually uniform lightness, which means every color with the same
lightness value is perceived as equally bright by humans. Displays
quality and lack of calibration in most monitors lowers this uniformity,
but even on worst color display it should be better than standard HSL.
More information about HSLuv: http://www.hsluv.org/
Minor changes:
* Random seed takes PID into account to prevent repeated colors in
separate Konsole processes
* Key names in a config were changed
* Adapted "Black on random light" color scheme
Breeze with random ranges on default bg and fg: hue=360° saturation=100:
{F6754773}
To be done in future:
* Automatically convert color schemes which use old randomization
method.
Reviewers: #konsole, #vdg
Subscribers: hindenburg, #vdg, #konsole
Tags: #konsole, #vdg
Differential Revision: https://phabricator.kde.org/D20263