projects
/
qtrapids
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Torrent can be now opened and download starts
[qtrapids]
/
src
/
engine
/
QBittorrentSession.cpp
diff --git
a/src/engine/QBittorrentSession.cpp
b/src/engine/QBittorrentSession.cpp
index
e0d6c5c
..
dd94f95
100644
(file)
--- a/
src/engine/QBittorrentSession.cpp
+++ b/
src/engine/QBittorrentSession.cpp
@@
-41,12
+41,12
@@
QBittorrentSession::~QBittorrentSession()
}
}
-QTorrentHandle QBittorrentSession::addTorrent(AddTorrentParams const& params)
+std::auto_ptr<QTorrentHandle>
+QBittorrentSession::addTorrent(AddTorrentParams const& params)
{
// Delegate to Libtorrent and return QTorrentHandle.
{
// Delegate to Libtorrent and return QTorrentHandle.
- QTorrentHandle handle(btSession_.add_torrent(params));
- qDebug() << "Is valid: " << handle.isValid();
- return handle;
+ std::auto_ptr<QTorrentHandle> handlePtr(new QTorrentHandle(btSession_.add_torrent(params)));
+ return handlePtr;
}
}
@@
-55,11
+55,10
@@
void QBittorrentSession::on_alert(TorrentAlert const *al)
//NOTE: al parameter not necessarily needed here, as we pop_alert() now!
{
//NOTE: al parameter not necessarily needed here, as we pop_alert() now!
{
- qDebug() << "QBittorrentSession:on_alert(" << al << ")";
+ //qDebug() << "QBittorrentSession:on_alert(" << al << ")";
// if (al)
// qDebug() << "on_alert():" << QString::fromStdString(al->message());
// if (al)
// qDebug() << "on_alert():" << QString::fromStdString(al->message());
-
std::auto_ptr<TorrentAlert> alertPtr = btSession_.pop_alert();
emit alert(alertPtr);
}
std::auto_ptr<TorrentAlert> alertPtr = btSession_.pop_alert();
emit alert(alertPtr);
}