Finish up singleton refactoring into one giant class

This commit is contained in:
Rasmus Karlsson
2018-04-28 15:20:18 +02:00
parent 9426a9d633
commit 2f195891cd
34 changed files with 221 additions and 184 deletions
+3 -4
View File
@@ -39,7 +39,6 @@ SplitInput::SplitInput(Split *_chatWidget)
void SplitInput::initLayout()
{
auto app = getApp();
auto &fontManager = singletons::FontManager::getInstance();
util::LayoutCreator<SplitInput> layoutCreator(this);
auto layout = layoutCreator.setLayoutType<QHBoxLayout>().withoutMargin().assign(&this->ui.hbox);
@@ -66,11 +65,11 @@ void SplitInput::initLayout()
// set edit font
this->ui.textEdit->setFont(
fontManager.getFont(singletons::FontManager::Type::Medium, this->getScale()));
app->fonts->getFont(singletons::FontManager::Type::Medium, this->getScale()));
this->managedConnections.emplace_back(fontManager.fontChanged.connect([this, &fontManager]() {
this->managedConnections.emplace_back(app->fonts->fontChanged.connect([=]() {
this->ui.textEdit->setFont(
fontManager.getFont(singletons::FontManager::Type::Medium, this->getScale()));
app->fonts->getFont(singletons::FontManager::Type::Medium, this->getScale()));
}));
// open emote popup