From 314c15bb87a1e78b30bae316fe3447bac9615e0a Mon Sep 17 00:00:00 2001 From: fourtf Date: Thu, 5 Jul 2018 22:55:06 +0200 Subject: [PATCH] Small fixes for the last PR --- src/widgets/dialogs/LastRunCrashDialog.cpp | 2 -- src/widgets/dialogs/LogsPopup.cpp | 12 +++++------- src/widgets/dialogs/UserInfoPopup.cpp | 6 +++--- src/widgets/dialogs/UserInfoPopup.hpp | 2 +- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/widgets/dialogs/LastRunCrashDialog.cpp b/src/widgets/dialogs/LastRunCrashDialog.cpp index b2d66e15d..0e46702c6 100644 --- a/src/widgets/dialogs/LastRunCrashDialog.cpp +++ b/src/widgets/dialogs/LastRunCrashDialog.cpp @@ -16,8 +16,6 @@ LastRunCrashDialog::LastRunCrashDialog() this->setWindowFlag(Qt::WindowContextHelpButtonHint, false); this->setWindowTitle("Chatterino"); - auto &updateManager = Updates::getInstance(); - auto layout = LayoutCreator(this).setLayoutType(); layout.emplace( diff --git a/src/widgets/dialogs/LogsPopup.cpp b/src/widgets/dialogs/LogsPopup.cpp index 647526ba1..f9f65f09b 100644 --- a/src/widgets/dialogs/LogsPopup.cpp +++ b/src/widgets/dialogs/LogsPopup.cpp @@ -20,15 +20,13 @@ LogsPopup::LogsPopup() void LogsPopup::initLayout() { - { - QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(0); + QVBoxLayout *layout = new QVBoxLayout(this); + layout->setMargin(0); - this->channelView_ = new ChannelView(this); - layout->addWidget(this->channelView_); + this->channelView_ = new ChannelView(this); + layout->addWidget(this->channelView_); - this->setLayout(layout); - } + this->setLayout(layout); } void LogsPopup::setInfo(ChannelPtr channel, QString userName) diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index f2eee9817..6163bceca 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -69,8 +69,8 @@ UserInfoPopup::UserInfoPopup() user.emplace("Follow").assign(&this->ui_.follow); user.emplace("Ignore").assign(&this->ui_.ignore); user.emplace("Ignore highlights").assign(&this->ui_.ignoreHighlights); - auto viewLogs = user.emplace(this).assign(&this->ui_.viewLogs); - this->ui_.viewLogs->getLabel().setText("Logs"); + auto viewLogs = user.emplace(this); + viewLogs->getLabel().setText("Logs"); auto mod = user.emplace(this); mod->setPixmap(app->resources->buttons.mod); @@ -81,7 +81,7 @@ UserInfoPopup::UserInfoPopup() user->addStretch(1); - QObject::connect(viewLogs.getElement(), &RippleEffectLabel::clicked, [this] { + QObject::connect(viewLogs.getElement(), &RippleEffectButton::clicked, [this] { auto logs = new LogsPopup(); logs->setInfo(this->channel_, this->userName_); logs->setAttribute(Qt::WA_DeleteOnClose); diff --git a/src/widgets/dialogs/UserInfoPopup.hpp b/src/widgets/dialogs/UserInfoPopup.hpp index 38e89fa0d..711fda3c4 100644 --- a/src/widgets/dialogs/UserInfoPopup.hpp +++ b/src/widgets/dialogs/UserInfoPopup.hpp @@ -42,7 +42,7 @@ private: struct { RippleEffectButton *avatarButton = nullptr; - RippleEffectLabel *viewLogs = nullptr; + // RippleEffectLabel2 *viewLogs = nullptr; Label *nameLabel = nullptr; Label *viewCountLabel = nullptr;