= QString(QObject::trUtf8("QtRapids, a simple BitTorrent client based on"
"\nQt and Libtorrent."
"\n\nURL: http://qtrapids.garage.maemo.org/"
- "\n\nAuthor(s):\nLassi Väätämöinen, lassi.vaatamoinen@ixonos.com"
+ "\n\nAuthors:\nLassi Väätämöinen, lassi.vaatamoinen@ixonos.com"
+ "\nDenis Zalievsky, denis.zalewsky@ixonos.com"
"\n\nIxonos Plc, Finland\n"));
void MainWindow::on_removeAction_clicked()
{
- QTorrentHandle handle = dlView_->removeSelected();
+ qtrapids::QTorrentHandle handle = dlView_->removeSelected();
btSession_.removeTorrent(handle);
}
void MainWindow::on_downloadItemSelectionChanged()
{
+#ifdef QTRAPIDS_DEBUG
qDebug() << "MainWindow::on_seedItemSelectionChanged():" << dlView_->currentItem();
+#endif
if (dlView_->currentItem() != NULL) {
emit(itemSelected(true));
} else {
void MainWindow::on_seedItemSelectionChanged()
{
+#ifdef QTRAPIDS_DEBUG
qDebug() << "MainWindow::on_seedItemSelectionChanged():" << seedView_->currentItem();
+#endif
if (seedView_->currentItem() != NULL) {
emit(itemSelected(true));
} else {
void MainWindow::on_torrentFileSelected(const QString& file)
{
+#ifdef QTRAPIDS_DEBUG
qDebug() << " MainWindow::on_torrentFileSelected(): " << file;
+#endif
// Torrent filename empty, do nothing.
if (file == "") {
return;
// 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
qDebug() << "Is valid: " << handle.isValid();
+#endif
}
void MainWindow::on_alert(std::auto_ptr<Alert> al)
{
+
+
if (al.get() != NULL) {
- qDebug()
- << "MainWindow::on_torrentAlert(): "
- << QString::fromStdString(al->message());
-
+// qDebug()
+// << "MainWindow::on_torrentAlert(): "
+// << QString::fromStdString(al->message());
+
TorrentAlert *torrentAlert
= dynamic_cast<TorrentAlert*> (al.get());
+
if (torrentAlert) {
- dlView_->updateItem(QTorrentHandle(torrentAlert->handle));
+ qtrapids::QTorrentHandle torrentHandle = qtrapids::QTorrentHandle(torrentAlert->handle);
+ dlView_->updateItem(qtrapids::QTorrentHandle(torrentAlert->handle));
}
}
}
/*
-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()) {