From b709bec24d10ce2d5ed468c158397ffb6ab5c279 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 17 Oct 2010 11:47:16 +0000 Subject: [PATCH] Fix compilation error with libtorrent v0.14 --- src/bittorrent.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 75731de89..d13a6f00c 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -864,7 +864,11 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) { } QString torrent_name = misc::magnetUriToName(magnet_uri); const QString savePath(getSavePath(hash, false, QString::null, torrent_name)); - if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && !TorrentTempData::isSeedingMode(hash)) { + if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) +#if LIBTORRENT_VERSION_MINOR > 14 + && !TorrentTempData::isSeedingMode(hash) +#endif + ) { qDebug("addMagnetURI: Temp folder is enabled."); qDebug("addTorrent::Temp folder is enabled."); QString torrent_tmp_path = defaultTempPath.replace("\\", "/"); @@ -1116,7 +1120,11 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr } else { savePath = getSavePath(hash, fromScanDir, path, root_folder); } - if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && !TorrentTempData::isSeedingMode(hash)) { + if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) +#if LIBTORRENT_VERSION_MINOR > 14 + && !TorrentTempData::isSeedingMode(hash) +#endif + ) { qDebug("addTorrent::Temp folder is enabled."); QString torrent_tmp_path = defaultTempPath.replace("\\", "/"); if(!root_folder.isEmpty()) {