mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Merge pull request #1250 from botanegg/cppcheck
Corrections from running cppcheck v2.
This commit is contained in:
commit
0ce28eb28f
2 changed files with 4 additions and 4 deletions
|
@ -894,7 +894,7 @@ public:
|
||||||
return value("Preferences/DynDNS/DomainName", "changeme.dyndns.org").toString();
|
return value("Preferences/DynDNS/DomainName", "changeme.dyndns.org").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDynDomainName(const QString name) {
|
void setDynDomainName(const QString &name) {
|
||||||
setValue("Preferences/DynDNS/DomainName", name);
|
setValue("Preferences/DynDNS/DomainName", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -902,7 +902,7 @@ public:
|
||||||
return value("Preferences/DynDNS/Username").toString();
|
return value("Preferences/DynDNS/Username").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDynDNSUsername(const QString username) {
|
void setDynDNSUsername(const QString &username) {
|
||||||
setValue("Preferences/DynDNS/Username", username);
|
setValue("Preferences/DynDNS/Username", username);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -910,7 +910,7 @@ public:
|
||||||
return value("Preferences/DynDNS/Password").toString();
|
return value("Preferences/DynDNS/Password").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDynDNSPassword(const QString password) {
|
void setDynDNSPassword(const QString &password) {
|
||||||
setValue("Preferences/DynDNS/Password", password);
|
setValue("Preferences/DynDNS/Password", password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ void StatsDialog::updateUI() {
|
||||||
// num_peers is not reliable (adds up peers, which didn't even overcome tcp handshake)
|
// num_peers is not reliable (adds up peers, which didn't even overcome tcp handshake)
|
||||||
const std::vector<libtorrent::torrent_handle> torrents = session->getTorrents();
|
const std::vector<libtorrent::torrent_handle> torrents = session->getTorrents();
|
||||||
std::vector<libtorrent::torrent_handle>::const_iterator iBegin = torrents.begin();
|
std::vector<libtorrent::torrent_handle>::const_iterator iBegin = torrents.begin();
|
||||||
std::vector<libtorrent::torrent_handle>::const_iterator iEnd = torrents.begin();
|
std::vector<libtorrent::torrent_handle>::const_iterator iEnd = torrents.end();
|
||||||
quint32 peers = 0;
|
quint32 peers = 0;
|
||||||
for ( ; iBegin < iEnd ; ++iBegin)
|
for ( ; iBegin < iEnd ; ++iBegin)
|
||||||
peers += (*iBegin).status().num_peers;
|
peers += (*iBegin).status().num_peers;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue