Browse Source

Remove legacy/unused torrent property

adaptive-webui-19844
Vladimir Golovnev (Glassez) 4 years ago
parent
commit
b77568839d
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 2
      src/base/bittorrent/session.cpp
  2. 4
      src/base/bittorrent/torrenthandleimpl.cpp
  3. 2
      src/base/bittorrent/torrenthandleimpl.h

2
src/base/bittorrent/session.cpp

@ -1945,7 +1945,6 @@ LoadTorrentParams Session::initLoadTorrentParams(const AddTorrentParams &addTorr @@ -1945,7 +1945,6 @@ LoadTorrentParams Session::initLoadTorrentParams(const AddTorrentParams &addTorr
loadTorrentParams.name = addTorrentParams.name;
loadTorrentParams.tags = addTorrentParams.tags;
loadTorrentParams.disableTempPath = addTorrentParams.disableTempPath;
loadTorrentParams.sequential = addTorrentParams.sequential;
loadTorrentParams.firstLastPiecePriority = addTorrentParams.firstLastPiecePriority;
loadTorrentParams.hasSeedStatus = addTorrentParams.skipChecking; // do not react on 'torrent_finished_alert' when skipping
@ -3895,7 +3894,6 @@ bool Session::loadTorrentResumeData(const QByteArray &data, const TorrentInfo &m @@ -3895,7 +3894,6 @@ bool Session::loadTorrentResumeData(const QByteArray &data, const TorrentInfo &m
torrentParams.name = fromLTString(root.dict_find_string_value("qBt-name"));
torrentParams.savePath = Profile::instance()->fromPortablePath(
Utils::Fs::toUniformPath(fromLTString(root.dict_find_string_value("qBt-savePath"))));
torrentParams.disableTempPath = root.dict_find_int_value("qBt-tempPathDisabled");
torrentParams.sequential = root.dict_find_int_value("qBt-sequential");
torrentParams.hasSeedStatus = root.dict_find_int_value("qBt-seedStatus");
torrentParams.firstLastPiecePriority = root.dict_find_int_value("qBt-firstLastPiecePriority");

4
src/base/bittorrent/torrenthandleimpl.cpp

@ -124,7 +124,6 @@ TorrentHandleImpl::TorrentHandleImpl(Session *session, const lt::torrent_handle @@ -124,7 +124,6 @@ TorrentHandleImpl::TorrentHandleImpl(Session *session, const lt::torrent_handle
, m_ratioLimit(params.ratioLimit)
, m_seedingTimeLimit(params.seedingTimeLimit)
, m_hasSeedStatus(params.hasSeedStatus)
, m_tempPathDisabled(params.disableTempPath)
, m_hasRootFolder(params.hasRootFolder)
, m_useAutoTMM(params.savePath.isEmpty())
, m_ltAddTorrentParams(params.ltAddTorrentParams)
@ -1518,7 +1517,6 @@ void TorrentHandleImpl::handleSaveResumeDataAlert(const lt::save_resume_data_ale @@ -1518,7 +1517,6 @@ void TorrentHandleImpl::handleSaveResumeDataAlert(const lt::save_resume_data_ale
resumeData["qBt-tags"] = setToEntryList(m_tags);
resumeData["qBt-name"] = m_name.toStdString();
resumeData["qBt-seedStatus"] = m_hasSeedStatus;
resumeData["qBt-tempPathDisabled"] = m_tempPathDisabled;
resumeData["qBt-hasRootFolder"] = m_hasRootFolder;
m_session->handleTorrentResumeDataReady(this, resumeDataPtr);
@ -1815,7 +1813,7 @@ bool TorrentHandleImpl::isMoveInProgress() const @@ -1815,7 +1813,7 @@ bool TorrentHandleImpl::isMoveInProgress() const
bool TorrentHandleImpl::useTempPath() const
{
return !m_tempPathDisabled && m_session->isTempPathEnabled() && !(isSeed() || m_hasSeedStatus);
return m_session->isTempPathEnabled() && !(isSeed() || m_hasSeedStatus);
}
void TorrentHandleImpl::updateStatus()

2
src/base/bittorrent/torrenthandleimpl.h

@ -62,7 +62,6 @@ namespace BitTorrent @@ -62,7 +62,6 @@ namespace BitTorrent
QString category;
QSet<QString> tags;
QString savePath;
bool disableTempPath = false;
bool sequential = false;
bool firstLastPiecePriority = false;
bool hasSeedStatus = false;
@ -313,7 +312,6 @@ namespace BitTorrent @@ -313,7 +312,6 @@ namespace BitTorrent
qreal m_ratioLimit;
int m_seedingTimeLimit;
bool m_hasSeedStatus;
bool m_tempPathDisabled;
bool m_fastresumeDataRejected = false;
bool m_hasMissingFiles = false;
bool m_hasRootFolder;

Loading…
Cancel
Save