re-enable link resolver, but fix the underlying issue in the "link changed" signal.

The feature itself still doesn't work for me, but this code does the same thing.
only thing that's really different is it also disconnects the signal properly once
the TextLayoutElement is deleted
This commit is contained in:
Rasmus Karlsson
2018-10-23 10:32:13 +02:00
parent afee4d9d37
commit 0f44a2e0f4
5 changed files with 18 additions and 5 deletions
+1 -2
View File
@@ -183,8 +183,7 @@ void TextElement::addToContainer(MessageLayoutContainer &container,
// Should update it in MessageLayoutElement too!
if (this->getLink().type == Link::Url)
{
this->linkChanged.connect(
[this, e]() { e->setLink(this->getLink()); });
static_cast<TextLayoutElement *>(e)->listenToLinkChanges();
}
return e;
};