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
Network
KTorrent
Commits
eb7d5132
Commit
eb7d5132
authored
Dec 27, 2021
by
Alexander Lohnau
💬
Browse files
Port away from deprecated KPluginLoader
parent
49bbb188
Changes
1
Hide whitespace changes
Inline
Side-by-side
libktcore/plugin/pluginmanager.cpp
View file @
eb7d5132
...
...
@@ -10,9 +10,9 @@
#include
<KLocalizedString>
#include
<KPluginMetaData>
#include
<KSharedConfig>
#include
"pluginactivity.h"
#include
<KSharedConfig>
#include
<interfaces/guiinterface.h>
#include
<torrent/globals.h>
#include
<util/error.h>
...
...
@@ -39,7 +39,7 @@ PluginManager::~PluginManager()
void
PluginManager
::
loadPluginList
()
{
pluginsMetaData
=
KPlugin
Loader
::
findPlugins
(
QStringLiteral
(
"ktorrent_plugins"
));
pluginsMetaData
=
KPlugin
MetaData
::
findPlugins
(
QStringLiteral
(
"ktorrent_plugins"
));
if
(
!
prefpage
)
{
prefpage
=
new
PluginActivity
(
this
);
...
...
@@ -70,13 +70,7 @@ void PluginManager::loadPlugins()
void
PluginManager
::
load
(
const
KPluginMetaData
&
data
,
int
idx
)
{
KPluginLoader
loader
(
data
.
fileName
());
KPluginFactory
*
factory
=
loader
.
factory
();
if
(
!
factory
)
return
;
factory
->
setMetaData
(
data
);
Plugin
*
plugin
=
factory
->
create
<
kt
::
Plugin
>
();
auto
plugin
=
KPluginFactory
::
instantiatePlugin
<
kt
::
Plugin
>
(
data
).
plugin
;
if
(
!
plugin
)
{
Out
(
SYS_GEN
|
LOG_NOTICE
)
<<
QStringLiteral
(
"Creating instance of plugin %1 failed !"
).
arg
(
pluginsMetaData
.
at
(
idx
).
fileName
())
<<
endl
;
return
;
...
...
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