Merge pull request #8562 from Chocobo1/lint

Fix warnings from clazy
This commit is contained in:
Mike Tzou
2018-03-11 12:41:58 +08:00
committed by GitHub
14 changed files with 21 additions and 20 deletions

View File

@@ -91,7 +91,7 @@ bool InfoHash::operator!=(const InfoHash &other) const
return (m_nativeHash != other.m_nativeHash);
}
uint qHash(const InfoHash &key, uint seed)
uint BitTorrent::qHash(const InfoHash &key, uint seed)
{
return qHash(static_cast<QString>(key), seed);
}

View File

@@ -54,8 +54,8 @@ namespace BitTorrent
libtorrent::sha1_hash m_nativeHash;
QString m_hashString;
};
uint qHash(const InfoHash &key, uint seed);
}
uint qHash(const BitTorrent::InfoHash &key, uint seed);
#endif // BITTORRENT_INFOHASH_H

View File

@@ -3748,7 +3748,7 @@ void Session::recursiveTorrentDownload(const InfoHash &hash)
Logger::instance()->addMessage(
tr("Recursive download of file '%1' embedded in torrent '%2'"
, "Recursive download of 'test.torrent' embedded in torrent 'test2'")
.arg(Utils::Fs::toNativePath(torrentRelpath)).arg(torrent->name()));
.arg(Utils::Fs::toNativePath(torrentRelpath), torrent->name()));
const QString torrentFullpath = torrent->savePath() + "/" + torrentRelpath;
AddTorrentParams params;

View File

@@ -597,7 +597,7 @@ void Utils::Misc::openFolderSelect(const QString &absolutePath)
{
const QString path = Utils::Fs::fromNativePath(absolutePath);
// If the item to select doesn't exist, try to open its parent
if (!QFileInfo(path).exists()) {
if (!QFileInfo::exists(path)) {
openPath(path.left(path.lastIndexOf("/")));
return;
}