Add support for plugin links (#6386)

Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
Mm2PL
2025-10-02 20:56:51 +02:00
committed by GitHub
parent 3f05edc071
commit 33f6383122
14 changed files with 190 additions and 16 deletions
+14 -2
View File
@@ -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