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
c938a739
Commit
c938a739
authored
Sep 24, 2021
by
Alexander Lohnau
💬
Browse files
Simplify code using K_PLUGIN_CLASS_WITH_JSON macro
This way we don't need to explicitly name the resulting plugin factory
parent
ef6a9fa7
Changes
15
Hide whitespace changes
Inline
Side-by-side
plugins/bwscheduler/bwschedulerplugin.cpp
View file @
c938a739
...
...
@@ -31,7 +31,7 @@
using
namespace
bt
;
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_bws
cheduler
,
"ktorrent_bwscheduler.json"
,
registerPlugin
<
kt
::
BWSchedulerPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
BWS
cheduler
Plugin
,
"ktorrent_bwscheduler.json"
)
namespace
kt
{
...
...
plugins/downloadorder/downloadorderplugin.cpp
View file @
c938a739
...
...
@@ -19,7 +19,7 @@
#include
<torrent/queuemanager.h>
#include
<util/fileops.h>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_d
ownload
o
rder
,
"ktorrent_downloadorder.json"
,
registerPlugin
<
kt
::
DownloadOrderPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
D
ownload
O
rder
Plugin
,
"ktorrent_downloadorder.json"
)
using
namespace
bt
;
...
...
plugins/infowidget/infowidgetplugin.cpp
View file @
c938a739
...
...
@@ -26,7 +26,7 @@
#include
"trackerview.h"
#include
"webseedstab.h"
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_i
nfo
w
idget
,
"ktorrent_infowidget.json"
,
registerPlugin
<
kt
::
InfoWidgetPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
I
nfo
W
idget
Plugin
,
"ktorrent_infowidget.json"
)
using
namespace
bt
;
...
...
plugins/ipfilter/ipfilterplugin.cpp
View file @
c938a739
...
...
@@ -24,7 +24,7 @@
using
namespace
bt
;
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_ipfilter
,
"ktorrent_ipfilter.json"
,
registerPlugin
<
kt
::
IPFilterPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
IPFilterPlugin
,
"ktorrent_ipfilter.json"
)
namespace
kt
{
...
...
plugins/logviewer/logviewerplugin.cpp
View file @
c938a739
...
...
@@ -22,7 +22,7 @@
using
namespace
bt
;
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_l
og
v
iewer
,
"ktorrent_logviewer.json"
,
registerPlugin
<
kt
::
LogViewerPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
L
og
V
iewer
Plugin
,
"ktorrent_logviewer.json"
)
namespace
kt
{
...
...
plugins/magnetgenerator/magnetgeneratorplugin.cpp
View file @
c938a739
...
...
@@ -25,7 +25,7 @@
#include
<tracker/tracker.h>
#include
<util/sha1hash.h>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_m
agnet
g
enerator
,
"ktorrent_magnetgenerator.json"
,
registerPlugin
<
kt
::
MagnetGeneratorPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
M
agnet
G
enerator
Plugin
,
"ktorrent_magnetgenerator.json"
)
using
namespace
bt
;
namespace
kt
...
...
plugins/mediaplayer/mediaplayerplugin.cpp
View file @
c938a739
...
...
@@ -14,7 +14,7 @@
#include
<util/log.h>
#include
<util/logsystemmanager.h>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_m
edia
p
layer
,
"ktorrent_mediaplayer.json"
,
registerPlugin
<
kt
::
MediaPlayerPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
M
edia
P
layer
Plugin
,
"ktorrent_mediaplayer.json"
)
using
namespace
bt
;
...
...
plugins/scanfolder/scanfolderplugin.cpp
View file @
c938a739
...
...
@@ -25,7 +25,7 @@
using
namespace
bt
;
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_s
can
f
older
,
"ktorrent_scanfolder.json"
,
registerPlugin
<
kt
::
ScanFolderPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
S
can
F
older
Plugin
,
"ktorrent_scanfolder.json"
)
namespace
kt
{
...
...
plugins/scanforlostfiles/scanforlostfilesplugin.cpp
View file @
c938a739
...
...
@@ -22,7 +22,7 @@
using
namespace
bt
;
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_s
can
f
or
l
ost
f
iles
,
"ktorrent_scanforlostfiles.json"
,
registerPlugin
<
kt
::
ScanForLostFilesPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
S
can
F
or
L
ost
F
iles
Plugin
,
"ktorrent_scanforlostfiles.json"
)
namespace
kt
{
...
...
plugins/search/searchplugin.cpp
View file @
c938a739
...
...
@@ -29,7 +29,7 @@
#include
<util/log.h>
#include
<util/logsystemmanager.h>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_search
,
"ktorrent_search.json"
,
registerPlugin
<
kt
::
SearchPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
SearchPlugin
,
"ktorrent_search.json"
)
using
namespace
bt
;
...
...
plugins/shutdown/shutdownplugin.cpp
View file @
c938a739
...
...
@@ -19,7 +19,7 @@
#include
<interfaces/functions.h>
#include
<util/log.h>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_shutdow
n
,
"ktorrent_shutdown.json"
,
registerPlugin
<
kt
::
ShutdownPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
ShutdownPlugi
n
,
"ktorrent_shutdown.json"
)
using
namespace
bt
;
...
...
plugins/stats/StatsPlugin.cc
View file @
c938a739
...
...
@@ -7,7 +7,7 @@
#include
<interfaces/torrentactivityinterface.h>
#include
<KPluginFactory>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_stats
,
"ktorrent_stats.json"
,
registerPlugin
<
kt
::
StatsPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
StatsPlugin
,
"ktorrent_stats.json"
)
namespace
kt
{
...
...
plugins/syndication/syndicationplugin.cpp
View file @
c938a739
...
...
@@ -16,7 +16,7 @@
#include
<util/log.h>
#include
<util/logsystemmanager.h>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_s
yndication
,
"ktorrent_syndication.json"
,
registerPlugin
<
kt
::
SyndicationPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
S
yndication
Plugin
,
"ktorrent_syndication.json"
)
using
namespace
bt
;
...
...
plugins/upnp/upnpplugin.cpp
View file @
c938a739
...
...
@@ -19,7 +19,7 @@
#include
"upnpwidget.h"
#include
<interfaces/torrentactivityinterface.h>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_upnp
,
"ktorrent_upnp.json"
,
registerPlugin
<
kt
::
UPnPPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
UPnPPlugin
,
"ktorrent_upnp.json"
)
using
namespace
bt
;
...
...
plugins/zeroconf/zeroconfplugin.cpp
View file @
c938a739
...
...
@@ -12,7 +12,7 @@
#include
<util/log.h>
#include
<util/logsystemmanager.h>
K_PLUGIN_
FACTORY
_WITH_JSON
(
kt
orrent_z
ero
c
onf
,
"ktorrent_zeroconf.json"
,
registerPlugin
<
kt
::
ZeroConfPlugin
>
();
)
K_PLUGIN_
CLASS
_WITH_JSON
(
kt
::
Z
ero
C
onf
Plugin
,
"ktorrent_zeroconf.json"
)
using
namespace
bt
;
...
...
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