From 0ff81485f08f6a3c23306db802499790689a8577 Mon Sep 17 00:00:00 2001 From: Akira Ohgaki <akiraohgaki@gmail.com> Date: Tue, 11 Oct 2016 06:31:46 +0900 Subject: [PATCH] Result data --- src/handlers/xdgurl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/handlers/xdgurl.cpp b/src/handlers/xdgurl.cpp index b245a3b..0e2efa2 100644 --- a/src/handlers/xdgurl.cpp +++ b/src/handlers/xdgurl.cpp @@ -136,7 +136,8 @@ void XdgUrl::_saveDownloadedFile(QNetworkReply *reply) return; } - QString destination = _destinations[_metadata["type"].toString()].toString(); + QString type = _metadata["type"].toString(); + QString destination = _destinations[type].toString(); QString path = destination + "/" + _metadata["filename"].toString(); Utility::File::makeDir(destination); @@ -150,6 +151,7 @@ void XdgUrl::_saveDownloadedFile(QNetworkReply *reply) result["success"] = QString("download_success"); result["destination"] = destination; + result["path"] = path; emit finished(Utility::Json::convertObjToStr(result)); } -- GitLab