Move Utils::Misc::isUrl() function

All usage of this function gets to call Net::DownloadManager eventually.
This commit is contained in:
Chocobo1
2018-12-29 20:38:51 +08:00
parent 6759446639
commit 2b903fc3d1
10 changed files with 20 additions and 18 deletions

View File

@@ -231,7 +231,7 @@ void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorre
{
AddNewTorrentDialog *dlg = new AddNewTorrentDialog(inParams, parent);
if (Utils::Misc::isUrl(source)) {
if (Net::DownloadManager::hasSupportedScheme(source)) {
// Launch downloader
// TODO: Don't save loaded torrent to file, just use downloaded data!
Net::DownloadHandler *handler = Net::DownloadManager::instance()->download(