Update settings and signals library version

This commit is contained in:
Rasmus Karlsson
2017-12-17 03:37:46 +01:00
parent c1ac7db24c
commit bb081b710e
16 changed files with 52 additions and 74 deletions
+5 -11
View File
@@ -30,9 +30,9 @@ SplitInput::SplitInput(Split *_chatWidget)
auto &fontManager = FontManager::getInstance();
this->textInput.setFont(fontManager.getFont(FontManager::Type::Medium));
fontManager.fontChanged.connect([this, &fontManager]() {
this->managedConnections.emplace_back(fontManager.fontChanged.connect([this, &fontManager]() {
this->textInput.setFont(fontManager.getFont(FontManager::Type::Medium));
});
}));
this->editContainer.addWidget(&this->textInput);
this->editContainer.setMargin(4);
@@ -177,9 +177,9 @@ SplitInput::SplitInput(Split *_chatWidget)
}
});
this->textLengthVisibleChangedConnection =
SettingsManager::getInstance().showMessageLength.getValueChangedSignal().connect(
[this](const bool &value) { this->textLengthLabel.setHidden(!value); });
SettingsManager::getInstance().showMessageLength.connect(
[this](const bool &value, auto) { this->textLengthLabel.setHidden(!value); },
this->managedConnections);
QObject::connect(&this->textInput, &QTextEdit::copyAvailable, [this](bool available) {
if (available) {
@@ -188,12 +188,6 @@ SplitInput::SplitInput(Split *_chatWidget)
});
}
SplitInput::~SplitInput()
{
SettingsManager::getInstance().showMessageLength.getValueChangedSignal().disconnect(
this->textLengthVisibleChangedConnection);
}
void SplitInput::clearSelection()
{
QTextCursor c = this->textInput.textCursor();