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
075affac
Commit
075affac
authored
Aug 13, 2022
by
Pablo Rauzy
Committed by
Christoph Cullmann
Aug 14, 2022
Browse files
avoid using a static member in case in might confuse things when unloading and reloading the plugin
parent
d1004534
Changes
2
Hide whitespace changes
Inline
Side-by-side
addons/keyboardmacros/keyboardmacrosplugin.cpp
View file @
075affac
...
...
@@ -71,10 +71,9 @@ KeyboardMacrosPlugin::~KeyboardMacrosPlugin()
QObject
*
KeyboardMacrosPlugin
::
createView
(
KTextEditor
::
MainWindow
*
mainWindow
)
{
// avoid reloading macros from storage when creating a new mainWindow from an existing instance
static
bool
namedMacrosLoaded
=
false
;
if
(
!
namedMacrosLoaded
)
{
if
(
!
m_namedMacrosLoaded
)
{
loadNamedMacros
();
namedMacrosLoaded
=
true
;
m_
namedMacrosLoaded
=
true
;
}
QPointer
<
KeyboardMacrosPluginView
>
pluginView
=
new
KeyboardMacrosPluginView
(
this
,
mainWindow
);
m_pluginViews
.
append
(
pluginView
);
...
...
addons/keyboardmacros/keyboardmacrosplugin.h
View file @
075affac
...
...
@@ -49,6 +49,7 @@ class KeyboardMacrosPlugin : public KTextEditor::Plugin
Macro
m_tape
;
Macro
m_macro
;
QString
m_storage
;
bool
m_namedMacrosLoaded
=
false
;
QMap
<
QString
,
Macro
>
m_namedMacros
;
QSet
<
QString
>
m_wipedMacros
;
...
...
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