diff --git a/src/base/bittorrent/downloadpriority.cpp b/src/base/bittorrent/downloadpriority.cpp index 1e83b1cfb..090ed86fb 100644 --- a/src/base/bittorrent/downloadpriority.cpp +++ b/src/base/bittorrent/downloadpriority.cpp @@ -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; diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index b5eb8d2ee..6a2c3f9c7 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -4717,7 +4717,7 @@ void Session::handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert void Session::handleStateUpdateAlert(const lt::state_update_alert *p) { - QVector updatedTorrents; + QVector updatedTorrents; updatedTorrents.reserve(p->status.size()); for (const lt::torrent_status &status : p->status) { diff --git a/src/base/bittorrent/session.h b/src/base/bittorrent/session.h index b0c374106..e40a25d96 100644 --- a/src/base/bittorrent/session.h +++ b/src/base/bittorrent/session.h @@ -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 *const 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 *const 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 &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 &trackers); - void trackersChanged(BitTorrent::TorrentHandle *const torrent); - void trackersRemoved(BitTorrent::TorrentHandle *const torrent, const QVector &trackers); - void trackerSuccess(BitTorrent::TorrentHandle *const torrent, const QString &tracker); - void trackerWarning(BitTorrent::TorrentHandle *const torrent, const QString &tracker); + void torrentAboutToBeRemoved(TorrentHandle *const torrent); + void torrentAdded(TorrentHandle *const torrent); + void torrentCategoryChanged(TorrentHandle *const torrent, const QString &oldCategory); + void torrentFinished(TorrentHandle *const torrent); + void torrentFinishedChecking(TorrentHandle *const torrent); + void torrentLoaded(TorrentHandle *const torrent); + void torrentMetadataLoaded(TorrentHandle *const torrent); + void torrentPaused(TorrentHandle *const torrent); + void torrentResumed(TorrentHandle *const torrent); + void torrentSavePathChanged(TorrentHandle *const torrent); + void torrentSavingModeChanged(TorrentHandle *const torrent); + void torrentStorageMoveFailed(TorrentHandle *const torrent, const QString &targetPath, const QString &error); + void torrentStorageMoveFinished(TorrentHandle *const torrent, const QString &newPath); + void torrentsUpdated(const QVector &torrents); + void torrentTagAdded(TorrentHandle *const torrent, const QString &tag); + void torrentTagRemoved(TorrentHandle *const torrent, const QString &tag); + void trackerError(TorrentHandle *const torrent, const QString &tracker); + void trackerlessStateChanged(TorrentHandle *const torrent, bool trackerless); + void trackersAdded(TorrentHandle *const torrent, const QVector &trackers); + void trackersChanged(TorrentHandle *const torrent); + void trackersRemoved(TorrentHandle *const torrent, const QVector &trackers); + void trackerSuccess(TorrentHandle *const torrent, const QString &tracker); + void trackerWarning(TorrentHandle *const torrent, const QString &tracker); private slots: void configureDeferred(); @@ -744,7 +744,7 @@ namespace BitTorrent int m_numResumeData = 0; int m_extraLimit = 0; - QVector m_additionalTrackerList; + QVector m_additionalTrackerList; QString m_resumeFolderPath; QFile *m_resumeFolderLock = nullptr; diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp index 5b34808e5..0df2a9c7d 100644 --- a/src/base/bittorrent/torrenthandle.cpp +++ b/src/base/bittorrent/torrenthandle.cpp @@ -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>(key), seed); } diff --git a/src/base/bittorrent/torrenthandleimpl.cpp b/src/base/bittorrent/torrenthandleimpl.cpp index c068a6b5a..f26f9ebc5 100644 --- a/src/base/bittorrent/torrenthandleimpl.cpp +++ b/src/base/bittorrent/torrenthandleimpl.cpp @@ -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( static_cast>(priority)); diff --git a/src/base/bittorrent/torrentinfo.cpp b/src/base/bittorrent/torrentinfo.cpp index 90a50b2c7..716b25983 100644 --- a/src/base/bittorrent/torrentinfo.cpp +++ b/src/base/bittorrent/torrentinfo.cpp @@ -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