Commit 0a54612c authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[kded] Port plugin metadata to JSON

Summary: Use the modern way of doing things

Test Plan: Check for Print Manager in kded KCM

Reviewers: #frameworks, dantti, #kf6, dfaure

Reviewed By: dfaure

Subscribers: dfaure, apol, kde-utils-devel

Maniphest Tasks: T11919

Differential Revision: https://phabricator.kde.org/D25233
parent 94ad8325
......@@ -11,6 +11,7 @@ qt5_add_dbus_adaptor(printmanagerkded_SRCS
)
add_library(kded_printmanager MODULE ${printmanagerkded_SRCS})
set_target_properties(kded_printmanager PROPERTIES OUTPUT_NAME printmanager)
target_link_libraries(kded_printmanager
Qt5::Core
......@@ -19,6 +20,5 @@ target_link_libraries(kded_printmanager
kcupslib
)
install(TARGETS kded_printmanager DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES printmanager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded)
install(TARGETS kded_printmanager DESTINATION ${PLUGIN_INSTALL_DIR}/kf5/kded)
install(FILES printmanager.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
......@@ -20,8 +20,12 @@
#include "PrintManagerKded.h"
#include <KPluginFactory>
#include "NewPrinterNotification.h"
K_PLUGIN_CLASS_WITH_JSON(PrintManagerKded, "printmanager.json")
PrintManagerKded::PrintManagerKded(QObject *parent, const QVariantList &args) :
KDEDModule(parent)
{
......@@ -34,4 +38,4 @@ PrintManagerKded::~PrintManagerKded()
{
}
#include "moc_PrintManagerKded.cpp"
#include "PrintManagerKded.moc"
......@@ -34,6 +34,4 @@ public:
~PrintManagerKded();
};
K_PLUGIN_FACTORY(PrintDFactory, registerPlugin<PrintManagerKded>();)
#endif // PRINTMANAGERKDED_H
{
"KPlugin": {
"Description": "Inform when a new printer is detected, and print problems",
"Name": "Print Manager",
"ServiceTypes": [
"KDEDModule"
]
},
"OnlyShowIn": "KDE;",
"X-KDE-Kded-autoload": true,
"X-KDE-Kded-phase": 1,
"X-KDE-ModuleType": "Library"
}
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