Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
ff776d59
Commit
ff776d59
authored
Sep 02, 2022
by
Tomaz Canabrava
Browse files
Bugfix related to keyboard navigation
parent
64beadda
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/SSHManager/sshquickaccesswidget.cpp
View file @
ff776d59
...
...
@@ -157,7 +157,6 @@ void SSHQuickAccessWidget::selectPrevious()
const
QModelIndex
lastFolder
=
d
->
filterModel
->
index
(
d
->
filterModel
->
rowCount
()
-
1
,
0
);
const
QModelIndex
lastEntry
=
d
->
filterModel
->
index
(
d
->
filterModel
->
rowCount
(
lastFolder
)
-
1
,
0
,
lastFolder
);
qDebug
()
<<
lastFolder
<<
lastEntry
;
if
(
lastEntry
.
isValid
())
{
slModel
->
select
(
lastEntry
,
flag
);
}
else
{
...
...
@@ -203,6 +202,11 @@ void SSHQuickAccessWidget::selectPrevious()
}
// Last possible child. we need to go to the next parent, *or* wrap.
if
(
curr
.
row
()
==
0
&&
!
curr
.
parent
().
isValid
())
{
lambdaLastFolder
();
return
;
}
slModel
->
select
(
parent
,
flag
);
}
...
...
@@ -210,17 +214,16 @@ bool SSHQuickAccessWidget::eventFilter(QObject *watched, QEvent *event)
{
if
(
watched
==
d
->
filterLine
)
{
if
(
event
->
type
()
==
QEvent
::
KeyPress
)
{
qDebug
()
<<
"Event"
<<
event
->
type
();
auto
keyEvent
=
dynamic_cast
<
QKeyEvent
*>
(
event
);
switch
(
keyEvent
->
key
())
{
case
Qt
::
Key_Up
:
selectPrevious
();
b
re
ak
;
re
turn
true
;
case
Qt
::
Key_Down
:
selectNext
();
b
re
ak
;
re
turn
true
;
default:
b
re
ak
;
re
turn
false
;
}
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment