From 4a4c85431e2451d955690ebe4381072e4ec2cec6 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 31 May 2022 09:02:31 +0300 Subject: [PATCH] kdecore: move K_EXPORT_PLUGIN() macro to kpluginfactory header [ci reset] Signed-off-by: Ivailo Monev --- kdecore/util/kpluginfactory.h | 12 ++++++++++++ kdecore/util/kpluginloader.h | 12 ------------ kfile/kfilemodule.cpp | 1 - kio/metadata/kfilemetadata_epub.cpp | 1 - kio/metadata/kfilemetadata_exiv2.cpp | 1 - kio/metadata/kfilemetadata_ffmpeg.cpp | 1 - kio/metadata/kfilemetadata_poppler.cpp | 1 - kio/metadata/kfilemetadata_spectre.cpp | 1 - kio/metadata/kfilemetadata_taglib.cpp | 1 - kutils/kmediaplayer/kded/kaudioplayer.cpp | 1 - kutils/kpasswdstore/kded/kded_kpasswdstore.cpp | 1 - kutils/kpowermanager/kded/kded_kpowermanager.cpp | 1 - 12 files changed, 12 insertions(+), 22 deletions(-) diff --git a/kdecore/util/kpluginfactory.h b/kdecore/util/kpluginfactory.h index a226e9cb..b8201f1f 100644 --- a/kdecore/util/kpluginfactory.h +++ b/kdecore/util/kpluginfactory.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -69,6 +70,17 @@ KComponentData name::componentData() \ K_PLUGIN_FACTORY_DECLARATION_WITH_BASEFACTORY(name, baseFactory) \ K_PLUGIN_FACTORY_DEFINITION_WITH_BASEFACTORY(name, baseFactory, pluginRegistrations) +/** + * \relates KPluginLoader + * This macro exports the main object of the plugin. Most times, this will be a KPluginFactory + * or derived class, but any QObject derived class can be used. + * Take a look at the documentation of Q_EXPORT_PLUGIN2 for some details. + * + * @ingroup KDEMacros + */ +#define K_EXPORT_PLUGIN(factory) \ +Q_EXPORT_PLUGIN(factory) + /** * \relates KPluginFactory * Defines a KPluginFactory subclass with two constructors and a static componentData function. diff --git a/kdecore/util/kpluginloader.h b/kdecore/util/kpluginloader.h index fe252075..67c16c90 100644 --- a/kdecore/util/kpluginloader.h +++ b/kdecore/util/kpluginloader.h @@ -22,7 +22,6 @@ #include #include -#include class KComponentData; class KPluginFactory; @@ -133,15 +132,4 @@ private: KPluginLoaderPrivate *const d_ptr; }; -/** - * \relates KPluginLoader - * This macro exports the main object of the plugin. Most times, this will be a KPluginFactory - * or derived class, but any QObject derived class can be used. - * Take a look at the documentation of Q_EXPORT_PLUGIN2 for some details. - * - * @ingroup KDEMacros - */ -#define K_EXPORT_PLUGIN(factory) \ -Q_EXPORT_PLUGIN(factory) - #endif diff --git a/kfile/kfilemodule.cpp b/kfile/kfilemodule.cpp index 56c92d35..174ccdba 100644 --- a/kfile/kfilemodule.cpp +++ b/kfile/kfilemodule.cpp @@ -21,7 +21,6 @@ #include "kfilewidget.h" #include "kdirselectdialog.h" #include "kpluginfactory.h" -#include "kpluginloader.h" K_PLUGIN_FACTORY(KFileModuleFactory, registerPlugin();) K_EXPORT_PLUGIN(KFileModuleFactory("kfilemodule", "kio4")) diff --git a/kio/metadata/kfilemetadata_epub.cpp b/kio/metadata/kfilemetadata_epub.cpp index 5c5144c0..27207b72 100644 --- a/kio/metadata/kfilemetadata_epub.cpp +++ b/kio/metadata/kfilemetadata_epub.cpp @@ -18,7 +18,6 @@ #include "kfilemetadata_epub.h" #include "kpluginfactory.h" -#include "kpluginloader.h" #include "kdebug.h" #include diff --git a/kio/metadata/kfilemetadata_exiv2.cpp b/kio/metadata/kfilemetadata_exiv2.cpp index 7d94d13f..3d968071 100644 --- a/kio/metadata/kfilemetadata_exiv2.cpp +++ b/kio/metadata/kfilemetadata_exiv2.cpp @@ -18,7 +18,6 @@ #include "kfilemetadata_exiv2.h" #include "kpluginfactory.h" -#include "kpluginloader.h" #include "kexiv2.h" #include diff --git a/kio/metadata/kfilemetadata_ffmpeg.cpp b/kio/metadata/kfilemetadata_ffmpeg.cpp index 33fde948..f7b317bc 100644 --- a/kio/metadata/kfilemetadata_ffmpeg.cpp +++ b/kio/metadata/kfilemetadata_ffmpeg.cpp @@ -18,7 +18,6 @@ #include "kfilemetadata_ffmpeg.h" #include "kpluginfactory.h" -#include "kpluginloader.h" #include "kglobal.h" #include "klocale.h" #include "kmimetype.h" diff --git a/kio/metadata/kfilemetadata_poppler.cpp b/kio/metadata/kfilemetadata_poppler.cpp index c6201ff7..47c53936 100644 --- a/kio/metadata/kfilemetadata_poppler.cpp +++ b/kio/metadata/kfilemetadata_poppler.cpp @@ -18,7 +18,6 @@ #include "kfilemetadata_poppler.h" #include "kpluginfactory.h" -#include "kpluginloader.h" #include "kglobal.h" #include "klocale.h" #include "kdatetime.h" diff --git a/kio/metadata/kfilemetadata_spectre.cpp b/kio/metadata/kfilemetadata_spectre.cpp index acdfb0b5..b7177804 100644 --- a/kio/metadata/kfilemetadata_spectre.cpp +++ b/kio/metadata/kfilemetadata_spectre.cpp @@ -18,7 +18,6 @@ #include "kfilemetadata_spectre.h" #include "kpluginfactory.h" -#include "kpluginloader.h" #include "kdebug.h" #include diff --git a/kio/metadata/kfilemetadata_taglib.cpp b/kio/metadata/kfilemetadata_taglib.cpp index 24a13dd9..2cad2d1d 100644 --- a/kio/metadata/kfilemetadata_taglib.cpp +++ b/kio/metadata/kfilemetadata_taglib.cpp @@ -18,7 +18,6 @@ #include "kfilemetadata_taglib.h" #include "kpluginfactory.h" -#include "kpluginloader.h" #include "kglobal.h" #include "klocale.h" #include "kdebug.h" diff --git a/kutils/kmediaplayer/kded/kaudioplayer.cpp b/kutils/kmediaplayer/kded/kaudioplayer.cpp index fcb9f3df..439a55bb 100644 --- a/kutils/kmediaplayer/kded/kaudioplayer.cpp +++ b/kutils/kmediaplayer/kded/kaudioplayer.cpp @@ -18,7 +18,6 @@ #include "kaudioplayer.h" #include "kpluginfactory.h" -#include "kpluginloader.h" K_PLUGIN_FACTORY(KAudioPlayerModuleFactory, registerPlugin();) K_EXPORT_PLUGIN(KAudioPlayerModuleFactory("kaudioplayer")) diff --git a/kutils/kpasswdstore/kded/kded_kpasswdstore.cpp b/kutils/kpasswdstore/kded/kded_kpasswdstore.cpp index 3cb7e8ef..e0eed961 100644 --- a/kutils/kpasswdstore/kded/kded_kpasswdstore.cpp +++ b/kutils/kpasswdstore/kded/kded_kpasswdstore.cpp @@ -18,7 +18,6 @@ #include "kded_kpasswdstore.h" #include "kpluginfactory.h" -#include "kpluginloader.h" K_PLUGIN_FACTORY(KPasswdStoreModuleFactory, registerPlugin();) K_EXPORT_PLUGIN(KPasswdStoreModuleFactory("kpasswdstore")) diff --git a/kutils/kpowermanager/kded/kded_kpowermanager.cpp b/kutils/kpowermanager/kded/kded_kpowermanager.cpp index 329dbc36..0a7b75f6 100644 --- a/kutils/kpowermanager/kded/kded_kpowermanager.cpp +++ b/kutils/kpowermanager/kded/kded_kpowermanager.cpp @@ -18,7 +18,6 @@ #include "kded_kpowermanager.h" #include "kpluginfactory.h" -#include "kpluginloader.h" #include "kpowermanager.h" #include "kdebug.h"