From df2bbe129d0b1d08d47bf3e0d4f25fdda123d158 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Thu, 31 Dec 2020 21:53:43 +0300 Subject: [PATCH] Drop notification about move storage failed --- src/base/bittorrent/session.cpp | 3 --- src/base/bittorrent/session.h | 1 - src/gui/mainwindow.cpp | 6 ------ src/gui/mainwindow.h | 1 - 4 files changed, 11 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 374db43d5..f588ffe57 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -4947,9 +4947,6 @@ void Session::handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert LogMsg(tr("Failed to move \"%1\" from \"%2\" to \"%3\". Reason: %4.") .arg(torrentName, currentLocation, currentJob.path, errorMessage), Log::CRITICAL); - if (torrent) - emit torrentStorageMoveFailed(torrent, currentJob.path, errorMessage); - handleMoveTorrentStorageJobFinished(); } diff --git a/src/base/bittorrent/session.h b/src/base/bittorrent/session.h index c3d6d8d1f..041d82d80 100644 --- a/src/base/bittorrent/session.h +++ b/src/base/bittorrent/session.h @@ -524,7 +524,6 @@ namespace BitTorrent void torrentResumed(TorrentHandle *torrent); void torrentSavePathChanged(TorrentHandle *torrent); void torrentSavingModeChanged(TorrentHandle *torrent); - void torrentStorageMoveFailed(TorrentHandle *torrent, const QString &targetPath, const QString &error); void torrentsUpdated(const QVector &torrents); void torrentTagAdded(TorrentHandle *torrent, const QString &tag); void torrentTagRemoved(TorrentHandle *torrent, const QString &tag); diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index e450bc1da..63df6b285 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -208,7 +208,6 @@ MainWindow::MainWindow(QWidget *parent) connect(BitTorrent::Session::instance(), &BitTorrent::Session::downloadFromUrlFailed, this, &MainWindow::handleDownloadFromUrlFailure); connect(BitTorrent::Session::instance(), &BitTorrent::Session::speedLimitModeChanged, this, &MainWindow::updateAltSpeedsBtn); connect(BitTorrent::Session::instance(), &BitTorrent::Session::recursiveTorrentDownloadPossible, this, &MainWindow::askRecursiveTorrentDownloadConfirmation); - connect(BitTorrent::Session::instance(), &BitTorrent::Session::torrentStorageMoveFailed, this, &MainWindow::moveTorrentFailed); qDebug("create tabWidget"); m_tabs = new HidableTabWidget(this); @@ -870,11 +869,6 @@ void MainWindow::finishedTorrent(BitTorrent::TorrentHandle *const torrent) const showNotificationBaloon(tr("Download completion"), tr("'%1' has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(torrent->name())); } -void MainWindow::moveTorrentFailed(BitTorrent::TorrentHandle *const torrent, const QString &targetPath, const QString &error) const -{ - showNotificationBaloon(tr("Torrent moving failed"), tr("'%1' has failed moving files to '%2'. Reason: %3").arg(torrent->name(), targetPath, error)); -} - // Notification when disk is full void MainWindow::fullDiskError(BitTorrent::TorrentHandle *const torrent, const QString &msg) const { diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 986dae260..db0dd15ab 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -132,7 +132,6 @@ private slots: void addTorrentFailed(const QString &error) const; void torrentNew(BitTorrent::TorrentHandle *const torrent) const; void finishedTorrent(BitTorrent::TorrentHandle *const torrent) const; - void moveTorrentFailed(BitTorrent::TorrentHandle *const torrent, const QString &targetPath, const QString &error) const; void askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHandle *const torrent); void optionsSaved(); #if defined(Q_OS_WIN) || defined(Q_OS_MACOS)