Update Settings and Signals version (#3398)
Co-authored-by: zneix <zneix@zneix.eu>
This commit is contained in:
@@ -222,13 +222,10 @@ TextLayoutElement::TextLayoutElement(MessageElement &_creator, QString &_text,
|
||||
|
||||
void TextLayoutElement::listenToLinkChanges()
|
||||
{
|
||||
this->managedConnections_.emplace_back(
|
||||
static_cast<TextElement &>(this->getCreator())
|
||||
.linkChanged.connect([this]() {
|
||||
// log("Old link: {}", this->getCreator().getLink().value);
|
||||
// log("This link: {}", this->getLink().value);
|
||||
this->setLink(this->getCreator().getLink());
|
||||
}));
|
||||
this->managedConnections_.managedConnect(
|
||||
static_cast<TextElement &>(this->getCreator()).linkChanged, [this]() {
|
||||
this->setLink(this->getCreator().getLink());
|
||||
});
|
||||
}
|
||||
|
||||
void TextLayoutElement::addCopyTextToString(QString &str, int from,
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include "messages/MessageColor.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
|
||||
#include <pajlada/signals/signalholder.hpp>
|
||||
|
||||
class QPainter;
|
||||
|
||||
namespace chatterino {
|
||||
@@ -114,7 +116,7 @@ protected:
|
||||
FontStyle style_;
|
||||
float scale_;
|
||||
|
||||
std::vector<pajlada::Signals::ScopedConnection> managedConnections_;
|
||||
pajlada::Signals::SignalHolder managedConnections_;
|
||||
};
|
||||
|
||||
// TEXT ICON
|
||||
|
||||
Reference in New Issue
Block a user