- Namespaced QBittorrentSession and QTorrentHandle to avoid possible future conflicts
[qtrapids] / src / gui / MainWindow.cpp
index a3262e1..4ccddd9 100644 (file)
@@ -129,7 +129,7 @@ void MainWindow::on_openAction_clicked()
 
 void MainWindow::on_removeAction_clicked()
 {
-       QTorrentHandle handle = dlView_->removeSelected();
+       qtrapids::QTorrentHandle handle = dlView_->removeSelected();
        btSession_.removeTorrent(handle);
 }
 
@@ -212,7 +212,7 @@ void MainWindow::on_torrentFileSelected(const QString& file)
        // save_path is the only mandatory parameter, rest are optional.
        addParams.save_path = boost::filesystem::path(settings_.value("download/directory").toString().toStdString()); 
        //addParams.storage_mode = libtorrent::storage_mode_allocate;
-       QTorrentHandle handle = btSession_.addTorrent(addParams);
+       qtrapids::QTorrentHandle handle = btSession_.addTorrent(addParams);
        dlView_->newItem(handle);
 //     torrentHandles_.push_back(handlePtr);
 #ifdef QTRAPIDS_DEBUG
@@ -234,8 +234,8 @@ void MainWindow::on_alert(std::auto_ptr<Alert> al)
                                = dynamic_cast<TorrentAlert*> (al.get());
 
                if (torrentAlert) {
-                       QTorrentHandle torrentHandle = QTorrentHandle(torrentAlert->handle);
-                       dlView_->updateItem(QTorrentHandle(torrentAlert->handle));
+                       qtrapids::QTorrentHandle torrentHandle = qtrapids::QTorrentHandle(torrentAlert->handle);
+                       dlView_->updateItem(qtrapids::QTorrentHandle(torrentAlert->handle));
                }
        
        }
@@ -245,7 +245,7 @@ void MainWindow::on_alert(std::auto_ptr<Alert> al)
 }
 
 /*
-bool MainWindow::IsNewTorrent(std::auto_ptr<QTorrentHandle> handlePtr)
+bool MainWindow::IsNewTorrent(std::auto_ptr<qtrapids::QTorrentHandle> handlePtr)
 {
        for (unsigned i = 0; i < torrentHandles_.size(); ++i) {
                if (torrentHandles_.at(i).get() == handlePtr.get()) {