Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
e49ef33a
Commit
e49ef33a
authored
Mar 04, 2009
by
hjk
Browse files
Fixes: fakevim: let Ctrl-K pass to creator core
parent
da92e9c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/fakevim/fakevimhandler.cpp
View file @
e49ef33a
...
...
@@ -1258,8 +1258,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
}
}
else
{
qDebug
()
<<
"IGNORED IN COMMAND MODE: "
<<
key
<<
text
;
if
(
text
.
isEmpty
())
handled
=
false
;
handled
=
false
;
}
return
handled
;
...
...
@@ -1414,9 +1413,12 @@ bool FakeVimHandler::Private::handleMiniBufferModes(int key, int unmodified,
}
else
if
(
key
==
Key_Tab
)
{
m_commandBuffer
+=
QChar
(
9
);
updateMiniBuffer
();
}
else
{
}
else
if
(
QChar
(
key
).
isPrint
())
{
m_commandBuffer
+=
QChar
(
key
);
updateMiniBuffer
();
}
else
{
qDebug
()
<<
"IGNORED IN MINIBUFFER MODE: "
<<
key
<<
text
;
return
false
;
}
return
true
;
}
...
...
@@ -2182,20 +2184,27 @@ FakeVimHandler::~FakeVimHandler()
bool
FakeVimHandler
::
eventFilter
(
QObject
*
ob
,
QEvent
*
ev
)
{
if
(
ev
->
type
()
==
QEvent
::
KeyPress
&&
ob
==
d
->
editor
())
return
d
->
handleEvent
(
static_cast
<
QKeyEvent
*>
(
ev
));
if
(
ev
->
type
()
==
QEvent
::
KeyPress
&&
ob
==
d
->
editor
())
{
QKeyEvent
*
kev
=
static_cast
<
QKeyEvent
*>
(
ev
);
//qDebug() << "KEYPRESS" << kev->key();
return
d
->
handleEvent
(
kev
);
}
if
(
ev
->
type
()
==
QEvent
::
ShortcutOverride
&&
ob
==
d
->
editor
())
{
QKeyEvent
*
kev
=
static_cast
<
QKeyEvent
*>
(
ev
);
int
key
=
kev
->
key
();
int
mods
=
kev
->
modifiers
();
//qDebug() << "SHORTCUT OVERRIDE" << key;
bool
handleIt
=
(
key
==
Qt
::
Key_Escape
)
||
(
key
>=
Key_A
&&
key
<=
Key_Z
&&
mods
==
Qt
::
ControlModifier
);
//qDebug() << "SHORTCUT HANDLING" << handleIt;
if
(
handleIt
&&
d
->
handleEvent
(
kev
))
{
//qDebug() << "SHORTCUT HANDLED";
d
->
enterCommandMode
();
ev
->
accept
();
return
true
;
}
//qDebug() << "NOT OVERRIDDEN";
}
return
QObject
::
eventFilter
(
ob
,
ev
);
...
...
tests/manual/gdbdebugger/simple/app.cpp
View file @
e49ef33a
...
...
@@ -177,8 +177,7 @@ void testQHash()
hgx1
[
"111111111128.0"
]
=
28.0
;
hgx1
[
"111111111111111111129.0"
]
=
29.0
;
#endif
#if 1
if
1
QHash
<
int
,
QString
>
hgg2
;
hgg2
[
22
]
=
"22.0"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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