From 82276b2a9934a762fa28114fe8b3c44ae7958ed2 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 19 Sep 2019 16:50:57 +0800 Subject: [PATCH] Rename variable --- src/gui/torrentcreatordialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/torrentcreatordialog.cpp b/src/gui/torrentcreatordialog.cpp index 180987dee..b0f6bb448 100644 --- a/src/gui/torrentcreatordialog.cpp +++ b/src/gui/torrentcreatordialog.cpp @@ -200,8 +200,8 @@ void TorrentCreatorDialog::handleCreationSuccess(const QString &path, const QStr setCursor(QCursor(Qt::ArrowCursor)); if (m_ui->checkStartSeeding->isChecked()) { // Create save path temp data - BitTorrent::TorrentInfo t = BitTorrent::TorrentInfo::loadFromFile(Utils::Fs::toNativePath(path)); - if (!t.isValid()) { + const BitTorrent::TorrentInfo info = BitTorrent::TorrentInfo::loadFromFile(Utils::Fs::toNativePath(path)); + if (!info.isValid()) { QMessageBox::critical(this, tr("Torrent creation failed"), tr("Reason: Created torrent is invalid. It won't be added to download list.")); return; } @@ -212,7 +212,7 @@ void TorrentCreatorDialog::handleCreationSuccess(const QString &path, const QStr params.ignoreShareLimits = m_ui->checkIgnoreShareLimits->isChecked(); params.useAutoTMM = TriStateBool::False; // otherwise if it is on by default, it will overwrite `savePath` to the default save path - BitTorrent::Session::instance()->addTorrent(t, params); + BitTorrent::Session::instance()->addTorrent(info, params); } QMessageBox::information(this, tr("Torrent creator") , QString("%1\n%2").arg(tr("Torrent created:"), Utils::Fs::toNativePath(path)));