Port koplugin away from KDELibs4Support

parent b7df5a69
......@@ -12,8 +12,13 @@ endif()
add_library(koplugin SHARED ${koplugin_LIB_SRCS})
generate_export_header(koplugin BASE_NAME koplugin)
target_link_libraries(koplugin KF5::KDELibs4Support KF5::Service Qt5::Core)
target_link_libraries(koplugin LINK_INTERFACE_LIBRARIES KF5::Service Qt5::Core)
target_link_libraries(koplugin
PUBLIC
Qt5::Core
PRIVATE
KF5::ConfigCore
KF5::CoreAddons
)
set_target_properties(koplugin PROPERTIES
VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}
......
......@@ -22,7 +22,7 @@
#include <QDebug>
#include <QApplication>
#include <QCoreApplication>
#include <QPluginLoader>
#include <QJsonObject>
#include <QJsonArray>
......
......@@ -27,8 +27,8 @@
#include <QDebug>
#include <KConfig>
#include <KSharedConfig>
#include <KConfigGroup>
#include <KGlobal>
#include <KPluginFactory>
class Q_DECL_HIDDEN KoPluginLoader::Private
......@@ -47,10 +47,11 @@ KoPluginLoader::~KoPluginLoader()
delete d;
}
Q_GLOBAL_STATIC(KoPluginLoader, pluginLoaderInstance)
KoPluginLoader* KoPluginLoader::instance()
{
K_GLOBAL_STATIC(KoPluginLoader, s_instance)
return s_instance;
return pluginLoaderInstance();
}
void KoPluginLoader::load(const QString & serviceType, const QString & versionString, const PluginsConfig &config, QObject* owner)
......
......@@ -112,8 +112,11 @@ public:
*/
void load(const QString & serviceType, const QString & versionString = QString(), const PluginsConfig &config = PluginsConfig(), QObject* owner = 0);
private:
public:
/// DO NOT USE! Use instance() instead
// TODO: turn KoPluginLoader into namespace and do not expose object at all
KoPluginLoader();
private:
KoPluginLoader(const KoPluginLoader&);
KoPluginLoader operator=(const KoPluginLoader&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment