From 47aa3c96582a7c366fccfca20fd67f2d76c96af7 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Fri, 15 Dec 2023 20:56:24 +0100 Subject: [PATCH 01/10] fix(C4101): unreferenced local variable --- src/providers/twitch/PubSubManager.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/providers/twitch/PubSubManager.cpp b/src/providers/twitch/PubSubManager.cpp index cc240d01d45..80727ea4b8d 100644 --- a/src/providers/twitch/PubSubManager.cpp +++ b/src/providers/twitch/PubSubManager.cpp @@ -210,7 +210,6 @@ PubSub::PubSub(const QString &host, std::chrono::seconds pingInterval) } action.target.login = args[0].toString(); - bool ok; action.messageText = args[1].toString(); action.messageId = args[2].toString(); From 1a6514da9fa7ea142b3befcbf6873bf576d40173 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Fri, 15 Dec 2023 20:56:53 +0100 Subject: [PATCH 02/10] fix(C4189): variable initialized but not referenced --- src/widgets/dialogs/UserInfoPopup.cpp | 1 - src/widgets/listview/GenericListView.cpp | 1 - src/widgets/settingspages/KeyboardSettingsPage.cpp | 5 ++--- src/widgets/splits/SplitHeader.cpp | 2 -- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index e0f1e57f138..2ddad295d4c 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -997,7 +997,6 @@ UserInfoPopup::TimeoutWidget::TimeoutWidget() int buttonWidth = 40; // int buttonWidth = 24; - int buttonWidth2 = 32; int buttonHeight = 32; layout->setSpacing(16); diff --git a/src/widgets/listview/GenericListView.cpp b/src/widgets/listview/GenericListView.cpp index 978229b13fa..e0b2c35cd1f 100644 --- a/src/widgets/listview/GenericListView.cpp +++ b/src/widgets/listview/GenericListView.cpp @@ -161,7 +161,6 @@ void GenericListView::refreshTheme(const Theme &theme) bool GenericListView::acceptCompletion() { const QModelIndex &curIdx = this->currentIndex(); - const int curRow = curIdx.row(); const int count = this->model_->rowCount(curIdx); if (count <= 0) { diff --git a/src/widgets/settingspages/KeyboardSettingsPage.cpp b/src/widgets/settingspages/KeyboardSettingsPage.cpp index d63c160299c..426c356e5f8 100644 --- a/src/widgets/settingspages/KeyboardSettingsPage.cpp +++ b/src/widgets/settingspages/KeyboardSettingsPage.cpp @@ -34,8 +34,7 @@ void tableCellClicked(const QModelIndex &clicked, EditableModelView *view, if (wasAccepted) { auto newHotkey = dialog.data(); - auto vectorIndex = - getApp()->hotkeys->replaceHotkey(hotkey->name(), newHotkey); + getApp()->hotkeys->replaceHotkey(hotkey->name(), newHotkey); getApp()->hotkeys->save(); } } @@ -69,7 +68,7 @@ KeyboardSettingsPage::KeyboardSettingsPage() if (wasAccepted) { auto newHotkey = dialog.data(); - int vectorIndex = getApp()->hotkeys->hotkeys_.append(newHotkey); + getApp()->hotkeys->hotkeys_.append(newHotkey); getApp()->hotkeys->save(); } }); diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 58d75b44b18..2589b9b25f3 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -947,8 +947,6 @@ void SplitHeader::enterEvent(QEvent *event) { if (!this->tooltipText_.isEmpty()) { - auto *channel = this->split_->getChannel().get(); - this->tooltipWidget_->setOne({nullptr, this->tooltipText_}); this->tooltipWidget_->setWordWrap(true); this->tooltipWidget_->adjustSize(); From 9dc0b2bb6e3a54f96c39ba4a3963ca15b58a046a Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Fri, 15 Dec 2023 20:59:35 +0100 Subject: [PATCH 03/10] fix(C4305): narrowing from double to float --- src/widgets/BaseWindow.cpp | 2 +- src/widgets/Label.cpp | 6 ++++-- src/widgets/settingspages/SettingsPage.hpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index 6fdfe75c717..062f9efc969 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -118,7 +118,7 @@ float BaseWindow::scale() const float BaseWindow::qtFontScale() const { - return this->scale() / std::max(0.01, this->nativeScale_); + return this->scale() / std::max(0.01F, this->nativeScale_); } void BaseWindow::init() diff --git a/src/widgets/Label.cpp b/src/widgets/Label.cpp index 7f5e8a4ce80..bcec1d28072 100644 --- a/src/widgets/Label.cpp +++ b/src/widgets/Label.cpp @@ -95,11 +95,13 @@ void Label::paintEvent(QPaintEvent *) QFontMetrics metrics = getFonts()->getFontMetrics( this->getFontStyle(), this->scale() * 96.f / - std::max(0.01, this->logicalDpiX() * deviceDpi)); + std::max( + 0.01F, static_cast(this->logicalDpiX() * deviceDpi))); painter.setFont(getFonts()->getFont( this->getFontStyle(), this->scale() * 96.f / - std::max(0.02, this->logicalDpiX() * deviceDpi))); + std::max( + 0.02F, static_cast(this->logicalDpiX() * deviceDpi)))); int offset = this->getOffset(); diff --git a/src/widgets/settingspages/SettingsPage.hpp b/src/widgets/settingspages/SettingsPage.hpp index 1b69e656cd1..f982114cbf6 100644 --- a/src/widgets/settingspages/SettingsPage.hpp +++ b/src/widgets/settingspages/SettingsPage.hpp @@ -27,7 +27,7 @@ { \ QPainter painter(this); \ QColor color = QColor("#222222"); \ - color.setAlphaF(0.7); \ + color.setAlphaF(0.7F); \ painter.fillRect(this->rect(), color); \ } \ } \ From 72e097c27d0dc95601de92e030be8b0c910e633c Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Fri, 15 Dec 2023 21:01:41 +0100 Subject: [PATCH 04/10] fix(C4457): declaration hiding function parameter --- src/widgets/settingspages/GeneralPageView.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/settingspages/GeneralPageView.hpp b/src/widgets/settingspages/GeneralPageView.hpp index 33785549521..61a77fbde83 100644 --- a/src/widgets/settingspages/GeneralPageView.hpp +++ b/src/widgets/settingspages/GeneralPageView.hpp @@ -256,9 +256,9 @@ class GeneralPageView : public QWidget { auto *combo = this->addDropdown(text, {}, std::move(toolTipText)); - for (const auto &text : items) + for (const auto &item : items) { - combo->addItem(QString::fromStdString(std::string(text))); + combo->addItem(QString::fromStdString(std::string(item))); } if (!defaultValueText.isEmpty()) From 1ce3e4fb527b33625477ecfc3ee1cf2d2fb9cb4f Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Fri, 15 Dec 2023 21:32:36 +0100 Subject: [PATCH 05/10] fix(C4456): shadowing declaration --- .../notifications/NotificationController.cpp | 8 +++--- src/controllers/sound/MiniaudioBackend.cpp | 4 +-- src/providers/twitch/TwitchMessageBuilder.cpp | 4 +-- src/widgets/dialogs/ReplyThreadPopup.cpp | 6 ++-- src/widgets/helper/ChannelView.cpp | 10 ++++--- src/widgets/settingspages/SettingsPage.cpp | 28 +++++++++++-------- src/widgets/splits/SplitContainer.cpp | 6 ++-- 7 files changed, 36 insertions(+), 30 deletions(-) diff --git a/src/controllers/notifications/NotificationController.cpp b/src/controllers/notifications/NotificationController.cpp index 4866bf9872f..80d13a54012 100644 --- a/src/controllers/notifications/NotificationController.cpp +++ b/src/controllers/notifications/NotificationController.cpp @@ -208,11 +208,11 @@ void NotificationController::checkStream(bool live, QString channelName) void NotificationController::removeFakeChannel(const QString channelName) { - auto i = std::find(fakeTwitchChannels.begin(), fakeTwitchChannels.end(), - channelName); - if (i != fakeTwitchChannels.end()) + auto it = std::find(fakeTwitchChannels.begin(), fakeTwitchChannels.end(), + channelName); + if (it != fakeTwitchChannels.end()) { - fakeTwitchChannels.erase(i); + fakeTwitchChannels.erase(it); // "delete" old 'CHANNEL is live' message LimitedQueueSnapshot snapshot = getApp()->twitch->liveChannel->getMessageSnapshot(); diff --git a/src/controllers/sound/MiniaudioBackend.cpp b/src/controllers/sound/MiniaudioBackend.cpp index 288dd50857b..d9afa6c6ceb 100644 --- a/src/controllers/sound/MiniaudioBackend.cpp +++ b/src/controllers/sound/MiniaudioBackend.cpp @@ -256,8 +256,8 @@ void MiniaudioBackend::play(const QUrl &sound) if (sound.isLocalFile()) { auto soundPath = sound.toLocalFile(); - auto result = ma_engine_play_sound(this->engine.get(), - qPrintable(soundPath), nullptr); + result = ma_engine_play_sound(this->engine.get(), + qPrintable(soundPath), nullptr); if (result != MA_SUCCESS) { qCWarning(chatterinoSound) << "Failed to play sound" << sound diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index 00f9bf68870..8ef6bcc66e2 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -1729,7 +1729,7 @@ void TwitchMessageBuilder::listOfUsersSystemMessage( MessagePtr TwitchMessageBuilder::buildHypeChatMessage( Communi::IrcPrivateMessage *message) { - auto level = message->tag(u"pinned-chat-paid-level"_s).toString(); + auto levelID = message->tag(u"pinned-chat-paid-level"_s).toString(); auto currency = message->tag(u"pinned-chat-paid-currency"_s).toString(); bool okAmount = false; auto amount = message->tag(u"pinned-chat-paid-amount"_s).toInt(&okAmount); @@ -1743,7 +1743,7 @@ MessagePtr TwitchMessageBuilder::buildHypeChatMessage( // additionally, there's `pinned-chat-paid-is-system-message` which isn't used by Chatterino. QString subtitle; - auto levelIt = HYPE_CHAT_PAID_LEVEL.find(level); + auto levelIt = HYPE_CHAT_PAID_LEVEL.find(levelID); if (levelIt != HYPE_CHAT_PAID_LEVEL.end()) { const auto &level = levelIt->second; diff --git a/src/widgets/dialogs/ReplyThreadPopup.cpp b/src/widgets/dialogs/ReplyThreadPopup.cpp index eeb0d82b4e4..a9501ca1243 100644 --- a/src/widgets/dialogs/ReplyThreadPopup.cpp +++ b/src/widgets/dialogs/ReplyThreadPopup.cpp @@ -238,11 +238,11 @@ void ReplyThreadPopup::addMessagesFromThread() this->ui_.threadView->setChannel(this->virtualChannel_); this->ui_.threadView->setSourceChannel(sourceChannel); - auto overrideFlags = + auto rootOverrideFlags = std::optional(this->thread_->root()->flags); - overrideFlags->set(MessageFlag::DoNotLog); + rootOverrideFlags->set(MessageFlag::DoNotLog); - this->virtualChannel_->addMessage(this->thread_->root(), overrideFlags); + this->virtualChannel_->addMessage(this->thread_->root(), rootOverrideFlags); for (const auto &msgRef : this->thread_->replies()) { if (auto msg = msgRef.lock()) diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index 171f05e65c5..a333e89e12d 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -2888,12 +2888,14 @@ void ChannelView::setInputReply(const MessagePtr &message) if (!message->replyThread) { // Message did not already have a thread attached, try to find or create one - if (auto *tc = - dynamic_cast(this->underlyingChannel_.get())) + auto *tc = + dynamic_cast(this->underlyingChannel_.get()); + if (!tc) { - tc->getOrCreateThread(message); + tc = dynamic_cast(this->channel_.get()); } - else if (auto *tc = dynamic_cast(this->channel_.get())) + + if (tc) { tc->getOrCreateThread(message); } diff --git a/src/widgets/settingspages/SettingsPage.cpp b/src/widgets/settingspages/SettingsPage.cpp index bedb52067d3..8586e997ee3 100644 --- a/src/widgets/settingspages/SettingsPage.cpp +++ b/src/widgets/settingspages/SettingsPage.cpp @@ -21,36 +21,40 @@ bool filterItemsRec(QObject *object, const QString &query) widget->update(); }; - if (auto x = dynamic_cast(child); x) + if (auto *checkBox = dynamic_cast(child)) { - setOpacity(x, x->text().contains(query, Qt::CaseInsensitive)); + setOpacity(checkBox, + checkBox->text().contains(query, Qt::CaseInsensitive)); } - else if (auto x = dynamic_cast(child); x) + else if (auto *lbl = dynamic_cast(child)) { - setOpacity(x, x->text().contains(query, Qt::CaseInsensitive)); + setOpacity(lbl, lbl->text().contains(query, Qt::CaseInsensitive)); } - else if (auto x = dynamic_cast(child); x) + else if (auto *comboBox = dynamic_cast(child)) { - setOpacity(x, [=]() { - for (int i = 0; i < x->count(); i++) + setOpacity(comboBox, [=]() { + for (int i = 0; i < comboBox->count(); i++) { - if (x->itemText(i).contains(query, Qt::CaseInsensitive)) + if (comboBox->itemText(i).contains(query, + Qt::CaseInsensitive)) + { return true; + } } return false; }()); } - else if (auto x = dynamic_cast(child); x) + else if (auto *tabs = dynamic_cast(child)) { - for (int i = 0; i < x->count(); i++) + for (int i = 0; i < tabs->count(); i++) { bool tabAny{}; - if (x->tabText(i).contains(query, Qt::CaseInsensitive)) + if (tabs->tabText(i).contains(query, Qt::CaseInsensitive)) { tabAny = true; } - auto widget = x->widget(i); + auto *widget = tabs->widget(i); tabAny |= filterItemsRec(widget, query); any |= tabAny; diff --git a/src/widgets/splits/SplitContainer.cpp b/src/widgets/splits/SplitContainer.cpp index d6b08645a27..276ab6d2bf9 100644 --- a/src/widgets/splits/SplitContainer.cpp +++ b/src/widgets/splits/SplitContainer.cpp @@ -842,12 +842,12 @@ void SplitContainer::applyFromDescriptorRecursively( { if (std::holds_alternative(item)) { - const auto *n = std::get_if(&item); - if (!n) + const auto *inner = std::get_if(&item); + if (!inner) { return; } - const auto &splitNode = *n; + const auto &splitNode = *inner; auto *split = new Split(this); split->setChannel(WindowManager::decodeChannel(splitNode)); split->setModerationMode(splitNode.moderationMode_); From e22c16c60007ccf0fa9e552bfb8288812aa552b2 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Fri, 15 Dec 2023 21:49:15 +0100 Subject: [PATCH 06/10] fix(C4996): remove deprecations --- src/RunGui.cpp | 2 +- src/common/Env.cpp | 62 +++++++++++--------------------- src/singletons/WindowManager.cpp | 2 +- src/util/AttachToConsole.cpp | 6 ++-- 4 files changed, 26 insertions(+), 46 deletions(-) diff --git a/src/RunGui.cpp b/src/RunGui.cpp index 62f1d6a43d5..a495fbef414 100644 --- a/src/RunGui.cpp +++ b/src/RunGui.cpp @@ -77,7 +77,7 @@ namespace { { // set up the QApplication flags QApplication::setAttribute(Qt::AA_Use96Dpi, true); -#ifdef Q_OS_WIN32 +#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); #endif diff --git a/src/common/Env.cpp b/src/common/Env.cpp index 174cae67bf6..6a7f5dac3ef 100644 --- a/src/common/Env.cpp +++ b/src/common/Env.cpp @@ -3,6 +3,7 @@ #include "common/QLogging.hpp" #include "util/TypeName.hpp" +#include #include namespace chatterino { @@ -10,16 +11,8 @@ namespace chatterino { namespace { template - void warn(const char *envName, T defaultValue) + void warn(const char *envName, const QString &envString, T defaultValue) { - auto *envString = std::getenv(envName); - if (!envString) - { - // This function is not supposed to be used for non-existant - // environment variables. - return; - } - const auto typeName = QString::fromStdString( std::string(type_name())); @@ -33,23 +26,12 @@ namespace { .arg(defaultValue); } - QString readStringEnv(const char *envName, QString defaultValue) - { - auto envString = std::getenv(envName); - if (envString != nullptr) - { - return QString(envString); - } - - return defaultValue; - } - std::optional readOptionalStringEnv(const char *envName) { - auto envString = std::getenv(envName); - if (envString != nullptr) + auto envString = qEnvironmentVariable(envName); + if (!envString.isEmpty()) { - return QString(envString); + return envString; } return std::nullopt; @@ -57,30 +39,28 @@ namespace { uint16_t readPortEnv(const char *envName, uint16_t defaultValue) { - auto envString = std::getenv(envName); - if (envString != nullptr) + auto envString = qEnvironmentVariable(envName); + if (!envString.isEmpty()) { - bool ok; - auto val = QString(envString).toUShort(&ok); + bool ok = false; + auto val = envString.toUShort(&ok); if (ok) { return val; } - else - { - warn(envName, defaultValue); - } + + warn(envName, envString, defaultValue); } return defaultValue; } - uint16_t readBoolEnv(const char *envName, bool defaultValue) + bool readBoolEnv(const char *envName, bool defaultValue) { - auto envString = std::getenv(envName); - if (envString != nullptr) + auto envString = qEnvironmentVariable(envName); + if (!envString.isEmpty()) { - return QVariant(QString(envString)).toBool(); + return QVariant(envString).toBool(); } return defaultValue; @@ -90,14 +70,14 @@ namespace { Env::Env() : recentMessagesApiUrl( - readStringEnv("CHATTERINO2_RECENT_MESSAGES_URL", - "https://recent-messages.robotty.de/api/v2/" - "recent-messages/%1")) - , linkResolverUrl(readStringEnv( + qEnvironmentVariable("CHATTERINO2_RECENT_MESSAGES_URL", + "https://recent-messages.robotty.de/api/v2/" + "recent-messages/%1")) + , linkResolverUrl(qEnvironmentVariable( "CHATTERINO2_LINK_RESOLVER_URL", "https://braize.pajlada.com/chatterino/link_resolver/%1")) - , twitchServerHost( - readStringEnv("CHATTERINO2_TWITCH_SERVER_HOST", "irc.chat.twitch.tv")) + , twitchServerHost(qEnvironmentVariable("CHATTERINO2_TWITCH_SERVER_HOST", + "irc.chat.twitch.tv")) , twitchServerPort(readPortEnv("CHATTERINO2_TWITCH_SERVER_PORT", 443)) , twitchServerSecure(readBoolEnv("CHATTERINO2_TWITCH_SERVER_SECURE", true)) , proxyUrl(readOptionalStringEnv("CHATTERINO2_PROXY_URL")) diff --git a/src/singletons/WindowManager.cpp b/src/singletons/WindowManager.cpp index 5174f2a3399..d8692efda5a 100644 --- a/src/singletons/WindowManager.cpp +++ b/src/singletons/WindowManager.cpp @@ -750,7 +750,7 @@ void WindowManager::applyWindowLayout(const WindowLayout &layout) // out of bounds windows auto screens = qApp->screens(); bool outOfBounds = - !getenv("I3SOCK") && + !qEnvironmentVariableIsSet("I3SOCK") && std::none_of(screens.begin(), screens.end(), [&](QScreen *screen) { return screen->availableGeometry().intersects( diff --git a/src/util/AttachToConsole.cpp b/src/util/AttachToConsole.cpp index 5e5ca77ff8d..41689c699af 100644 --- a/src/util/AttachToConsole.cpp +++ b/src/util/AttachToConsole.cpp @@ -3,7 +3,7 @@ #ifdef USEWINSDK # include -# include +# include #endif namespace chatterino { @@ -13,8 +13,8 @@ void attachToConsole() #ifdef USEWINSDK if (AttachConsole(ATTACH_PARENT_PROCESS)) { - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); + std::ignore = freopen_s(nullptr, "CONOUT$", "w", stdout); + std::ignore = freopen_s(nullptr, "CONOUT$", "w", stderr); } #endif } From 322a7a7f22fefda97691a615e76ed08cf971ac75 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Fri, 15 Dec 2023 22:07:57 +0100 Subject: [PATCH 07/10] chore: add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd00604d3bd..dabb9d78afd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ - Dev: Refactored the Image Uploader feature. (#4971) - Dev: Fixed deadlock and use-after-free in tests. (#4981) - Dev: Load less message history upon reconnects. (#5001) +- Dev: Reduce warnings when compiling with MSVC. (#5028) ## 2.4.6 From c96853d3c0b6d27d67906c5b36d7c0b6d4c396c0 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 16 Dec 2023 11:50:09 +0100 Subject: [PATCH 08/10] fix: Remove more unused variables --- src/CMakeLists.txt | 1 - src/providers/irc/AbstractIrcServer.cpp | 4 ---- src/providers/twitch/TwitchChannel.cpp | 1 - src/widgets/dialogs/UserInfoPopup.cpp | 31 ------------------------- src/widgets/helper/NotebookTab.cpp | 1 - 5 files changed, 38 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1c6c3c0a0f3..53ed53a7bc9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1067,7 +1067,6 @@ else () -Wno-switch -Wno-deprecated-declarations -Wno-sign-compare - -Wno-unused-variable # Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future -Wno-strict-aliasing diff --git a/src/providers/irc/AbstractIrcServer.cpp b/src/providers/irc/AbstractIrcServer.cpp index 9c30049e707..b71bf46d3b8 100644 --- a/src/providers/irc/AbstractIrcServer.cpp +++ b/src/providers/irc/AbstractIrcServer.cpp @@ -11,10 +11,6 @@ namespace chatterino { -const int RECONNECT_BASE_INTERVAL = 2000; -// 60 falloff counter means it will try to reconnect at most every 60*2 seconds -const int MAX_FALLOFF_COUNTER = 60; - // Ratelimits for joinBucket_ const int JOIN_RATELIMIT_BUDGET = 18; const int JOIN_RATELIMIT_COOLDOWN = 12500; diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index e2826fd42e1..4652f44fe09 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -56,7 +56,6 @@ namespace { #else const QString MAGIC_MESSAGE_SUFFIX = QString::fromUtf8(u8" \U000E0000"); #endif - constexpr int TITLE_REFRESH_PERIOD = 10000; constexpr int CLIP_CREATION_COOLDOWN = 5000; const QString CLIPS_LINK("https://clips.twitch.tv/%1"); const QString CLIPS_FAILURE_CLIPS_DISABLED_TEXT( diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index 2ddad295d4c..5bf44c5e99f 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -992,42 +992,11 @@ UserInfoPopup::TimeoutWidget::TimeoutWidget() .setLayoutType() .withoutMargin(); - QColor color1(255, 255, 255, 80); - QColor color2(255, 255, 255, 0); - int buttonWidth = 40; - // int buttonWidth = 24; int buttonHeight = 32; layout->setSpacing(16); - //auto addButton = [&](Action action, const QString &text, - // const QPixmap &pixmap) { - // auto vbox = layout.emplace().withoutMargin(); - // { - // auto title = vbox.emplace().withoutMargin(); - // title->addStretch(1); - // auto label = title.emplace