Add support for plugin links (#6386)
Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
@@ -1106,6 +1106,7 @@ void TimestampElement::addToContainer(MessageLayoutContainer &container,
|
||||
{
|
||||
if (ctx.flags.hasAny(this->getFlags()))
|
||||
{
|
||||
this->setTooltip(this->getTooltip());
|
||||
if (getSettings()->timestampFormat != this->format_)
|
||||
{
|
||||
this->format_ = getSettings()->timestampFormat.getValue();
|
||||
@@ -1122,8 +1123,19 @@ TextElement *TimestampElement::formatTime(const QTime &time)
|
||||
|
||||
QString format = locale.toString(time, getSettings()->timestampFormat);
|
||||
|
||||
return new TextElement(format, MessageElementFlag::Timestamp,
|
||||
MessageColor::System, FontStyle::TimestampMedium);
|
||||
auto *text =
|
||||
new TextElement(format, MessageElementFlag::Timestamp,
|
||||
MessageColor::System, FontStyle::TimestampMedium);
|
||||
text->setLink(this->getLink());
|
||||
text->setTooltip(this->getTooltip());
|
||||
return text;
|
||||
}
|
||||
|
||||
MessageElement *TimestampElement::setLink(const Link &link)
|
||||
{
|
||||
MessageElement::setLink(link);
|
||||
this->element_->setLink(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
QJsonObject TimestampElement::toJson() const
|
||||
|
||||
Reference in New Issue
Block a user