Merge pull request #10991 from Chocobo1/backport

Backport to v4_1_x
This commit is contained in:
Mike Tzou 2019-07-31 14:29:14 +08:00 committed by GitHub
commit 9c2a1146df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -4330,7 +4330,7 @@ void Session::handleTorrentDeleteFailedAlert(libt::torrent_delete_failed_alert *
if (p->error) {
LogMsg(tr("'%1' was removed from the transfer list but the files couldn't be deleted. Error: %2", "'xxx.avi' was removed...")
.arg(tmpRemovingTorrentData.name, QString::fromStdString(p->error.message()))
.arg(tmpRemovingTorrentData.name, QString::fromLocal8Bit(p->error.message().c_str()))
, Log::WARNING);
}
else {

View file

@ -1423,8 +1423,6 @@ void TorrentHandle::setTrackerLogin(const QString &username, const QString &pass
void TorrentHandle::renameFile(int index, const QString &name)
{
if (m_startupState != Started) return;
m_oldPath[LTFileIndex {index}].push_back(filePath(index));
++m_renameCount;
qDebug() << Q_FUNC_INFO << index << name;
@ -1713,7 +1711,7 @@ void TorrentHandle::handleSaveResumeDataFailedAlert(const libtorrent::save_resum
}
else {
LogMsg(tr("Save resume data failed. Torrent: \"%1\", error: \"%2\"")
.arg(name(), QString::fromStdString(p->error.message())), Log::CRITICAL);
.arg(name(), QString::fromLocal8Bit(p->error.message().c_str())), Log::CRITICAL);
m_session->handleTorrentResumeDataFailed(this);
}
}
@ -1783,7 +1781,7 @@ void TorrentHandle::handleFileRenameFailedAlert(const libtorrent::file_rename_fa
{
LogMsg(tr("File rename failed. Torrent: \"%1\", file: \"%2\", reason: \"%3\"")
.arg(name(), filePath(p->index)
, QString::fromStdString(p->error.message())), Log::WARNING);
, QString::fromLocal8Bit(p->error.message().c_str())), Log::WARNING);
m_oldPath[LTFileIndex {p->index}].removeFirst();
if (m_oldPath[LTFileIndex {p->index}].isEmpty())