- Added buildconf.pri to hold the master-level build options.
[qtrapids] / src / engine / QBittorrentSession.cpp
index 57054c3..7d88e26 100644 (file)
@@ -41,7 +41,7 @@ QBittorrentSession::~QBittorrentSession()
 }
 
 
-QTorrentHandle 
+QTorrentHandle
 QBittorrentSession::addTorrent(AddTorrentParams const& params)
 {
        // Delegate to Libtorrent and return QTorrentHandle.
@@ -58,14 +58,17 @@ void QBittorrentSession::removeTorrent(QTorrentHandle const& handle)
 
 
 // ========================== 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);
 }