Use new DownloadManager interface

This commit is contained in:
Vladimir Golovnev (Glassez)
2018-06-25 20:31:32 +03:00
parent 8d438e159c
commit 112a9bcfa2
15 changed files with 47 additions and 57 deletions

View File

@@ -292,7 +292,8 @@ void PluginSelectDialog::addNewPlugin(QString pluginName)
else {
// Icon is missing, we must download it
using namespace Net;
DownloadHandler *handler = DownloadManager::instance()->downloadUrl(plugin->url + "/favicon.ico", true);
DownloadHandler *handler = DownloadManager::instance()->download(
DownloadRequest(plugin->url + "/favicon.ico").saveToFile(true));
connect(handler, static_cast<void (DownloadHandler::*)(const QString &, const QString &)>(&DownloadHandler::downloadFinished)
, this, &PluginSelectDialog::iconDownloaded);
connect(handler, &DownloadHandler::downloadFailed, this, &PluginSelectDialog::iconDownloadFailed);