fix: set BOOST_ASIO_NO_DEPRECATED (#6904)

This commit is contained in:
pajlada
2026-04-04 12:30:27 +00:00
committed by GitHub
parent 4648742582
commit 0d4727d82a
3 changed files with 11 additions and 7 deletions
@@ -69,6 +69,9 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC
$<$<BOOL:${MSVC}>:BOOST_CONTAINER_NO_LIB>
QT_NO_KEYWORDS
$<$<BOOL:${VCPKG_TARGET_TRIPLET}>:CHATTERINO_EXPECT_BOOST_JSON_FROM_DLL>
# Don't allow the use of deprecated Boost.Asio functionality
# https://www.boost.org/doc/libs/latest/doc/html/boost_asio/using.html#boost_asio.using.macros
BOOST_ASIO_NO_DEPRECATED
)
if (MSVC)
+3 -1
View File
@@ -1168,7 +1168,6 @@ target_link_libraries(${LIBRARY_PROJECT} PRIVATE ${VERSION_PROJECT})
target_compile_definitions(${LIBRARY_PROJECT} PUBLIC
CHATTERINO
UNICODE
AB_CUSTOM_SETTINGS
IRC_STATIC
IRC_NAMESPACE=Communi
$<$<BOOL:${WIN32}>:_WIN32_WINNT=0x0A00> # Windows 10
@@ -1177,6 +1176,9 @@ target_compile_definitions(${LIBRARY_PROJECT} PUBLIC
$<$<BOOL:${WIN32}>:NOMINMAX>
# Exclude some headers when including Windows.h
$<$<BOOL:${WIN32}>:WIN32_LEAN_AND_MEAN>
# Don't allow the use of deprecated Boost.Asio functionality
# https://www.boost.org/doc/libs/latest/doc/html/boost_asio/using.html#boost_asio.using.macros
BOOST_ASIO_NO_DEPRECATED
)
set(_c2_qt_defs
@@ -20,12 +20,11 @@ WebSocketPoolImpl::WebSocketPoolImpl(const QString &shortName)
, work(this->ioc.get_executor())
{
boost::system::error_code ec;
auto _ = this->ssl.set_options(
boost::asio::ssl::context::no_tlsv1 |
boost::asio::ssl::context::no_tlsv1_1 |
boost::asio::ssl::context::default_workarounds |
boost::asio::ssl::context::single_dh_use,
ec);
this->ssl.set_options(boost::asio::ssl::context::no_tlsv1 |
boost::asio::ssl::context::no_tlsv1_1 |
boost::asio::ssl::context::default_workarounds |
boost::asio::ssl::context::single_dh_use,
ec);
if (ec)
{
qCWarning(chatterinoWebsocket) << "Failed to set SSL context options"