SOURCES: qbittorrent-boost.patch (NEW) - initial - fixes the build of qbitt...
uzsolt
uzsolt at pld-linux.org
Sun Aug 31 21:30:00 CEST 2008
Author: uzsolt Date: Sun Aug 31 19:30:00 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- initial - fixes the build of qbittorrent 1.1.3 with boost > 1.35
---- Files affected:
SOURCES:
qbittorrent-boost.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/qbittorrent-boost.patch
diff -u /dev/null SOURCES/qbittorrent-boost.patch:1.1
--- /dev/null Sun Aug 31 21:30:01 2008
+++ SOURCES/qbittorrent-boost.patch Sun Aug 31 21:29:55 2008
@@ -0,0 +1,50 @@
+--- qbittorrent-1.1.3-orig/src/createtorrent_imp.cpp (révision 1962)
++++ qbittorrent-1.1.3/src/createtorrent_imp.cpp (révision 1966)
+@@ -45,7 +45,7 @@
+ setupUi(this);
+ setAttribute(Qt::WA_DeleteOnClose);
+ creatorThread = new torrentCreatorThread();
+- connect(creatorThread, SIGNAL(creationSuccess(QString)), this, SLOT(handleCreationSucess(QString)));
++ connect(creatorThread, SIGNAL(creationSuccess(QString, const char*, QString)), this, SLOT(handleCreationSuccess(QString, const char*, QString)));
+ connect(creatorThread, SIGNAL(creationFailure(QString)), this, SLOT(handleCreationFailure(QString)));
+ connect(creatorThread, SIGNAL(updateProgress(int)), this, SLOT(updateProgressBar(int)));
+ show();
+@@ -129,12 +129,23 @@
+ // Subfunction to add files to a torrent_info structure
+ // Written by Arvid Norberg (libtorrent Author)
+ void add_files(torrent_info& t, path const& p, path const& l){
+- qDebug("p: %s, l: %s, l.leaf(): %s", p.string().c_str(), l.string().c_str(), l.leaf().c_str());
++ using boost::filesystem::path;
++ using boost::filesystem::directory_iterator;
++#if BOOST_VERSION < 103600
++ std::string const& leaf = l.leaf();
++#else
++ std::string const& leaf = l.filename();
++#endif
++ if (leaf == ".." || leaf == ".") return;
+ path f(p / l);
+- if (is_directory(f)){
++ if (is_directory(f)) {
+ for (directory_iterator i(f), end; i != end; ++i)
++#if BOOST_VERSION < 103600
+ add_files(t, p, l / i->leaf());
+- }else{
++#else
++ add_files(t, p, l / i->filename());
++#endif
++ } else {
+ qDebug("Adding %s", l.string().c_str());
+ t.add_file(l, file_size(f));
+ }
+@@ -221,7 +232,11 @@
+ ofstream out(complete(path((const char*)save_path.toUtf8())), std::ios_base::binary);
+ // Adding files to the torrent
+ path full_path = complete(path(input_path.toUtf8().data()));
++#if BOOST_VERSION < 103600
+ add_files(*t, full_path.branch_path(), full_path.leaf());
++#else
++ add_files(*t, full_path.branch_path(), full_path.filename());
++#endif
+ if(abort) return;
+ // Set piece size
+ t->set_piece_size(piece_size);
================================================================
More information about the pld-cvs-commit
mailing list