}
-QTorrentHandle QBittorrentSession::addTorrent(AddTorrentParams const& params)
+std::auto_ptr<QTorrentHandle>
+QBittorrentSession::addTorrent(AddTorrentParams const& params)
{
// 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;
}
//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());
-
std::auto_ptr<TorrentAlert> alertPtr = btSession_.pop_alert();
emit alert(alertPtr);
}