diff --git a/CMakeLists.txt b/CMakeLists.txt index ca7b634..99b578e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,5 +80,5 @@ add_dependencies(krunner_pass kcm_krunner_pass) install(TARGETS kcm_krunner_pass DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/kf5/krunner/kcms) install(TARGETS krunner_pass DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/kf5/krunner) -install(FILES plasma-runner-pass.desktop plasma-runner-pass_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +install(FILES plasma-runner-pass_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}) install(FILES krunner_pass.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR}) diff --git a/pass.cpp b/pass.cpp index e6ea9c0..49103b6 100644 --- a/pass.cpp +++ b/pass.cpp @@ -38,9 +38,10 @@ using namespace std; +K_PLUGIN_CLASS_WITH_JSON(Pass, "pass.json") -Pass::Pass(QObject *parent, const QVariantList &args) - : Plasma::AbstractRunner(parent, args) +Pass::Pass(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args) + : Plasma::AbstractRunner(parent, metaData, args) { // General runner configuration setObjectName(QStringLiteral("Pass")); @@ -268,6 +269,4 @@ void Pass::showNotification(const QString &text, const QString &actionName) "krunner_pass"); } -K_EXPORT_PLASMA_RUNNER(pass, Pass) - #include "pass.moc" diff --git a/pass.h b/pass.h index 1218b87..29184d8 100644 --- a/pass.h +++ b/pass.h @@ -30,7 +30,7 @@ class Pass : public Plasma::AbstractRunner Q_OBJECT public: - Pass(QObject *parent, const QVariantList &args); + Pass(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args); ~Pass() override; void clip(const QString &msg); diff --git a/pass.json b/pass.json new file mode 100644 index 0000000..bdfb7d1 --- /dev/null +++ b/pass.json @@ -0,0 +1,22 @@ +{ + "KPlugin": { + "Authors": [ + { + "Email": "fuermetz@mailbox.org", + "Name": "Lukas Fürmetz" + }, + { + "Email": "me@thaodan.de", + "Name": "Björn Bidar" + } + ], + "Description": "Copies a password from the password store (https://www.passwordstore.org/) to the clipboard", + "EnabledByDefault": true, + "Icon": "preferences-desktop-font", + "Id": "Pass", + "License": "GPL", + "Name": "Pass", + "Version": "1.1.0" + }, + "X-Plasma-AdvertiseSingleRunnerQueryMode": true +} diff --git a/plasma-runner-pass.desktop b/plasma-runner-pass.desktop deleted file mode 100644 index 1606799..0000000 --- a/plasma-runner-pass.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Name=Pass -Comment=Copies a password from the password store (https://www.passwordstore.org/) to the clipboard -X-KDE-ServiceTypes=Plasma/Runner -Type=Service -Icon=preferences-desktop-font -X-KDE-Library=krunner_pass -X-KDE-PluginInfo-Author=Lukas Fürmetz -X-KDE-PluginInfo-Email=fuermetz@mailbox.org -X-KDE-PluginInfo-Name=Pass -X-KDE-PluginInfo-Version=1.1.0 -X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-EnabledByDefault=true -X-Plasma-AdvertiseSingleRunnerQueryMode=true