From 7e633b562cdf09e3042afebb08aa4a15d2f5eda9 Mon Sep 17 00:00:00 2001 From: Akira Ohgaki <akiraohgaki@gmail.com> Date: Thu, 29 Sep 2016 13:25:08 +0900 Subject: [PATCH] Install method for plasmapkg --- src/handlers/xdgurl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/handlers/xdgurl.cpp b/src/handlers/xdgurl.cpp index 08d21f5..abfdd66 100644 --- a/src/handlers/xdgurl.cpp +++ b/src/handlers/xdgurl.cpp @@ -1,6 +1,7 @@ #include <QDebug> #include <QUrl> #include <QUrlQuery> +#include <QProcess> #include "../core/config.h" #include "../core/network.h" @@ -129,7 +130,14 @@ QJsonObject XdgUrl::_importArchiveTypes() bool XdgUrl::_installPlasmapkg(const QString &path, const QString &type) { - return true; + QProcess process; + QStringList arguments; + arguments << "-t" << type << "-i" << path; + process.start("plasmapkg2", arguments); + if (process.waitForFinished()) { + return true; + } + return false; } bool XdgUrl::_uncompressArchive(const QString &path, const QString &targetDir) -- GitLab