Replace boost::optional with std::optional (#4877)
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
#include "util/DisplayBadge.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <QComboBox>
|
||||
#include <QDialog>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -14,7 +14,7 @@ class BadgePickerDialog : public QDialog,
|
||||
public std::enable_shared_from_this<BadgePickerDialog>
|
||||
{
|
||||
using QIconPtr = std::shared_ptr<QIcon>;
|
||||
using BadgeOpt = boost::optional<DisplayBadge>;
|
||||
using BadgeOpt = std::optional<DisplayBadge>;
|
||||
|
||||
public:
|
||||
BadgePickerDialog(QList<DisplayBadge> badges, QWidget *parent = nullptr);
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
#include "providers/irc/Irc2.hpp"
|
||||
#include "widgets/BaseWindow.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <QDialog>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace Ui {
|
||||
class IrcConnectionEditor;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ void ReplyThreadPopup::addMessagesFromThread()
|
||||
this->ui_.threadView->setSourceChannel(sourceChannel);
|
||||
|
||||
auto overrideFlags =
|
||||
boost::optional<MessageFlags>(this->thread_->root()->flags);
|
||||
std::optional<MessageFlags>(this->thread_->root()->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
this->virtualChannel_->addMessage(this->thread_->root(), overrideFlags);
|
||||
@@ -247,7 +247,7 @@ void ReplyThreadPopup::addMessagesFromThread()
|
||||
{
|
||||
if (auto msg = msgRef.lock())
|
||||
{
|
||||
auto overrideFlags = boost::optional<MessageFlags>(msg->flags);
|
||||
auto overrideFlags = std::optional<MessageFlags>(msg->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
this->virtualChannel_->addMessage(msg, overrideFlags);
|
||||
@@ -261,7 +261,7 @@ void ReplyThreadPopup::addMessagesFromThread()
|
||||
if (message->replyThread == this->thread_)
|
||||
{
|
||||
auto overrideFlags =
|
||||
boost::optional<MessageFlags>(message->flags);
|
||||
std::optional<MessageFlags>(message->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
// same reply thread, add message
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace {
|
||||
{
|
||||
MessagePtr message = snapshot[i];
|
||||
|
||||
auto overrideFlags = boost::optional<MessageFlags>(message->flags);
|
||||
auto overrideFlags = std::optional<MessageFlags>(message->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
if (checkMessageUserName(userName, message))
|
||||
|
||||
Reference in New Issue
Block a user