Hello community, here is the log from the commit of package qbittorrent for openSUSE:Factory checked in at 2015-05-02 21:41:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qbittorrent (Old) and /work/SRC/openSUSE:Factory/.qbittorrent.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qbittorrent" Changes: -------- --- /work/SRC/openSUSE:Factory/qbittorrent/qbittorrent.changes 2015-04-27 13:05:08.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.qbittorrent.new/qbittorrent.changes 2015-05-02 21:41:30.000000000 +0200 @@ -1,0 +2,6 @@ +Fri May 1 19:31:23 UTC 2015 - sor.ale...@meowr.ru + +- Extend qbittorrent-libtorrent-1.0.patch to deprecations removal + (fixes segmentation fault while torrent adding). + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qbittorrent-libtorrent-1.0.patch ++++++ --- /var/tmp/diff_new_pack.dsACjw/_old 2015-05-02 21:41:31.000000000 +0200 +++ /var/tmp/diff_new_pack.dsACjw/_new 2015-05-02 21:41:31.000000000 +0200 @@ -1,3 +1,24 @@ +diff -aur a/src/addnewtorrentdialog.cpp b/src/addnewtorrentdialog.cpp +--- a/src/addnewtorrentdialog.cpp ++++ b/src/addnewtorrentdialog.cpp +@@ -654,7 +654,7 @@ + // Populate m_filesList + for (int i = 0; i < m_torrentInfo->num_files(); ++i) { + #if LIBTORRENT_VERSION_NUM >= 1600 +- m_filesPath << misc::toQStringU(fs.file_path(m_torrentInfo->file_at(i))); ++ m_filesPath << misc::toQStringU(fs.file_path(i)); + #else + m_filesPath << misc::toQStringU(m_torrentInfo->file_at(i).path.string()); + #endif +@@ -681,7 +681,7 @@ + } else { + // Update save paths (append file name to them) + #if LIBTORRENT_VERSION_NUM >= 1600 +- QString single_file_relpath = misc::toQStringU(fs.file_path(m_torrentInfo->file_at(0))); ++ QString single_file_relpath = misc::toQStringU(fs.file_path(0)); + #else + QString single_file_relpath = misc::toQStringU(m_torrentInfo->file_at(0).path.string()); + #endif diff -aur a/src/misc.h b/src/misc.h --- a/src/misc.h +++ b/src/misc.h @@ -149,6 +170,33 @@ static void getFlags(const libtorrent::peer_info& peer, QString& flags, QString& tooltip); private: +diff -aur a/src/properties/propertieswidget.cpp b/src/properties/propertieswidget.cpp +--- a/src/properties/propertieswidget.cpp ++++ b/src/properties/propertieswidget.cpp +@@ -253,7 +253,11 @@ + // URL seeds + loadUrlSeeds(); + // List files in torrent ++#if LIBTORRENT_VERSION_NUM < 10000 + PropListModel->model()->setupModelData(h.get_torrent_info()); ++#else ++ PropListModel->model()->setupModelData(*h.torrent_file()); ++#endif + filesList->setExpanded(PropListModel->index(0, 0), true); + // Load file priorities + PropListModel->model()->updateFilesPriorities(h.file_priorities()); +@@ -336,7 +340,11 @@ + if (!h.is_seed() && h.has_metadata()) { + showPiecesDownloaded(true); + // Downloaded pieces ++#if LIBTORRENT_VERSION_NUM < 10000 + bitfield bf(h.get_torrent_info().num_pieces(), 0); ++#else ++ bitfield bf(h.torrent_file()->num_pieces(), 0); ++#endif + h.downloading_pieces(bf); + downloaded_pieces->setProgress(h.pieces(), bf); + // Pieces availability diff -aur a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -186,6 +234,15 @@ { BigRatioTimer = new QTimer(this); BigRatioTimer->setInterval(10000); +@@ -1027,7 +1032,7 @@ + + // Adding torrent to Bittorrent session + try { +- h = QTorrentHandle(add_magnet_uri(*s, magnet_uri.toStdString(), p)); ++ h = QTorrentHandle(s->add_torrent(p)); + }catch(std::exception &e) { + qDebug("Error: %s", e.what()); + } @@ -1181,7 +1186,11 @@ if (resumed) { if (loadFastResumeData(hash, buf)) { @@ -346,7 +403,20 @@ return (torrent_handle::piece_priority(extremities.first) == 7) && (torrent_handle::piece_priority(extremities.second) == 7); -@@ -328,11 +352,19 @@ +@@ -271,8 +295,12 @@ + + QString QTorrentHandle::save_path() const { + #if LIBTORRENT_VERSION_NUM >= 1600 ++#if LIBTORRENT_VERSION_NUM < 10000 + return misc::toQStringU(torrent_handle::save_path()).replace("\\", "/"); + #else ++ return misc::toQStringU(status(torrent_handle::query_save_path).save_path).replace("\\", "/"); ++#endif ++#else + return misc::toQStringU(torrent_handle::save_path().string()).replace("\\", "/"); + #endif + } +@@ -328,11 +356,19 @@ } int QTorrentHandle::num_files() const { @@ -366,7 +436,7 @@ #if LIBTORRENT_VERSION_NUM >= 1600 return fsutils::fileName(filepath_at(index)); #else -@@ -341,22 +373,35 @@ +@@ -341,22 +377,35 @@ } size_type QTorrentHandle::filesize_at(unsigned int index) const { @@ -385,7 +455,7 @@ +#if LIBTORRENT_VERSION_NUM < 10000 return misc::toQStringU(torrent_handle::get_torrent_info().file_at(index).path); #else -+ return misc::toQStringU(torrent_handle::torrent_file()->files().file_path(index)); ++ return misc::toQStringU(torrent_handle::torrent_file()->file_at(index).path); +#endif +#else return misc::toQStringU(torrent_handle::get_torrent_info().file_at(index).path.string()); @@ -403,7 +473,7 @@ return misc::toQStringU(torrent_handle::get_torrent_info().orig_files().at(index).path.string()); #endif } -@@ -370,11 +415,19 @@ +@@ -370,11 +419,19 @@ } QString QTorrentHandle::creator() const { @@ -423,7 +493,7 @@ } size_type QTorrentHandle::total_failed_bytes() const { -@@ -549,10 +602,15 @@ +@@ -549,10 +606,15 @@ #endif } @@ -439,7 +509,7 @@ } QString QTorrentHandle::firstFileSavePath() const { -@@ -704,10 +762,14 @@ +@@ -704,10 +766,14 @@ bool QTorrentHandle::save_torrent_file(const QString& path) const { if (!has_metadata()) return false; @@ -457,3 +527,66 @@ entry torrent_entry(entry::dictionary_t); torrent_entry["info"] = meta; if (!torrent_handle::trackers().empty()) +@@ -734,7 +800,13 @@ + } + + void QTorrentHandle::prioritize_files(const vector<int> &files) const { +- if ((int)files.size() != torrent_handle::get_torrent_info().num_files()) return; ++#if LIBTORRENT_VERSION_NUM < 10000 ++ torrent_info const& info = torrent_handle::get_torrent_info(); ++#else ++ boost::intrusive_ptr<torrent_info const> info_ptr = torrent_handle::torrent_file(); ++ torrent_info const& info = *info_ptr; ++#endif ++ if ((int)files.size() != info.num_files()) return; + qDebug() << Q_FUNC_INFO; + bool was_seed = is_seed(); + vector<size_type> progress; +@@ -811,7 +883,13 @@ + // Determine the priority to set + int prio = b ? 7 : torrent_handle::file_priority(file_index); + +- QPair<int, int> extremities = get_file_extremity_pieces (get_torrent_info(), file_index); ++#if LIBTORRENT_VERSION_NUM < 10000 ++ torrent_info const* tf = &get_torrent_info(); ++#else ++ boost::intrusive_ptr<torrent_info const> tf = torrent_file(); ++#endif ++ ++ QPair<int, int> extremities = get_file_extremity_pieces(*tf, file_index); + piece_priority(extremities.first, prio); + piece_priority(extremities.second, prio); + } +diff -aur a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp +--- a/src/transferlistwidget.cpp ++++ b/src/transferlistwidget.cpp +@@ -602,7 +602,11 @@ + foreach (const QString &hash, hashes) { + QTorrentHandle h = BTSession->getTorrentHandle(hash); + if (h.is_valid() && h.has_metadata()) { ++#if LIBTORRENT_VERSION_NUM >= 1600 ++ h.super_seeding(!h.status(0).super_seeding); ++#else + h.super_seeding(!h.super_seeding()); ++#endif + } + } + } +@@ -776,9 +780,17 @@ + else { + if (!one_not_seed && all_same_super_seeding && h.has_metadata()) { + if (first) { ++#if LIBTORRENT_VERSION_NUM >= 1600 ++ super_seeding_mode = h.status(0).super_seeding; ++#else + super_seeding_mode = h.super_seeding(); ++#endif + } else { ++#if LIBTORRENT_VERSION_NUM >= 1600 ++ if (super_seeding_mode != h.status(0).super_seeding) { ++#else + if (super_seeding_mode != h.super_seeding()) { ++#endif + all_same_super_seeding = false; + } + }