┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <[email protected]>2020-11-28 10:47:39 +0100
committerElvis Angelaccio <[email protected]>2020-12-07 22:09:58 +0000
commit07b7f76f7c66b3cdf8d5a04dcd3a629e5993b21c (patch)
tree17e9cbd73d34bd685a896b0f848f4bb907087dff /src
parent3c6f1e6881c33a77a08292eb9bd12c44311d064e (diff)
dolphinpart: add JSON metadata to plugin, install into kf5/parts subdir
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/dolphinpart.cpp2
-rw-r--r--src/dolphinpart.desktop2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1955ce558..e8bb0c950 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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})
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index 75784b522..7aaefa6a0 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -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)
diff --git a/src/dolphinpart.desktop b/src/dolphinpart.desktop
index 0e7efd8e3..079efbe50 100644
--- a/src/dolphinpart.desktop
+++ b/src/dolphinpart.desktop
@@ -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