mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-03-10 04:11:16 +00:00
commit
2bfaa8229a
@ -33,11 +33,11 @@ namespace BitTorrent
|
||||
bool isValidDownloadPriority(const DownloadPriority priority)
|
||||
{
|
||||
switch (priority) {
|
||||
case BitTorrent::DownloadPriority::Ignored:
|
||||
case BitTorrent::DownloadPriority::Normal:
|
||||
case BitTorrent::DownloadPriority::High:
|
||||
case BitTorrent::DownloadPriority::Maximum:
|
||||
case BitTorrent::DownloadPriority::Mixed:
|
||||
case DownloadPriority::Ignored:
|
||||
case DownloadPriority::Normal:
|
||||
case DownloadPriority::High:
|
||||
case DownloadPriority::Maximum:
|
||||
case DownloadPriority::Mixed:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -4717,7 +4717,7 @@ void Session::handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert
|
||||
|
||||
void Session::handleStateUpdateAlert(const lt::state_update_alert *p)
|
||||
{
|
||||
QVector<BitTorrent::TorrentHandle *> updatedTorrents;
|
||||
QVector<TorrentHandle *> updatedTorrents;
|
||||
updatedTorrents.reserve(p->status.size());
|
||||
|
||||
for (const lt::torrent_status &status : p->status) {
|
||||
|
@ -492,39 +492,39 @@ namespace BitTorrent
|
||||
void categoryRemoved(const QString &categoryName);
|
||||
void downloadFromUrlFailed(const QString &url, const QString &reason);
|
||||
void downloadFromUrlFinished(const QString &url);
|
||||
void fullDiskError(BitTorrent::TorrentHandle *const torrent, const QString &msg);
|
||||
void fullDiskError(TorrentHandle *torrent, const QString &msg);
|
||||
void IPFilterParsed(bool error, int ruleCount);
|
||||
void loadTorrentFailed(const QString &error);
|
||||
void metadataLoaded(const BitTorrent::TorrentInfo &info);
|
||||
void recursiveTorrentDownloadPossible(BitTorrent::TorrentHandle *const torrent);
|
||||
void metadataLoaded(const TorrentInfo &info);
|
||||
void recursiveTorrentDownloadPossible(TorrentHandle *torrent);
|
||||
void speedLimitModeChanged(bool alternative);
|
||||
void statsUpdated();
|
||||
void subcategoriesSupportChanged();
|
||||
void tagAdded(const QString &tag);
|
||||
void tagRemoved(const QString &tag);
|
||||
void torrentAboutToBeRemoved(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentAdded(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentCategoryChanged(BitTorrent::TorrentHandle *const torrent, const QString &oldCategory);
|
||||
void torrentFinished(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentFinishedChecking(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentLoaded(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentMetadataLoaded(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentPaused(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentResumed(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentSavePathChanged(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentSavingModeChanged(BitTorrent::TorrentHandle *const torrent);
|
||||
void torrentStorageMoveFailed(BitTorrent::TorrentHandle *const torrent, const QString &targetPath, const QString &error);
|
||||
void torrentStorageMoveFinished(BitTorrent::TorrentHandle *const torrent, const QString &newPath);
|
||||
void torrentsUpdated(const QVector<BitTorrent::TorrentHandle *> &torrents);
|
||||
void torrentTagAdded(BitTorrent::TorrentHandle *const torrent, const QString &tag);
|
||||
void torrentTagRemoved(BitTorrent::TorrentHandle *const torrent, const QString &tag);
|
||||
void trackerError(BitTorrent::TorrentHandle *const torrent, const QString &tracker);
|
||||
void trackerlessStateChanged(BitTorrent::TorrentHandle *const torrent, bool trackerless);
|
||||
void trackersAdded(BitTorrent::TorrentHandle *const torrent, const QVector<BitTorrent::TrackerEntry> &trackers);
|
||||
void trackersChanged(BitTorrent::TorrentHandle *const torrent);
|
||||
void trackersRemoved(BitTorrent::TorrentHandle *const torrent, const QVector<BitTorrent::TrackerEntry> &trackers);
|
||||
void trackerSuccess(BitTorrent::TorrentHandle *const torrent, const QString &tracker);
|
||||
void trackerWarning(BitTorrent::TorrentHandle *const torrent, const QString &tracker);
|
||||
void torrentAboutToBeRemoved(TorrentHandle *torrent);
|
||||
void torrentAdded(TorrentHandle *torrent);
|
||||
void torrentCategoryChanged(TorrentHandle *torrent, const QString &oldCategory);
|
||||
void torrentFinished(TorrentHandle *torrent);
|
||||
void torrentFinishedChecking(TorrentHandle *torrent);
|
||||
void torrentLoaded(TorrentHandle *torrent);
|
||||
void torrentMetadataLoaded(TorrentHandle *torrent);
|
||||
void torrentPaused(TorrentHandle *torrent);
|
||||
void torrentResumed(TorrentHandle *torrent);
|
||||
void torrentSavePathChanged(TorrentHandle *torrent);
|
||||
void torrentSavingModeChanged(TorrentHandle *torrent);
|
||||
void torrentStorageMoveFailed(TorrentHandle *torrent, const QString &targetPath, const QString &error);
|
||||
void torrentStorageMoveFinished(TorrentHandle *torrent, const QString &newPath);
|
||||
void torrentsUpdated(const QVector<TorrentHandle *> &torrents);
|
||||
void torrentTagAdded(TorrentHandle *torrent, const QString &tag);
|
||||
void torrentTagRemoved(TorrentHandle *torrent, const QString &tag);
|
||||
void trackerError(TorrentHandle *torrent, const QString &tracker);
|
||||
void trackerlessStateChanged(TorrentHandle *torrent, bool trackerless);
|
||||
void trackersAdded(TorrentHandle *torrent, const QVector<TrackerEntry> &trackers);
|
||||
void trackersChanged(TorrentHandle *torrent);
|
||||
void trackersRemoved(TorrentHandle *torrent, const QVector<TrackerEntry> &trackers);
|
||||
void trackerSuccess(TorrentHandle *torrent, const QString &tracker);
|
||||
void trackerWarning(TorrentHandle *torrent, const QString &tracker);
|
||||
|
||||
private slots:
|
||||
void configureDeferred();
|
||||
@ -744,7 +744,7 @@ namespace BitTorrent
|
||||
|
||||
int m_numResumeData = 0;
|
||||
int m_extraLimit = 0;
|
||||
QVector<BitTorrent::TrackerEntry> m_additionalTrackerList;
|
||||
QVector<TrackerEntry> m_additionalTrackerList;
|
||||
QString m_resumeFolderPath;
|
||||
QFile *m_resumeFolderLock = nullptr;
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
uint qHash(const BitTorrent::TorrentState key, const uint seed)
|
||||
uint qHash(const TorrentState key, const uint seed)
|
||||
{
|
||||
return ::qHash(static_cast<std::underlying_type_t<TorrentState>>(key), seed);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ namespace
|
||||
out.reserve(priorities.size());
|
||||
|
||||
std::transform(priorities.cbegin(), priorities.cend()
|
||||
, std::back_inserter(out), [](BitTorrent::DownloadPriority priority)
|
||||
, std::back_inserter(out), [](const DownloadPriority priority)
|
||||
{
|
||||
return static_cast<lt::download_priority_t>(
|
||||
static_cast<LTUnderlyingType<lt::download_priority_t>>(priority));
|
||||
|
@ -382,7 +382,7 @@ void TorrentInfo::renameFile(const int index, const QString &newPath)
|
||||
nativeInfo()->rename_file(lt::file_index_t {index}, Utils::Fs::toNativePath(newPath).toStdString());
|
||||
}
|
||||
|
||||
int BitTorrent::TorrentInfo::fileIndex(const QString &fileName) const
|
||||
int TorrentInfo::fileIndex(const QString &fileName) const
|
||||
{
|
||||
// the check whether the object is valid is not needed here
|
||||
// because if filesCount() returns -1 the loop exits immediately
|
||||
|
@ -69,8 +69,13 @@ UpDownRatioDialog::UpDownRatioDialog(bool useDefault, qreal initialRatioValue,
|
||||
m_ui->timeSpinBox->setMaximum(maxTimeValue);
|
||||
m_ui->timeSpinBox->setValue(initialTimeValue);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
connect(m_ui->buttonGroup, &QButtonGroup::idClicked
|
||||
, this, &UpDownRatioDialog::handleRatioTypeChanged);
|
||||
#else
|
||||
connect(m_ui->buttonGroup, qOverload<int>(&QButtonGroup::buttonClicked)
|
||||
, this, &UpDownRatioDialog::handleRatioTypeChanged);
|
||||
#endif
|
||||
connect(m_ui->checkMaxRatio, &QCheckBox::toggled, this, &UpDownRatioDialog::enableRatioSpin);
|
||||
connect(m_ui->checkMaxTime, &QCheckBox::toggled, this, &UpDownRatioDialog::enableTimeSpin);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user