mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 13:04:23 +00:00
Avoid potential container detachment
Suppress clazy warning: warning: Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
This commit is contained in:
parent
e6f07a6fe4
commit
c8b66b25e8
@ -1616,7 +1616,7 @@ void TorrentImpl::renameFile(const int index, const QString &path)
|
|||||||
m_oldPath[index].push_back(oldPath);
|
m_oldPath[index].push_back(oldPath);
|
||||||
#endif
|
#endif
|
||||||
++m_renameCount;
|
++m_renameCount;
|
||||||
m_nativeHandle.rename_file(m_torrentInfo.nativeIndexes()[index], Utils::Fs::toNativePath(path).toStdString());
|
m_nativeHandle.rename_file(m_torrentInfo.nativeIndexes().at(index), Utils::Fs::toNativePath(path).toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TorrentImpl::handleStateUpdate(const lt::torrent_status &nativeStatus)
|
void TorrentImpl::handleStateUpdate(const lt::torrent_status &nativeStatus)
|
||||||
|
@ -498,7 +498,7 @@ QString Utils::Misc::opensslVersionString()
|
|||||||
#else
|
#else
|
||||||
static const auto version {QString::fromLatin1(SSLeay_version(SSLEAY_VERSION))};
|
static const auto version {QString::fromLatin1(SSLeay_version(SSLEAY_VERSION))};
|
||||||
#endif
|
#endif
|
||||||
return QStringView(version).split(u' ', Qt::SkipEmptyParts)[1].toString();
|
return QStringView(version).split(u' ', Qt::SkipEmptyParts).at(1).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Utils::Misc::zlibVersionString()
|
QString Utils::Misc::zlibVersionString()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user