Browse Source

Disable using Qt functions deprecated up to Qt 6.5

* Disable using Qt functions deprecated up to Qt 6.5
* Utilize QSet::removeIf()

PR #19419.
adaptive-webui-19844
Vladimir Golovnev 1 year ago committed by GitHub
parent
commit
33d767b765
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmake/Modules/CommonConfig.cmake
  2. 2
      src/base/bittorrent/sessionimpl.cpp
  3. 2
      src/base/http/server.cpp

2
cmake/Modules/CommonConfig.cmake

@ -20,7 +20,7 @@ target_compile_features(qbt_common_cfg INTERFACE
) )
target_compile_definitions(qbt_common_cfg INTERFACE target_compile_definitions(qbt_common_cfg INTERFACE
QT_DISABLE_DEPRECATED_BEFORE=0x050f02 QT_DISABLE_DEPRECATED_UP_TO=0x060500
QT_NO_CAST_FROM_ASCII QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY QT_NO_CAST_FROM_BYTEARRAY

2
src/base/bittorrent/sessionimpl.cpp

@ -1382,7 +1382,7 @@ void SessionImpl::processNextResumeData(ResumeSessionContext *context)
} }
} }
erase_if(resumeData.tags, [this, &torrentID](const QString &tag) std::erase_if(resumeData.tags, [this, &torrentID](const QString &tag)
{ {
if (hasTag(tag)) if (hasTag(tag))
return false; return false;

2
src/base/http/server.cpp

@ -148,7 +148,7 @@ void Server::removeConnection(Connection *connection)
void Server::dropTimedOutConnection() void Server::dropTimedOutConnection()
{ {
erase_if(m_connections, [](Connection *connection) m_connections.removeIf([](Connection *connection)
{ {
if (!connection->hasExpired(KEEP_ALIVE_DURATION)) if (!connection->hasExpired(KEEP_ALIVE_DURATION))
return false; return false;

Loading…
Cancel
Save