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
Network
KTorrent
Commits
9629826a
Verified
Commit
9629826a
authored
Aug 24, 2021
by
Alexander Lohnau
💬
Browse files
Use getter & setter instead of friend class declaration
parent
79a48334
Changes
2
Hide whitespace changes
Inline
Side-by-side
libktcore/interfaces/plugin.h
View file @
9629826a
...
...
@@ -118,6 +118,11 @@ public:
return
loaded
;
}
void
setIsLoaded
(
bool
isLoaded
)
{
loaded
=
isLoaded
;
}
/// Returns the name of the parent part the GUI of the plugin should be created in
virtual
QString
parentPart
()
const
{
...
...
@@ -128,8 +133,6 @@ private:
CoreInterface
*
core
;
GUIInterface
*
gui
;
bool
loaded
;
friend
class
PluginManager
;
};
}
...
...
libktcore/plugin/pluginmanager.cpp
View file @
9629826a
...
...
@@ -88,7 +88,7 @@ void PluginManager::load(const KPluginMetaData &data, int idx)
plugin
->
setGUI
(
gui
);
plugin
->
load
();
gui
->
mergePluginGui
(
plugin
);
plugin
->
l
oaded
=
true
;
plugin
->
setIsL
oaded
(
true
)
;
loaded
.
insert
(
idx
,
plugin
,
true
);
}
...
...
@@ -114,7 +114,7 @@ void PluginManager::unload(const KPluginMetaData &data, int idx)
gui
->
removePluginGui
(
p
);
p
->
unload
();
p
->
l
oaded
=
false
;
p
->
setIsL
oaded
(
false
)
;
loaded
.
erase
(
idx
);
}
...
...
@@ -143,7 +143,7 @@ void PluginManager::unloadAll()
Plugin
*
p
=
i
->
second
;
gui
->
removePluginGui
(
p
);
p
->
unload
();
p
->
l
oaded
=
false
;
p
->
setIsL
oaded
(
false
)
;
i
++
;
}
loaded
.
clear
();
...
...
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