diff --git a/BUILDING_ON_WINDOWS.md b/BUILDING_ON_WINDOWS.md index 29e3cc54a..d71ec8459 100644 --- a/BUILDING_ON_WINDOWS.md +++ b/BUILDING_ON_WINDOWS.md @@ -31,7 +31,6 @@ Notes: 2. Unfold the top most tree element (latest stable Qt version, e.g. `Qt 5.15.2`) 3. Under this version, select the following entries: - `MSVC 2019 64-bit` (or alternative version if you are using that) - - `Qt WebEngine` (optional) 4. Under the "Tools" tree element (at the bottom), ensure that `Qt Creator X.X.X` and `Debugging Tools for Windows` are selected. (they should be checked by default) 5. Continue through the installer and let the installer finish installing Qt. diff --git a/CHANGELOG.md b/CHANGELOG.md index c7db0028d..8ae837eff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ - Dev: The Windows installer is now built in CI. (#4408) - Dev: Removed `getApp` and `getSettings` calls from message rendering. (#4535) - Dev: Get the default browser executable instead of the entire command line when opening incognito links. (#4745) +- Dev: Removed unused code hidden behind the USEWEBENGINE define (#4757) ## 2.4.4 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e1d92fe9d..77d5bd282 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -469,8 +469,6 @@ set(SOURCE_FILES widgets/Notebook.hpp widgets/Scrollbar.cpp widgets/Scrollbar.hpp - widgets/StreamView.cpp - widgets/StreamView.hpp widgets/TooltipEntryWidget.cpp widgets/TooltipEntryWidget.hpp widgets/TooltipWidget.cpp diff --git a/src/controllers/hotkeys/ActionNames.hpp b/src/controllers/hotkeys/ActionNames.hpp index c1e429d0f..71dff1ddf 100644 --- a/src/controllers/hotkeys/ActionNames.hpp +++ b/src/controllers/hotkeys/ActionNames.hpp @@ -180,7 +180,6 @@ inline const std::map actionNames{ }}, {"showSearch", ActionDefinition{"Search current channel"}}, {"showGlobalSearch", ActionDefinition{"Search all channels"}}, - {"startWatching", ActionDefinition{"Start watching"}}, {"debug", ActionDefinition{"Show debug popup"}}, }}, {HotkeyCategory::SplitInput, diff --git a/src/widgets/StreamView.cpp b/src/widgets/StreamView.cpp deleted file mode 100644 index 8840e8838..000000000 --- a/src/widgets/StreamView.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "StreamView.hpp" - -#include "common/Channel.hpp" -#include "util/Helpers.hpp" -#include "util/LayoutCreator.hpp" -#include "widgets/helper/ChannelView.hpp" -#include "widgets/splits/Split.hpp" - -#ifdef USEWEBENGINE -# include -#endif - -namespace chatterino { - -StreamView::StreamView(ChannelPtr channel, const QUrl &url) -{ - LayoutCreator layoutCreator(this); - -#ifdef USEWEBENGINE - auto web = - layoutCreator.emplace(this).assign(&this->stream); - web->setUrl(url); - web->settings()->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, - true); -#endif - - auto chat = layoutCreator.emplace(); - chat->setFixedWidth(300); - chat->setChannel(std::move(channel)); - - this->layout()->setSpacing(0); - this->layout()->setContentsMargins(0, 0, 0, 0); -} - -} // namespace chatterino diff --git a/src/widgets/StreamView.hpp b/src/widgets/StreamView.hpp deleted file mode 100644 index a5380585e..000000000 --- a/src/widgets/StreamView.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include -#include - -#include - -class QWebEngineView; - -namespace chatterino { - -class Channel; - -class StreamView : public QWidget -{ -public: - StreamView(std::shared_ptr channel, const QUrl &url); - -private: -#ifdef USEWEBENGINE - QWebEngineView *stream; -#endif -}; - -} // namespace chatterino diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index 80207c3a8..1b036ca4d 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -524,11 +524,6 @@ void Split::addShortcuts() this->setFiltersDialog(); return ""; }}, - {"startWatching", - [this](std::vector) -> QString { - this->startWatching(); - return ""; - }}, {"openInBrowser", [this](std::vector) -> QString { if (this->getChannel()->getType() == Channel::Type::TwitchWhispers) @@ -1401,22 +1396,6 @@ void Split::openSubPage() } } -void Split::startWatching() -{ -#ifdef USEWEBENGINE - ChannelPtr _channel = this->getChannel(); - TwitchChannel *tc = dynamic_cast(_channel.get()); - - if (tc != nullptr) - { - StreamView *view = new StreamView( - _channel, - "https://player.twitch.tv/?parent=twitch.tv&channel=" + tc->name); - view->setAttribute(Qt::WA_DeleteOnClose, true); - view->show(); - } -#endif -} void Split::setFiltersDialog() { SelectChannelFiltersDialog d(this->getFilters(), this); diff --git a/src/widgets/splits/Split.hpp b/src/widgets/splits/Split.hpp index c7c82e473..2275a07e8 100644 --- a/src/widgets/splits/Split.hpp +++ b/src/widgets/splits/Split.hpp @@ -184,7 +184,6 @@ public slots: void openBrowserPlayer(); void openInStreamlink(); void openWithCustomScheme(); - void startWatching(); void setFiltersDialog(); void showSearch(bool singleChannel); void showViewerList(); diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 670e1f833..d6ac035ee 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -37,10 +37,6 @@ #include -#ifdef USEWEBENGINE -# include "widgets/StreamView.hpp" -#endif - namespace { using namespace chatterino; @@ -383,11 +379,6 @@ std::unique_ptr SplitHeader::createMainMenu() "Set filters", this->split_, &Split::setFiltersDialog, h->getDisplaySequence(HotkeyCategory::Split, "pickFilters")); menu->addSeparator(); -#ifdef USEWEBENGINE - this->dropdownMenu.addAction( - "Start watching", this->split_, &Split::startWatching; - h->getDisplaySequence(HotkeyCategory::Split, "startWatching")); -#endif auto *twitchChannel = dynamic_cast(this->split_->getChannel().get()); @@ -397,12 +388,10 @@ std::unique_ptr SplitHeader::createMainMenu() menu->addAction( OPEN_IN_BROWSER, this->split_, &Split::openInBrowser, h->getDisplaySequence(HotkeyCategory::Split, "openInBrowser")); -#ifndef USEWEBENGINE menu->addAction(OPEN_PLAYER_IN_BROWSER, this->split_, &Split::openBrowserPlayer, h->getDisplaySequence(HotkeyCategory::Split, "openPlayerInBrowser")); -#endif menu->addAction( OPEN_IN_STREAMLINK, this->split_, &Split::openInStreamlink, h->getDisplaySequence(HotkeyCategory::Split, "openInStreamlink"));