fix: support boost 1.87 (#5832)
Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
+2
-1
@@ -22,7 +22,8 @@
|
||||
url = https://github.com/Chatterino/qtkeychain
|
||||
[submodule "lib/websocketpp"]
|
||||
path = lib/websocketpp
|
||||
url = https://github.com/zaphoyd/websocketpp
|
||||
url = https://github.com/Chatterino/websocketpp
|
||||
branch = chatterino
|
||||
[submodule "cmake/sanitizers-cmake"]
|
||||
path = cmake/sanitizers-cmake
|
||||
url = https://github.com/arsenm/sanitizers-cmake
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
- Bugfix: Fixed tabs not scaling to the default scale when changing the scale from a non-default value. (#5794, #5833)
|
||||
- Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784)
|
||||
- Dev: Updated Conan dependencies. (#5776)
|
||||
- Dev: Support Boost 1.87. (#5832)
|
||||
|
||||
## 2.5.2
|
||||
|
||||
|
||||
+1
-1
Submodule lib/websocketpp updated: b9aeec6eaf...f1736a8e72
@@ -273,7 +273,7 @@ void MiniaudioBackend::play(const QUrl &sound)
|
||||
<< "Failed to play default ping" << result;
|
||||
}
|
||||
|
||||
this->sleepTimer.expires_from_now(STOP_AFTER_DURATION);
|
||||
this->sleepTimer.expires_after(STOP_AFTER_DURATION);
|
||||
this->sleepTimer.async_wait([this](const auto &ec) {
|
||||
if (ec)
|
||||
{
|
||||
|
||||
@@ -119,8 +119,9 @@ public:
|
||||
|
||||
void start()
|
||||
{
|
||||
this->work_ = std::make_shared<boost::asio::io_service::work>(
|
||||
this->websocketClient_.get_io_service());
|
||||
this->work_ = std::make_shared<boost::asio::executor_work_guard<
|
||||
boost::asio::io_context::executor_type>>(
|
||||
this->websocketClient_.get_io_service().get_executor());
|
||||
this->mainThread_.reset(new std::thread([this] {
|
||||
// make sure we set in any case, even exceptions
|
||||
auto guard = qScopeGuard([&] {
|
||||
@@ -409,7 +410,9 @@ private:
|
||||
std::atomic<bool> addingClient_{false};
|
||||
ExponentialBackoff<5> connectBackoff_{std::chrono::milliseconds(1000)};
|
||||
|
||||
std::shared_ptr<boost::asio::io_service::work> work_{nullptr};
|
||||
std::shared_ptr<boost::asio::executor_work_guard<
|
||||
boost::asio::io_context::executor_type>>
|
||||
work_{nullptr};
|
||||
|
||||
liveupdates::WebsocketClient websocketClient_;
|
||||
std::unique_ptr<std::thread> mainThread_;
|
||||
|
||||
@@ -14,11 +14,10 @@ struct ActionUser;
|
||||
|
||||
// Create timer using given ioService
|
||||
template <typename Duration, typename Callback>
|
||||
void runAfter(boost::asio::io_service &ioService, Duration duration,
|
||||
Callback cb)
|
||||
void runAfter(boost::asio::io_context &ioc, Duration duration, Callback cb)
|
||||
{
|
||||
auto timer = std::make_shared<boost::asio::steady_timer>(ioService);
|
||||
timer->expires_from_now(duration);
|
||||
auto timer = std::make_shared<boost::asio::steady_timer>(ioc);
|
||||
timer->expires_after(duration);
|
||||
|
||||
timer->async_wait([timer, cb](const boost::system::error_code &ec) {
|
||||
if (ec)
|
||||
@@ -37,7 +36,7 @@ template <typename Duration, typename Callback>
|
||||
void runAfter(std::shared_ptr<boost::asio::steady_timer> timer,
|
||||
Duration duration, Callback cb)
|
||||
{
|
||||
timer->expires_from_now(duration);
|
||||
timer->expires_after(duration);
|
||||
|
||||
timer->async_wait([timer, cb](const boost::system::error_code &ec) {
|
||||
if (ec)
|
||||
|
||||
@@ -557,8 +557,9 @@ void PubSub::addClient()
|
||||
|
||||
void PubSub::start()
|
||||
{
|
||||
this->work = std::make_shared<boost::asio::io_service::work>(
|
||||
this->websocketClient.get_io_service());
|
||||
this->work = std::make_shared<boost::asio::executor_work_guard<
|
||||
boost::asio::io_context::executor_type>>(
|
||||
this->websocketClient.get_io_service().get_executor());
|
||||
this->thread = std::make_unique<std::thread>([this] {
|
||||
// make sure we set in any case, even exceptions
|
||||
auto guard = qScopeGuard([&] {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "util/ExponentialBackoff.hpp"
|
||||
#include "util/OnceFlag.hpp"
|
||||
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/ssl/context.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
#include <QJsonObject>
|
||||
@@ -263,7 +263,9 @@ private:
|
||||
|
||||
void runThread();
|
||||
|
||||
std::shared_ptr<boost::asio::io_service::work> work{nullptr};
|
||||
std::shared_ptr<boost::asio::executor_work_guard<
|
||||
boost::asio::io_context::executor_type>>
|
||||
work{nullptr};
|
||||
|
||||
const QString host_;
|
||||
const PubSubClientOptions clientOptions_;
|
||||
|
||||
Reference in New Issue
Block a user