diff --git a/plugins/runcommand/runcommandplugin.cpp b/plugins/runcommand/runcommandplugin.cpp index 469908a19..a8e3548a5 100644 --- a/plugins/runcommand/runcommandplugin.cpp +++ b/plugins/runcommand/runcommandplugin.cpp @@ -85,7 +85,7 @@ bool RunCommandPlugin::receivePacket(const NetworkPacket& np) QProcess::startDetached(QStringLiteral(COMMAND), QStringList()<< QStringLiteral(ARGS) << commandJson[QStringLiteral("command")].toString()); return true; } else if (np.has(QStringLiteral("setup"))) { - QProcess::startDetached(QStringLiteral("kcmshell5"), {QStringLiteral("kdeconnect"), QStringLiteral("--args"), QString(device()->id() + QStringLiteral(":kdeconnect_runcommand")) }); + QProcess::startDetached(QStringLiteral("kdeconnect-settings"), { QStringLiteral("--args"), QString(device()->id() + QStringLiteral(":kdeconnect_runcommand")) }); } return false; diff --git a/settings/main.cpp b/settings/main.cpp index 6962672dc..3289fa116 100644 --- a/settings/main.cpp +++ b/settings/main.cpp @@ -19,6 +19,7 @@ */ #include +#include #include #include @@ -37,10 +38,17 @@ int main(int argc, char** argv) i18n("(C) 2018-2020 Nicolas Fella")); KAboutData::setApplicationData(about); + QCommandLineParser parser; + parser.addOption(QCommandLineOption(QStringLiteral("args"), i18n("Arguments for the config module"), QStringLiteral("args"))); + + about.setupCommandLine(&parser); + parser.process(app); + about.processCommandLine(&parser); + KDBusService dbusService(KDBusService::Unique); KCMultiDialog* dialog = new KCMultiDialog; - dialog->addModule(QStringLiteral("kcm_kdeconnect")); + dialog->addModule(QStringLiteral("kcm_kdeconnect"), {parser.value(QStringLiteral("args"))}); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show();