From 08ee439a47255293dcd522de6d38137d83ff4780 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Tue, 22 Sep 2015 20:39:09 +0300 Subject: [PATCH 1/2] Drop unused method TorrentHandle::savePathParsed(). --- src/core/bittorrent/torrenthandle.cpp | 11 ----------- src/core/bittorrent/torrenthandle.h | 1 - 2 files changed, 12 deletions(-) diff --git a/src/core/bittorrent/torrenthandle.cpp b/src/core/bittorrent/torrenthandle.cpp index 996160a37..cd9b2e3bf 100644 --- a/src/core/bittorrent/torrenthandle.cpp +++ b/src/core/bittorrent/torrenthandle.cpp @@ -466,17 +466,6 @@ void TorrentHandle::saveResumeData() m_needSaveResumeData = false; } -QString TorrentHandle::savePathParsed() const -{ - QString p; - if (hasMetadata() && (filesCount() == 1)) - p = firstFileSavePath(); - else - p = savePath(); - - return Utils::Fs::toNativePath(p); -} - int TorrentHandle::filesCount() const { return m_torrentInfo.filesCount(); diff --git a/src/core/bittorrent/torrenthandle.h b/src/core/bittorrent/torrenthandle.h index 4a2ec204a..c8e6141f3 100644 --- a/src/core/bittorrent/torrenthandle.h +++ b/src/core/bittorrent/torrenthandle.h @@ -184,7 +184,6 @@ namespace BitTorrent QString actualSavePath() const; QString savePath() const; QString rootPath() const; - QString savePathParsed() const; int filesCount() const; int piecesCount() const; int piecesHave() const; From 228f51fff911522f76403d305a1851bb5fda9929 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Wed, 23 Sep 2015 21:55:04 +0300 Subject: [PATCH 2/2] Drop unused method TorrentHandle::firstFileSavePath(). --- src/core/bittorrent/torrenthandle.cpp | 16 ---------------- src/core/bittorrent/torrenthandle.h | 1 - 2 files changed, 17 deletions(-) diff --git a/src/core/bittorrent/torrenthandle.cpp b/src/core/bittorrent/torrenthandle.cpp index cd9b2e3bf..6fcdec699 100644 --- a/src/core/bittorrent/torrenthandle.cpp +++ b/src/core/bittorrent/torrenthandle.cpp @@ -509,22 +509,6 @@ qreal TorrentHandle::ratioLimit() const return m_ratioLimit; } - -QString TorrentHandle::firstFileSavePath() const -{ - Q_ASSERT(hasMetadata()); - - QString fSavePath = savePath(); - if (!fSavePath.endsWith("/")) - fSavePath += "/"; - fSavePath += filePath(0); - // Remove .!qB extension - if (fSavePath.endsWith(".!qB", Qt::CaseInsensitive)) - fSavePath.chop(4); - - return fSavePath; -} - QString TorrentHandle::filePath(int index) const { return m_torrentInfo.filePath(index); diff --git a/src/core/bittorrent/torrenthandle.h b/src/core/bittorrent/torrenthandle.h index c8e6141f3..b231657be 100644 --- a/src/core/bittorrent/torrenthandle.h +++ b/src/core/bittorrent/torrenthandle.h @@ -192,7 +192,6 @@ namespace BitTorrent QDateTime addedTime() const; qreal ratioLimit() const; - QString firstFileSavePath() const; QString filePath(int index) const; QString fileName(int index) const; qlonglong fileSize(int index) const;