mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 13:48:05 -06:00
Allow drop action only on transfer list
Now drop action is only allowed on transfer list, previously it was on main window. Having drop action on the whole main window is not preferred because it could allow drop action on other unrelated widgets, such as execution log or RSS widget which is unexpected behavior. PR #21332.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <QStringView>
|
||||
#include <QSysInfo>
|
||||
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/path.h"
|
||||
#include "base/unicodestrings.h"
|
||||
#include "base/utils/string.h"
|
||||
@@ -212,6 +213,14 @@ bool Utils::Misc::isPreviewable(const Path &filePath)
|
||||
return multimediaExtensions.contains(filePath.extension().toUpper());
|
||||
}
|
||||
|
||||
bool Utils::Misc::isTorrentLink(const QString &str)
|
||||
{
|
||||
return str.startsWith(u"magnet:", Qt::CaseInsensitive)
|
||||
|| str.endsWith(TORRENT_FILE_EXTENSION, Qt::CaseInsensitive)
|
||||
|| (!str.startsWith(u"file:", Qt::CaseInsensitive)
|
||||
&& Net::DownloadManager::hasSupportedScheme(str));
|
||||
}
|
||||
|
||||
QString Utils::Misc::userFriendlyDuration(const qlonglong seconds, const qlonglong maxCap, const TimeResolution resolution)
|
||||
{
|
||||
if (seconds < 0)
|
||||
|
||||
Reference in New Issue
Block a user