mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
ref: replace fluff to get username QColor with QVariant.value<QColor>
This commit is contained in:
parent
afe3487bd9
commit
c6204743a6
|
@ -539,10 +539,10 @@ std::vector<MessagePtr> parseUserNoticeMessage(Channel *channel,
|
||||||
{
|
{
|
||||||
auto login = loginTag.value().toString();
|
auto login = loginTag.value().toString();
|
||||||
MessageColor color = MessageColor::System;
|
MessageColor color = MessageColor::System;
|
||||||
if (auto colorTag = tags.find("color"); colorTag != tags.end())
|
if (auto colorTag = tags.value("color").value<QColor>();
|
||||||
|
colorTag.isValid())
|
||||||
{
|
{
|
||||||
// Blindly trust that it's a valid hex code
|
color = MessageColor(colorTag);
|
||||||
color = MessageColor(QColor{colorTag.value().toString()});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto displayName = displayNameTag.value().toString();
|
auto displayName = displayNameTag.value().toString();
|
||||||
|
|
Loading…
Reference in a new issue