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
243b6eb1
Commit
243b6eb1
authored
Aug 06, 2022
by
Pablo Rauzy
Committed by
Christoph Cullmann
Aug 14, 2022
Browse files
getting rid of annoying LSP warning about qCDebug
parent
58095bdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/keyboardmacros/keyboardmacrosplugin.cpp
View file @
243b6eb1
...
...
@@ -174,7 +174,7 @@ bool KeyboardMacrosPlugin::eventFilter(QObject *obj, QEvent *event)
}
// otherwise we add the keyboard event to the macro
KeyCombination
kc
(
keyEvent
);
q
C
Debug
(
KM_DBG
)
<<
"key combination:"
<<
kc
;
qDebug
(
KM_DBG
)
<<
"key combination:"
<<
kc
;
m_tape
.
append
(
kc
);
return
false
;
}
else
{
...
...
@@ -184,7 +184,7 @@ bool KeyboardMacrosPlugin::eventFilter(QObject *obj, QEvent *event)
void
KeyboardMacrosPlugin
::
focusObjectChanged
(
QObject
*
focusObject
)
{
q
C
Debug
(
KM_DBG
)
<<
"focusObjectChanged:"
<<
focusObject
;
qDebug
(
KM_DBG
)
<<
"focusObjectChanged:"
<<
focusObject
;
QPointer
<
QWidget
>
focusWidget
=
qobject_cast
<
QWidget
*>
(
focusObject
);
if
(
focusWidget
==
nullptr
)
{
return
;
...
...
@@ -199,7 +199,7 @@ void KeyboardMacrosPlugin::focusObjectChanged(QObject *focusObject)
void
KeyboardMacrosPlugin
::
applicationStateChanged
(
Qt
::
ApplicationState
state
)
{
q
C
Debug
(
KM_DBG
)
<<
"applicationStateChanged:"
<<
state
;
qDebug
(
KM_DBG
)
<<
"applicationStateChanged:"
<<
state
;
// somehow keeping our event filter on while the app is out of focus made Kate crash, we fix that here
switch
(
state
)
{
case
Qt
::
ApplicationSuspended
:
...
...
@@ -221,7 +221,7 @@ void KeyboardMacrosPlugin::applicationStateChanged(Qt::ApplicationState state)
void
KeyboardMacrosPlugin
::
record
()
{
// start recording
q
C
Debug
(
KM_DBG
)
<<
"start recording"
;
qDebug
(
KM_DBG
)
<<
"start recording"
;
// install our spy on currently focused widget
m_focusWidget
=
qApp
->
focusWidget
();
m_focusWidget
->
installEventFilter
(
this
);
...
...
@@ -242,7 +242,7 @@ void KeyboardMacrosPlugin::record()
void
KeyboardMacrosPlugin
::
stop
(
bool
save
)
{
// stop recording
q
C
Debug
(
KM_DBG
)
<<
(
save
?
"end"
:
"cancel"
)
<<
"recording"
;
qDebug
(
KM_DBG
)
<<
(
save
?
"end"
:
"cancel"
)
<<
"recording"
;
// uninstall our spy
m_focusWidget
->
removeEventFilter
(
this
);
// update recording status
...
...
@@ -282,10 +282,10 @@ bool KeyboardMacrosPlugin::play(const QString &name)
Macro
macro
;
if
(
!
name
.
isEmpty
()
&&
m_namedMacros
.
contains
(
name
))
{
macro
=
m_namedMacros
.
value
(
name
);
q
C
Debug
(
KM_DBG
)
<<
"playing macro:"
<<
name
;
qDebug
(
KM_DBG
)
<<
"playing macro:"
<<
name
;
}
else
if
(
name
.
isEmpty
()
&&
!
m_macro
.
isEmpty
())
{
macro
=
m_macro
;
q
C
Debug
(
KM_DBG
)
<<
"playing macro!"
;
qDebug
(
KM_DBG
)
<<
"playing macro!"
;
}
else
{
return
false
;
}
...
...
@@ -308,7 +308,7 @@ bool KeyboardMacrosPlugin::save(const QString &name)
if
(
m_macro
.
isEmpty
())
{
return
false
;
}
q
C
Debug
(
KM_DBG
)
<<
"saving macro:"
<<
name
;
qDebug
(
KM_DBG
)
<<
"saving macro:"
<<
name
;
m_namedMacros
.
insert
(
name
,
m_macro
);
// update GUI:
m_pluginView
->
addNamedMacro
(
name
,
m_macro
);
...
...
@@ -322,7 +322,7 @@ bool KeyboardMacrosPlugin::load(const QString &name)
if
(
!
m_namedMacros
.
contains
(
name
))
{
return
false
;
}
q
C
Debug
(
KM_DBG
)
<<
"loading macro:"
<<
name
;
qDebug
(
KM_DBG
)
<<
"loading macro:"
<<
name
;
// clear current macro
m_macro
.
clear
();
// load named macro
...
...
@@ -340,7 +340,7 @@ bool KeyboardMacrosPlugin::remove(const QString &name)
if
(
!
m_namedMacros
.
contains
(
name
))
{
return
false
;
}
q
C
Debug
(
KM_DBG
)
<<
"removing macro:"
<<
name
;
qDebug
(
KM_DBG
)
<<
"removing macro:"
<<
name
;
m_namedMacros
.
remove
(
name
);
m_deletedMacros
.
insert
(
name
);
// update GUI
...
...
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