Commit 961e7e26 authored by Alexander Lohnau's avatar Alexander Lohnau 💬 Committed by Stefano Crocco
Browse files

Port konqueror plugins to use embedded json metadata

Now the metadata is embedded as json in the plugin and we use
KPluginMetaData::findPlugins to locate those plugins.

With the metadata now being included in the binary plugin, those plugins need
to be installed in all the namespaces. This would increase the file duplication.
Instead a symlink to the plugin is installed in the namespaces.
The rc files are installed in a common directory to avoid the need for file
duplication or symlinks.

Consequently we no longer need the desktop to json conversion at runtimme
using KPluginMetaData::fromDesktopFile. This is planned to be deprecated,
see https://phabricator.kde.org/T14778.

To avoid having defunct ode party lying around, the unused methods of the imported KParts::Plugin
class were cleaned up.

This is also a requirement for https://phabricator.kde.org/T14564, because
the conversion should include all files in one go to reduce issues for the translators.

This is a follow-up of https://phabricator.kde.org/T13806.
parent 0e626f36
Pipeline #122038 passed with stage
in 3 minutes and 47 seconds
......@@ -9,10 +9,7 @@
#include "konq_kpart_plugin.h"
#include <KConfigGroup>
#include <KDesktopFile>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KPluginLoader>
#include <KPluginMetaData>
#include <KService>
#include <KSharedConfig>
......@@ -30,7 +27,7 @@ class PluginPrivate
{
public:
QString m_parentInstance;
QString m_library; // filename of the library
QString m_pluginId;
};
Plugin::Plugin(QObject *parent)
......@@ -71,47 +68,31 @@ QList<Plugin::PluginInfo> Plugin::pluginInfos(const QString &componentName)
{
QList<PluginInfo> plugins;
QMap<QString, QStringList> sortedPlugins;
const QStringList dirs =
QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, componentName + QLatin1String("/kpartplugins"), QStandardPaths::LocateDirectory);
for (const QString &dir : dirs) {
const auto rcfiles = QDir(dir).entryList(QStringList(QStringLiteral("*.rc")));
for (const QString &file : rcfiles) {
const QFileInfo fInfo(dir + QLatin1Char('/') + file);
QMap<QString, QStringList>::Iterator mapIt = sortedPlugins.find(fInfo.fileName());
if (mapIt == sortedPlugins.end()) {
mapIt = sortedPlugins.insert(fInfo.fileName(), QStringList());
}
mapIt.value().append(fInfo.absoluteFilePath());
}
}
QVector<KPluginMetaData> metaDataList = KPluginMetaData::findPlugins(componentName + QStringLiteral("/kpartplugins"));
std::sort(metaDataList.begin(), metaDataList.end(), [](const KPluginMetaData &d1, const KPluginMetaData &d2) {
return d1.pluginId() < d2.pluginId();
});
QMap<QString, QStringList>::ConstIterator mapIt = sortedPlugins.constBegin();
QMap<QString, QStringList>::ConstIterator mapEnd = sortedPlugins.constEnd();
for (; mapIt != mapEnd; ++mapIt) {
for (const KPluginMetaData &data : metaDataList) {
PluginInfo info;
info.m_metaData = data;
QString doc;
info.m_absXMLFileName = KXMLGUIClient::findMostRecentXMLFile(mapIt.value(), doc);
const QString fullComponentName = QStringLiteral("konqueror/partsrcfiles/") + QFileInfo(data.fileName()).baseName();
const auto files = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, fullComponentName + QLatin1String(".rc"));
info.m_absXMLFileName = KXMLGUIClient::findMostRecentXMLFile(files, doc);
doc = KXMLGUIFactory::readConfigFile(info.m_absXMLFileName);
if (info.m_absXMLFileName.isEmpty()) {
continue;
}
// qDebug() << "found KParts Plugin : " << info.m_absXMLFileName;
info.m_relXMLFileName = QLatin1String("kpartplugins/") + mapIt.key();
info.m_document.setContent(doc);
if (info.m_document.documentElement().isNull()) {
continue;
}
const QString guessedService = info.m_absXMLFileName.replace(QLatin1String(".rc"), QLatin1String(".desktop"));
if (!guessedService.isEmpty() && QFileInfo::exists(guessedService)) {
KDesktopFile file(guessedService);
const QString tryExec = file.desktopGroup().readEntry("TryExec");
if (!tryExec.isEmpty() && QStandardPaths::findExecutable(tryExec).isEmpty()) {
continue;
}
const QString tryExec = data.value(QStringLiteral("TryExec"));
if (!tryExec.isEmpty() && QStandardPaths::findExecutable(tryExec).isEmpty()) {
continue;
}
plugins.append(info);
......@@ -120,51 +101,31 @@ QList<Plugin::PluginInfo> Plugin::pluginInfos(const QString &componentName)
return plugins;
}
void Plugin::loadPlugins(QObject *parent, const QString &componentName)
{
loadPlugins(parent, pluginInfos(componentName), componentName);
}
void Plugin::loadPlugins(QObject *parent, const QList<PluginInfo> &pluginInfos, const QString &componentName)
{
for (const auto &pluginInfo : pluginInfos) {
const QString library = pluginInfo.m_document.documentElement().attribute(QStringLiteral("library"));
if (library.isEmpty() || hasPlugin(parent, library)) {
if (hasPlugin(parent, pluginInfo.m_metaData.pluginId())) {
continue;
}
Plugin *plugin = loadPlugin(parent, library, pluginInfo.m_document.documentElement().attribute(QStringLiteral("X-KDE-PluginKeyword")));
Plugin *plugin = loadPlugin(parent, pluginInfo.m_metaData);
if (plugin) {
plugin->d->m_parentInstance = componentName;
plugin->setXMLFile(pluginInfo.m_relXMLFileName, false, false);
plugin->setXMLFile(pluginInfo.m_absXMLFileName, false, false);
plugin->setDOMDocument(pluginInfo.m_document);
}
}
}
void Plugin::loadPlugins(QObject *parent, const QList<PluginInfo> &pluginInfos)
{
loadPlugins(parent, pluginInfos, QString());
}
// static
Plugin *Plugin::loadPlugin(QObject *parent, const QString &libname, const QString &keyword)
Plugin *Plugin::loadPlugin(QObject *parent, const KPluginMetaData &data)
{
KPluginLoader loader(libname);
KPluginFactory *factory = loader.factory();
if (!factory) {
return nullptr;
}
Plugin *plugin = factory->create<Plugin>(keyword, parent);
if (!plugin) {
return nullptr;
auto pluginResult = KPluginFactory::instantiatePlugin<Plugin>(data, parent);
if (pluginResult) {
pluginResult.plugin->d->m_pluginId = data.pluginId();
}
plugin->d->m_library = libname;
return plugin;
return pluginResult.plugin;
}
QList<KonqParts::Plugin *> Plugin::pluginObjects(QObject *parent)
......@@ -179,13 +140,13 @@ QList<KonqParts::Plugin *> Plugin::pluginObjects(QObject *parent)
return objects;
}
bool Plugin::hasPlugin(QObject *parent, const QString &library)
bool Plugin::hasPlugin(QObject *parent, const QString &pluginId)
{
const QObjectList plugins = parent->children();
return std::any_of(plugins.begin(), plugins.end(), [&library](QObject *p) {
return std::any_of(plugins.begin(), plugins.end(), [&pluginId](QObject *p) {
Plugin *plugin = qobject_cast<Plugin *>(p);
return (plugin && plugin->d->m_library == library);
return (plugin && plugin->d->m_pluginId == pluginId);
});
}
......@@ -196,60 +157,21 @@ void Plugin::setMetaData(const KPluginMetaData &metaData)
KXMLGUIClient::setComponentName(metaData.pluginId(), metaData.name());
}
void Plugin::loadPlugins(QObject *parent,
KXMLGUIClient *parentGUIClient,
const QString &componentName,
bool enableNewPluginsByDefault,
int interfaceVersionRequired)
void Plugin::loadPlugins(QObject *parent, KXMLGUIClient *parentGUIClient, const QString &componentName)
{
KConfigGroup cfgGroup(KSharedConfig::openConfig(componentName + QLatin1String("rc")), "KParts Plugins");
const QList<PluginInfo> plugins = pluginInfos(componentName);
for (const auto &pluginInfo : plugins) {
QDomElement docElem = pluginInfo.m_document.documentElement();
QString library = docElem.attribute(QStringLiteral("library"));
QString keyword;
if (library.isEmpty()) {
continue;
}
// Check configuration
const QString name = docElem.attribute(QStringLiteral("name"));
bool pluginEnabled = enableNewPluginsByDefault;
if (cfgGroup.hasKey(name + QLatin1String("Enabled"))) {
pluginEnabled = cfgGroup.readEntry(name + QLatin1String("Enabled"), false);
} else { // no user-setting, load plugin default setting
QString relPath = componentName + QLatin1Char('/') + pluginInfo.m_relXMLFileName;
relPath.truncate(relPath.lastIndexOf(QLatin1Char('.'))); // remove extension
relPath += QLatin1String(".desktop");
// qDebug() << "looking for " << relPath;
const QString desktopfile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, relPath);
if (!desktopfile.isEmpty()) {
// qDebug() << "loadPlugins found desktop file for " << name << ": " << desktopfile;
KDesktopFile _desktop(desktopfile);
const KConfigGroup desktop = _desktop.desktopGroup();
keyword = desktop.readEntry("X-KDE-PluginKeyword", "");
pluginEnabled = desktop.readEntry("X-KDE-PluginInfo-EnabledByDefault", enableNewPluginsByDefault);
if (interfaceVersionRequired != 0) {
const int version = desktop.readEntry("X-KDE-InterfaceVersion", 1);
if (version != interfaceVersionRequired) {
// qDebug() << "Discarding plugin " << name << ", interface version " << version << ", expected " << interfaceVersionRequired;
pluginEnabled = false;
}
}
} else {
// qDebug() << "loadPlugins no desktop file found in " << relPath;
}
}
bool pluginEnabled = pluginInfo.m_metaData.isEnabled(cfgGroup);
// search through already present plugins
const QObjectList pluginList = parent->children();
bool pluginFound = false;
for (auto *p : pluginList) {
Plugin *plugin = qobject_cast<Plugin *>(p);
if (plugin && plugin->d->m_library == library) {
if (plugin && plugin->d->m_pluginId == pluginInfo.m_metaData.pluginId()) {
// delete and unload disabled plugins
if (!pluginEnabled) {
// qDebug() << "remove plugin " << name;
......@@ -272,11 +194,11 @@ void Plugin::loadPlugins(QObject *parent,
}
// qDebug() << "load plugin " << name << " " << library << " " << keyword;
Plugin *plugin = loadPlugin(parent, library, keyword);
Plugin *plugin = loadPlugin(parent, pluginInfo.m_metaData);
if (plugin) {
plugin->d->m_parentInstance = componentName;
plugin->setXMLFile(pluginInfo.m_relXMLFileName, false, false);
plugin->setXMLFile(pluginInfo.m_absXMLFileName, false, false);
plugin->setDOMDocument(pluginInfo.m_document);
parentGUIClient->insertChildClient(plugin);
}
......
......@@ -10,6 +10,7 @@
#include <libkonq_export.h>
#include <KPluginMetaData>
#include <KXMLGUIClient>
#include <QDomElement>
#include <QObject>
......@@ -45,9 +46,8 @@ class LIBKONQ_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
Q_OBJECT
public:
struct PluginInfo {
QString m_relXMLFileName; // relative filename, i.e. kpartplugins/name
KPluginMetaData m_metaData;
QString m_absXMLFileName; // full path of most recent filename matching the relative
// filename
QDomDocument m_document;
};
......@@ -70,24 +70,6 @@ public:
*/
QString localXMLFile() const override;
/**
* Load the plugin libraries from the directories appropriate
* to @p instance and make the Plugin objects children of @p parent.
*
* It is recommended to use the last loadPlugins method instead,
* to support enabling and disabling of plugins.
*/
static void loadPlugins(QObject *parent, const QString &instance);
/**
* Load the plugin libraries specified by the list @p docs and make the
* Plugin objects children of @p parent .
*
* It is recommended to use the last loadPlugins method instead,
* to support enabling and disabling of plugins.
*/
static void loadPlugins(QObject *parent, const QList<PluginInfo> &pluginInfos);
/**
* Load the plugin libraries specified by the list @p pluginInfos, make the
* Plugin objects children of @p parent, and use the given @p instance.
......@@ -103,21 +85,10 @@ public:
* of @p parentGUIClient.
*
* This method uses the KConfig object of the given instance, to find out which
* plugins are enabled and which are disabled. What happens by default (i.e.
* for new plugins that are not in that config file) is controlled by
* @p enableNewPluginsByDefault. It can be overridden by the plugin if it
* sets the X-KDE-PluginInfo-EnabledByDefault key in the .desktop file
* (with the same name as the .rc file)
*
* plugins are enabled and which are disabled.
* If a disabled plugin is already loaded it will be removed from the GUI
* factory and deleted.
*
* If you change the binary interface offered by your part, you can avoid crashes
* from old plugins lying around by setting X-KDE-InterfaceVersion=2 in the
* .desktop files of the plugins, and passing 2 to @p interfaceVersionRequired, so that
* the old plugins are not loaded. Increase both numbers every time a
* binary incompatible change in the application's plugin interface is made.
*
*
* This method is automatically called by KParts::Part and by KParts::MainWindow.
* @see PartBase::setPluginLoadingMode, PartBase::setPluginInterfaceVersion
......@@ -134,11 +105,7 @@ public:
* }
* \endcode
*/
static void loadPlugins(QObject *parent,
KXMLGUIClient *parentGUIClient,
const QString &instance,
bool enableNewPluginsByDefault = true,
int interfaceVersionRequired = 0);
static void loadPlugins(QObject *parent, KXMLGUIClient *parentGUIClient, const QString &instance);
/**
* Returns a list of plugin objects loaded for @p parent. This
......@@ -165,10 +132,10 @@ private:
* @internal
* @return The plugin created from the library @p libname
*/
static Plugin *loadPlugin(QObject *parent, const QString &libname, const QString &keyword = QString());
static Plugin *loadPlugin(QObject *parent, const KPluginMetaData &data);
private:
static bool hasPlugin(QObject *parent, const QString &library);
static bool hasPlugin(QObject *parent, const QString &pluginId);
std::unique_ptr<PluginPrivate> const d;
};
......
......@@ -3,6 +3,21 @@ find_package(Qt5TextToSpeech ${QT_REQUIRED_VERSION} QUIET)
set_package_properties(Qt5TextToSpeech PROPERTIES
PURPOSE "Gives Konqueror a plugin to speak portions or all of a website")
function (konqueror_install_plugin_in_namespaces name)
install(TARGETS ${name} DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES ${name}.rc DESTINATION ${KDE_INSTALL_DATADIR}/konqueror/partsrcfiles)
# install the symlink in all the given nammespace, we do not want to duplicate the actual files
set(namespace_list khtml/kpartplugins kwebkitpart/kpartplugins webenginepart/kpartplugins)
foreach(INSTALL_NAMESPACE ${namespace_list})
string(REPLACE "/" "_" install_namespace_file ${INSTALL_NAMESPACE})
add_custom_command(TARGET ${name} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink ../../${name}.so ${CMAKE_CURRENT_BINARY_DIR}/${name}${install_namespace_file}.so)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}${install_namespace_file}.so DESTINATION ${KDE_INSTALL_PLUGINDIR}/${INSTALL_NAMESPACE})
endforeach()
endfunction()
add_subdirectory( khtmlsettingsplugin )
add_subdirectory( kimgalleryplugin )
add_subdirectory( dirfilter )
......
......@@ -17,18 +17,14 @@ set(akregatorkonqfeedicon_PART_SRCS konqfeedicon.cpp feeddetector.cpp pluginutil
add_library(akregatorkonqfeedicon MODULE ${akregatorkonqfeedicon_PART_SRCS} ${akregatorplugin_DEBUG_SRCS})
kcoreaddons_desktop_to_json(akregatorkonqfeedicon akregator_konqfeedicon.desktop)
target_compile_definitions(akregatorkonqfeedicon PRIVATE TRANSLATION_DOMAIN="akregator_konqplugin")
target_link_libraries(akregatorkonqfeedicon KF5::I18n KF5::IconThemes KF5Konq)
install(TARGETS akregatorkonqfeedicon DESTINATION ${KDE_INSTALL_PLUGINDIR} )
konqueror_install_plugin_in_namespaces(akregatorkonqfeedicon)
########### install files ###############
install( FILES akregator_konqplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
install( FILES akregator_konqfeedicon.desktop akregator_konqfeedicon.rc DESTINATION ${KDE_INSTALL_DATADIR}/khtml/kpartplugins )
install( FILES akregator_konqfeedicon.desktop akregator_konqfeedicon.rc DESTINATION ${KDE_INSTALL_DATADIR}/kwebkitpart/kpartplugins )
install( FILES akregator_konqfeedicon.desktop akregator_konqfeedicon.rc DESTINATION ${KDE_INSTALL_DATADIR}/webenginepart/kpartplugins )
install( FILES feed.png DESTINATION ${KDE_INSTALL_DATADIR}/akregator/pics )
# contains list of debug categories, for kdebugsettings
......
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="konqfeedicon" library="akregatorkonqfeedicon" version="2" translationDomain="akregator_konqplugin">
</gui>
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="konqfeedicon" version="2" translationDomain="akregator_konqplugin">
</gui>
......@@ -29,7 +29,7 @@
using namespace Akregator;
K_PLUGIN_FACTORY(KonqFeedIconFactory, registerPlugin<KonqFeedIcon>();)
K_PLUGIN_CLASS_WITH_JSON(KonqFeedIcon, "akregator_konqfeedicon.json")
static QUrl baseUrl(KParts::ReadOnlyPart *part)
{
......
......@@ -10,14 +10,7 @@ set(autorefresh_PART_SRCS autorefresh.cpp )
add_library(autorefresh MODULE ${autorefresh_PART_SRCS})
kcoreaddons_desktop_to_json(autorefresh autorefresh.desktop)
target_link_libraries(autorefresh KF5::I18n KF5::Parts KF5::IconThemes KF5Konq)
install(TARGETS autorefresh DESTINATION ${KDE_INSTALL_PLUGINDIR} )
########### install files ###############
install( FILES autorefresh.rc autorefresh.desktop DESTINATION ${KDE_INSTALL_DATADIR}/khtml/kpartplugins )
install( FILES autorefresh.rc autorefresh.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kwebkitpart/kpartplugins )
install( FILES autorefresh.rc autorefresh.desktop DESTINATION ${KDE_INSTALL_DATADIR}/webenginepart/kpartplugins )
konqueror_install_plugin_in_namespaces(autorefresh)
......@@ -108,7 +108,7 @@ void AutoRefresh::slotRefresh()
}
}
K_PLUGIN_FACTORY(AutoRefreshFactory, registerPlugin< AutoRefresh >();)
K_PLUGIN_CLASS_WITH_JSON(AutoRefresh, "autorefresh.json")
#include "autorefresh.moc"
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui library="autorefresh" name="autorefresh" version="3" translationDomain="autorefresh">
<gui name="autorefresh" version="3" translationDomain="autorefresh">
<MenuBar>
<Menu name="tools">
<text>&amp;Tools</text>
......
......@@ -6,17 +6,11 @@ set(babelfishplugin_PART_SRCS plugin_babelfish.cpp )
add_library(babelfishplugin MODULE ${babelfishplugin_PART_SRCS})
kcoreaddons_desktop_to_json(babelfishplugin plugin_translator.desktop)
target_link_libraries(babelfishplugin KF5::I18n KF5::Parts KF5Konq)
install(TARGETS babelfishplugin DESTINATION ${KDE_INSTALL_PLUGINDIR} )
########### install files ###############
install( FILES plugin_babelfish.rc plugin_translator.desktop DESTINATION ${KDE_INSTALL_DATADIR}/khtml/kpartplugins )
install( FILES translaterc DESTINATION ${KDE_INSTALL_CONFDIR} )
install( FILES plugin_babelfish.rc plugin_translator.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kwebkitpart/kpartplugins )
install( FILES plugin_babelfish.rc plugin_translator.desktop DESTINATION ${KDE_INSTALL_DATADIR}/webenginepart/kpartplugins )
konqueror_install_plugin_in_namespaces(babelfishplugin)
install(FILES translaterc DESTINATION ${KDE_INSTALL_CONFDIR})
set(babelfish_ICONS 16-actions-babelfish.png 22-actions-babelfish.png)
......
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="babelfish" library="babelfishplugin" version="2" translationDomain="babelfish">
<gui name="babelfish" version="2" translationDomain="babelfish">
<MenuBar>
<Menu name="tools"><text>&amp;Tools</text>
<Action name="translatewebpage"/>
......
......@@ -33,7 +33,7 @@
#include <QDebug>
static const KAboutData aboutdata(QStringLiteral("babelfish"), i18n("Translate Web Page"), QStringLiteral("1.0"));
K_PLUGIN_FACTORY(BabelFishFactory, registerPlugin<PluginBabelFish>();)
K_PLUGIN_CLASS_WITH_JSON(PluginBabelFish, "plugin_translator.json")
PluginBabelFish::PluginBabelFish(QObject *parent,
const QVariantList &)
......
......@@ -4,11 +4,7 @@ set(dirfilterplugin_PART_SRCS dirfilterplugin.cpp )
add_library(dirfilterplugin MODULE ${dirfilterplugin_PART_SRCS})
kcoreaddons_desktop_to_json(dirfilterplugin dirfilterplugin.desktop)
target_link_libraries(dirfilterplugin KF5::I18n KF5::Parts KF5Konq)
install(TARGETS dirfilterplugin DESTINATION ${KDE_INSTALL_PLUGINDIR} )
########### install files ###############
install( FILES dirfilterplugin.rc dirfilterplugin.desktop DESTINATION ${KDE_INSTALL_DATADIR}/dolphinpart/kpartplugins )
konqueror_install_plugin_in_namespaces(dirfilterplugin)
......@@ -532,6 +532,6 @@ void DirFilterPlugin::setFilterBar()
}
}
K_PLUGIN_FACTORY(DirFilterFactory, registerPlugin<DirFilterPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(DirFilterPlugin, "dirfilterplugin.json")
#include "dirfilterplugin.moc"
<!DOCTYPE gui>
<gui name="DirFilter" library="dirfilterplugin" version="5" translationDomain="dirfilterplugin">
<gui name="DirFilter" version="5" translationDomain="dirfilterplugin">
<MenuBar>
<Menu name="tools"><Text>&amp;Tools</Text>
<Action name="filterdir"/>
......
......@@ -7,14 +7,9 @@ target_sources(konqueror_kget_browser_integration PRIVATE
kget_plugin.cpp
${kget_browser_integration_dbus_SRCS}
)
kcoreaddons_desktop_to_json(konqueror_kget_browser_integration kget_plugin.desktop)
target_link_libraries(konqueror_kget_browser_integration KF5::CoreAddons KF5::I18n KF5::IconThemes KF5Konq)
target_compile_definitions(konqueror_kget_browser_integration PRIVATE TRANSLATION_DOMAIN="kgetplugin")
install(TARGETS konqueror_kget_browser_integration DESTINATION ${KDE_INSTALL_PLUGINDIR})
########### install files ###############
install(FILES kget_plugin.rc kget_plugin.desktop DESTINATION ${KDE_INSTALL_DATADIR}/khtml/kpartplugins)
install(FILES kget_plugin.rc kget_plugin.desktop DESTINATION ${KDE_INSTALL_DATADIR}/dolphinpart/kpartplugins)
install(FILES kget_plugin.rc kget_plugin.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kwebkitpart/kpartplugins)
konqueror_install_plugin_in_namespaces(konqueror_kget_browser_integration)
......@@ -43,7 +43,7 @@
#define QL1S(x) QLatin1String(x)
K_PLUGIN_FACTORY(KGetPluginFactory, registerPlugin<KGetPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(KGetPlugin, "kget_plugin.json")
static QWidget *partWidget(QObject *obj)
{
......
<!DOCTYPE kpartplugin>
<kpartplugin library="konqueror_kget_browser_integration" name="konqueror_kget_browser_integration" version="5">
<kpartplugin name="konqueror_kget_browser_integration" version="5">
<MenuBar>
<Menu name="tools"><text>&amp;Tools</text>
<Action name="kget_menu"/>
......
......@@ -17,20 +17,4 @@ kcoreaddons_desktop_to_json(khtmlsettingsplugin ${CMAKE_CURRENT_BINARY_DIR}/khtm
target_link_libraries(khtmlsettingsplugin KF5::I18n KF5::Parts KF5Konq)
install(TARGETS khtmlsettingsplugin DESTINATION ${KDE_INSTALL_PLUGINDIR} )
########### install files ###############
install(
FILES khtmlsettingsplugin.rc ${CMAKE_CURRENT_BINARY_DIR}/khtmlsettingsplugin.desktop
DESTINATION ${KDE_INSTALL_DATADIR}/khtml/kpartplugins
)
install(
FILES khtmlsettingsplugin.rc ${CMAKE_CURRENT_BINARY_DIR}/khtmlsettingsplugin.desktop
DESTINATION ${KDE_INSTALL_DATADIR}/kwebkitpart/kpartplugins
)
install(
FILES khtmlsettingsplugin.rc ${CMAKE_CURRENT_BINARY_DIR}/khtmlsettingsplugin.desktop
DESTINATION ${KDE_INSTALL_DATADIR}/webenginepart/kpartplugins
)
konqueror_install_plugin_in_namespaces(khtmlsettingsplugin)
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