mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Avoid binding constant reference to returned object
In such cases, it makes no sense doing so.
This commit is contained in:
@@ -751,7 +751,7 @@ void PropertiesWidget::renameSelectedFile()
|
||||
if (!newPath.endsWith('/')) newPath += '/';
|
||||
// Check for overwriting
|
||||
for (int i = 0; i < m_torrent->filesCount(); ++i) {
|
||||
const QString ¤tName = m_torrent->filePath(i);
|
||||
const QString currentName = m_torrent->filePath(i);
|
||||
#if defined(Q_OS_UNIX) || defined(Q_WS_QWS)
|
||||
if (currentName.startsWith(newPath, Qt::CaseSensitive)) {
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user