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
Kate
Commits
60c837b7
Commit
60c837b7
authored
Jul 31, 2022
by
Pablo Rauzy
Committed by
Christoph Cullmann
Aug 14, 2022
Browse files
code cleanup
parent
0f249ec6
Changes
2
Hide whitespace changes
Inline
Side-by-side
addons/keyboardmacros/keyboardmacrosplugin.cpp
View file @
60c837b7
...
...
@@ -8,7 +8,6 @@
#include
<QAction>
#include
<QApplication>
#include
<QCoreApplication>
#include
<QDateTime>
#include
<QKeyEvent>
#include
<QKeySequence>
#include
<QList>
...
...
@@ -134,7 +133,6 @@ bool KeyboardMacrosPlugin::play()
Macro
::
Iterator
it
;
for
(
it
=
m_macro
.
begin
();
it
!=
m_macro
.
end
();
it
++
)
{
QKeyEvent
*
keyEvent
=
*
it
;
QKeySequence
s
(
keyEvent
->
key
()
|
keyEvent
->
modifiers
());
keyEvent
->
setAccepted
(
false
);
qApp
->
sendEvent
(
qApp
->
focusWidget
(),
keyEvent
);
}
...
...
addons/keyboardmacros/keyboardmacrosplugin.h
View file @
60c837b7
...
...
@@ -15,15 +15,13 @@
#include
<KTextEditor/Plugin>
#include
<KTextEditor/View>
class
KeyboardMacrosPluginView
;
typedef
QList
<
QKeyEvent
*>
Macro
;
class
KeyboardMacrosPlugin
:
public
KTextEditor
::
Plugin
{
Q_OBJECT
friend
KeyboardMacrosPluginView
;
friend
class
KeyboardMacrosPluginView
;
public:
explicit
KeyboardMacrosPlugin
(
QObject
*
parent
=
nullptr
,
const
QList
<
QVariant
>
&
=
QList
<
QVariant
>
());
...
...
@@ -41,12 +39,12 @@ public:
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
event
)
override
;
private:
KTextEditor
::
MainWindow
*
m_mainWindow
;
QWidget
*
m_focusWidget
;
KTextEditor
::
MainWindow
*
m_mainWindow
=
nullptr
;
QWidget
*
m_focusWidget
=
nullptr
;
QAction
*
m_recordAction
;
QAction
*
m_cancelAction
;
QAction
*
m_playAction
;
QAction
*
m_recordAction
=
nullptr
;
QAction
*
m_cancelAction
=
nullptr
;
QAction
*
m_playAction
=
nullptr
;
bool
m_recording
=
false
;
Macro
m_tape
;
...
...
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