mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 00:33:09 -07:00
Combine qAsConst() with copyAsConst() to asConst()
This commit is contained in:
parent
6b1d26d555
commit
1f36b8b89f
57 changed files with 199 additions and 202 deletions
|
@ -72,7 +72,7 @@ void LogController::mainAction()
|
|||
Logger *const logger = Logger::instance();
|
||||
QVariantList msgList;
|
||||
|
||||
for (const Log::Msg &msg : copyAsConst(logger->getMessages(lastKnownId))) {
|
||||
for (const Log::Msg &msg : asConst(logger->getMessages(lastKnownId))) {
|
||||
if (!((msg.type == Log::NORMAL && isNormal)
|
||||
|| (msg.type == Log::INFO && isInfo)
|
||||
|| (msg.type == Log::WARNING && isWarning)
|
||||
|
@ -111,7 +111,7 @@ void LogController::peersAction()
|
|||
Logger *const logger = Logger::instance();
|
||||
QVariantList peerList;
|
||||
|
||||
for (const Log::Peer &peer : copyAsConst(logger->getPeers(lastKnownId))) {
|
||||
for (const Log::Peer &peer : asConst(logger->getPeers(lastKnownId))) {
|
||||
QVariantMap map;
|
||||
map[KEY_LOG_ID] = peer.id;
|
||||
map[KEY_LOG_TIMESTAMP] = peer.timestamp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue