dolphinpart: add JSON metadata to plugin, install into kf5/parts subdir

This commit is contained in:
Friedrich W. H. Kossebau 2020-11-28 10:47:39 +01:00 committed by Elvis Angelaccio
parent 3c6f1e6881
commit 07b7f76f7c
3 changed files with 4 additions and 3 deletions

View file

@ -186,12 +186,13 @@ set(dolphinpart_SRCS
qt5_add_resources(dolphinpart_SRCS dolphinpart.qrc)
add_library(dolphinpart MODULE ${dolphinpart_SRCS})
kcoreaddons_desktop_to_json(dolphinpart dolphinpart.desktop)
target_link_libraries(dolphinpart
dolphinprivate
)
install(TARGETS dolphinpart DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(TARGETS dolphinpart DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/parts)
install(FILES dolphinpart.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})

View file

@ -45,7 +45,7 @@
#include <QStandardPaths>
#include <QTextDocument>
K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();)
K_PLUGIN_CLASS_WITH_JSON(DolphinPart, "dolphinpart.json")
DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args)
: KParts::ReadOnlyPart(parent)

View file

@ -51,7 +51,7 @@ Name[zh_CN]=Dolphin 视图
Name[zh_TW]=Dolphin
MimeType=inode/directory;
X-KDE-ServiceTypes=KParts/ReadOnlyPart,Browser/View
X-KDE-Library=dolphinpart
X-KDE-Library=kf5/parts/dolphinpart
#X-KDE-BrowserView-Args=Icon
X-KDE-BrowserView-HideFromMenus=true
X-KDE-BrowserView-Built-Into=konqueror