Skip to content

Commit

Permalink
Disable using Qt functions deprecated up to Qt 6.5
Browse files Browse the repository at this point in the history
* Disable using Qt functions deprecated up to Qt 6.5
* Utilize QSet::removeIf()

PR qbittorrent#19419.
  • Loading branch information
glassez authored Aug 8, 2023
1 parent 0658163 commit 33d767b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/Modules/CommonConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ target_compile_features(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_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
Expand Down
2 changes: 1 addition & 1 deletion src/base/bittorrent/sessionimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/base/http/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void Server::removeConnection(Connection *connection)

void Server::dropTimedOutConnection()
{
erase_if(m_connections, [](Connection *connection)
m_connections.removeIf([](Connection *connection)
{
if (!connection->hasExpired(KEEP_ALIVE_DURATION))
return false;
Expand Down

0 comments on commit 33d767b

Please sign in to comment.