[konsole] [Bug 411387] New: Split View crash with keyboard navigation
Nikolay Zlatev
bugzilla_noreply at kde.org
Wed Aug 28 14:59:56 BST 2019
https://bugs.kde.org/show_bug.cgi?id=411387
Bug ID: 411387
Summary: Split View crash with keyboard navigation
Product: konsole
Version: 19.08.0
Platform: Other
OS: Linux
Status: REPORTED
Severity: minor
Priority: NOR
Component: split-view
Assignee: konsole-devel at kde.org
Reporter: nik at astrapaging.com
Target Milestone: ---
Created attachment 122401
--> https://bugs.kde.org/attachment.cgi?id=122401&action=edit
Layout
Konsole crash when keyboard navigation is used to switch between
TerminalDisplay
auto splitterTerminal =
qobject_cast<TerminalDisplay*>(targetSplitter->widget(0));
return nullptr and then splitterTerminal->setFocus(Qt::OtherFocusReason); is
used
https://cgit.kde.org/konsole.git/tree/src/ViewSplitter.cpp#n171
STEPS TO REPRODUCE
1. Split terminal in
---------------------------
| | |
| | |
| | |
---------------------------
| |
| |
| |
---------------------------
2. navigate from bottom to top (ctrl + shift + arrow_up)
OBSERVED RESULT
Crash
EXPECTED RESULT
Not Crash
Arch
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0
Work around
diff --git a/src/ViewSplitter.cpp b/src/ViewSplitter.cpp
index 7e31172c..2ab15e5c 100644
--- a/src/ViewSplitter.cpp
+++ b/src/ViewSplitter.cpp
@@ -168,7 +168,7 @@ void ViewSplitter::handleFocusDirection(Qt::Orientation
orientation, int directi
} else if (qobject_cast<QSplitterHandle*>(child) != nullptr) {
auto targetSplitter = qobject_cast<QSplitter*>(child->parent());
auto splitterTerminal =
qobject_cast<TerminalDisplay*>(targetSplitter->widget(0));
- splitterTerminal->setFocus(Qt::OtherFocusReason);
+ if (splitterTerminal != nullptr)
splitterTerminal->setFocus(Qt::OtherFocusReason);
} else if (qobject_cast<QWidget*>(child) != nullptr) {
TerminalDisplay *terminalParent = nullptr;
while(terminalParent == nullptr) {
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list