Skip to content
Snippets Groups Projects
Commit 7e6701db authored by akiraohgaki's avatar akiraohgaki
Browse files

Process

parent 3b42a65a
No related branches found
No related tags found
No related merge requests found
......@@ -188,12 +188,12 @@ bool XdgUrl::_uncompressArchive(const QString &path, const QString &targetDir)
return false;
}
bool XdgUrl::_download()
void XdgUrl::_download()
{
return true;
}
bool XdgUrl::_install()
void XdgUrl::_install()
{
return true;
}
......@@ -243,9 +243,21 @@ bool XdgUrl::isValid()
return isValid;
}
bool XdgUrl::process()
void XdgUrl::process()
{
return true;
/**
* xdgs scheme is a reserved name, so the process of xdgs
* is the same process of the xdg scheme currently.
*/
if (isValid()) {
if (_metadata["command"].toString() == "download") {
_download();
}
else if (_metadata["command"].toString() == "install") {
_install();
}
}
}
} // namespace Handlers
......@@ -37,8 +37,8 @@ private:
QJsonObject _loadArchiveTypes();
bool _installPlasmapkg(const QString &path, const QString &type = "plasmoid");
bool _uncompressArchive(const QString &path, const QString &targetDir);
bool _download();
bool _install();
void _download();
void _install();
private slots:
......@@ -46,7 +46,7 @@ public slots:
QString getXdgUrl();
QString getMetadata();
bool isValid();
bool process();
void process();
signals:
void downloaded(const QString &result);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment