mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Move Utils::Misc::isUrl() function
All usage of this function gets to call Net::DownloadManager eventually.
This commit is contained in:
parent
6759446639
commit
2b903fc3d1
10 changed files with 20 additions and 18 deletions
|
@ -60,6 +60,7 @@
|
|||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/global.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/rss/rss_folder.h"
|
||||
#include "base/rss/rss_session.h"
|
||||
|
@ -1295,7 +1296,7 @@ void MainWindow::dropEvent(QDropEvent *event)
|
|||
for (const QString &file : asConst(files)) {
|
||||
const bool isTorrentLink = (file.startsWith("magnet:", Qt::CaseInsensitive)
|
||||
|| file.endsWith(C_TORRENT_FILE_EXTENSION, Qt::CaseInsensitive)
|
||||
|| Utils::Misc::isUrl(file));
|
||||
|| Net::DownloadManager::hasSupportedScheme(file));
|
||||
if (isTorrentLink)
|
||||
torrentFiles << file;
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue