refactor: adapt magic_enum to Qt (#5258)

This commit is contained in:
nerix
2024-03-23 12:22:42 +01:00
committed by GitHub
parent 044d457d20
commit ed20e71db4
25 changed files with 603 additions and 80 deletions
@@ -1,5 +1,7 @@
#include "providers/twitch/pubsubmessages/ChatModeratorAction.hpp"
#include "util/QMagicEnum.hpp"
namespace chatterino {
PubSubChatModeratorActionMessage::PubSubChatModeratorActionMessage(
@@ -7,7 +9,7 @@ PubSubChatModeratorActionMessage::PubSubChatModeratorActionMessage(
: typeString(root.value("type").toString())
, data(root.value("data").toObject())
{
auto oType = magic_enum::enum_cast<Type>(this->typeString.toStdString());
auto oType = qmagicenum::enumCast<Type>(this->typeString);
if (oType.has_value())
{
this->type = oType.value();