diff --git a/src/gui/transferlistwidget.cpp b/src/gui/transferlistwidget.cpp index 7bc8a5f51..5efb3d51a 100644 --- a/src/gui/transferlistwidget.cpp +++ b/src/gui/transferlistwidget.cpp @@ -28,40 +28,36 @@ * Contact : chris@qbittorrent.org */ -#include -#include -#include -#include -#include +#include "transferlistwidget.h" + #include -#include -#include -#include -#include +#include #include +#include #include -#include +#include +#include #include +#include -#include "transferlistwidget.h" +#include "autoexpandabledialog.h" #include "base/bittorrent/session.h" #include "base/bittorrent/torrenthandle.h" +#include "base/logger.h" +#include "base/preferences.h" #include "base/torrentfilter.h" -#include "transferlistdelegate.h" +#include "base/utils/fs.h" +#include "base/utils/string.h" +#include "deletionconfirmationdlg.h" +#include "guiiconprovider.h" +#include "mainwindow.h" +#include "optionsdlg.h" #include "previewselect.h" #include "speedlimitdlg.h" -#include "updownratiodlg.h" -#include "optionsdlg.h" -#include "mainwindow.h" -#include "base/preferences.h" #include "torrentmodel.h" -#include "deletionconfirmationdlg.h" -#include "propertieswidget.h" -#include "guiiconprovider.h" -#include "base/utils/fs.h" -#include "base/utils/string.h" -#include "autoexpandabledialog.h" +#include "transferlistdelegate.h" #include "transferlistsortmodel.h" +#include "updownratiodlg.h" static QStringList extractHashes(const QList &torrents); @@ -256,12 +252,14 @@ void TransferListWidget::setSelectedTorrentsLocation() const QString newLocation = QFileDialog::getExistingDirectory(this, tr("Choose save path"), oldLocation, QFileDialog::DontConfirmOverwrite | QFileDialog::ShowDirsOnly | QFileDialog::HideNameFilterDetails); - if (!QDir(newLocation).exists()) return; + if (newLocation.isEmpty() || !QDir(newLocation).exists()) return; qDebug("New location is %s", qPrintable(newLocation)); // Actually move storage - foreach (BitTorrent::TorrentHandle *const torrent, torrents) + foreach (BitTorrent::TorrentHandle *const torrent, torrents) { + Logger::instance()->addMessage(tr("Set location: moving \"%1\", from \"%2\" to \"%3\"", "Set location: moving \"ubuntu_16_04.iso\", from \"/home/dir1\" to \"/home/dir2\"").arg(torrent->name()).arg(torrent->savePath()).arg(newLocation)); torrent->move(Utils::Fs::expandPathAbs(newLocation)); + } } void TransferListWidget::pauseAllTorrents()