}
-QTorrentHandle
+QTorrentHandle
QBittorrentSession::addTorrent(AddTorrentParams const& params)
{
// Delegate to Libtorrent and return QTorrentHandle.
// ========================== SLOTS ==============================
+/// @TODO This function is called when AlertWaiterThread emits alert()
+/// If connection is direct, as it is now, we need to use QMutex here (if necessary?)
void QBittorrentSession::on_alert(Alert const *al)
//NOTE: al parameter not necessarily needed here, as we pop_alert() now!
{
- //qDebug() << "QBittorrentSession:on_alert(" << al << ")";
-// if (al)
-// qDebug() << "on_alert():" << QString::fromStdString(al->message());
-
+#ifdef QTRAPIDS_DEBUG
+ if (al)
+ qDebug() << "on_alert():" << QString::fromStdString(al->message());
+#endif
+
std::auto_ptr<Alert> alertPtr = btSession_.pop_alert();
emit alert(alertPtr);
}