fix: Remove Unused Include Directives (#4266)

* fix: remove unused includes

* fix: bad includes

* fix: top include

* fix: streamer mode includes

* fix: missing include

* fix: remove `#else`

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix 2022-12-27 21:26:32 +01:00 committed by GitHub
parent b2a8327696
commit 757c7c781e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 28 deletions

View file

@ -20,6 +20,7 @@
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198) - Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
- Dev: Migrated to C++ 20 (#4252, #4257) - Dev: Migrated to C++ 20 (#4252, #4257)
- Dev: Enable LTO for main branch builds. (#4258, #4260) - Dev: Enable LTO for main branch builds. (#4258, #4260)
- Dev: Removed unused include directives. (#4266)
## 2.4.0 ## 2.4.0

View file

@ -1,4 +1,4 @@
#include "StreamerMode.hpp" #include "util/StreamerMode.hpp"
#include "Application.hpp" #include "Application.hpp"
#include "common/QLogging.hpp" #include "common/QLogging.hpp"
@ -11,18 +11,18 @@
#include "widgets/splits/Split.hpp" #include "widgets/splits/Split.hpp"
#include "widgets/Window.hpp" #include "widgets/Window.hpp"
#include <QProcess>
#ifdef USEWINSDK #ifdef USEWINSDK
// clang-format off // clang-format off
// These imports cannot be ordered alphabetically.
# include <Windows.h> # include <Windows.h>
# include <VersionHelpers.h> # include <VersionHelpers.h>
# include <WtsApi32.h> # include <WtsApi32.h>
# pragma comment(lib, "Wtsapi32.lib")
// clang-format on // clang-format on
# pragma comment(lib, "Wtsapi32.lib")
#endif #endif
#include <QProcess>
namespace chatterino { namespace chatterino {
constexpr int cooldownInS = 10; constexpr int cooldownInS = 10;

View file

@ -2,10 +2,8 @@
#ifdef USEWINSDK #ifdef USEWINSDK
// clang-format off
# include <Windows.h>
# include <boost/optional.hpp> # include <boost/optional.hpp>
// clang-format on # include <Windows.h>
namespace chatterino { namespace chatterino {

View file

@ -1,4 +1,4 @@
#include "AttachedWindow.hpp" #include "widgets/AttachedWindow.hpp"
#include "Application.hpp" #include "Application.hpp"
#include "common/QLogging.hpp" #include "common/QLogging.hpp"
@ -13,14 +13,14 @@
#include <memory> #include <memory>
#ifdef USEWINSDK #ifdef USEWINSDK
// clang-format off
# include "util/WindowsHelper.hpp" # include "util/WindowsHelper.hpp"
# include "Windows.h" // clang-format off
// don't even think about reordering these // don't even think about reordering these
# include "Windows.h"
# include "Psapi.h" # include "Psapi.h"
# pragma comment(lib, "Dwmapi.lib")
// clang-format on // clang-format on
# pragma comment(lib, "Dwmapi.lib")
#endif #endif
namespace chatterino { namespace chatterino {

View file

@ -1,7 +1,6 @@
#include "BaseWindow.hpp" #include "widgets/BaseWindow.hpp"
#include "BaseSettings.hpp" #include "BaseSettings.hpp"
#include "boost/algorithm/algorithm.hpp"
#include "singletons/Theme.hpp" #include "singletons/Theme.hpp"
#include "util/DebugCount.hpp" #include "util/DebugCount.hpp"
#include "util/PostToThread.hpp" #include "util/PostToThread.hpp"
@ -11,7 +10,6 @@
#include "widgets/TooltipWidget.hpp" #include "widgets/TooltipWidget.hpp"
#include <QApplication> #include <QApplication>
#include <QDebug>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QFont> #include <QFont>
#include <QIcon> #include <QIcon>
@ -24,22 +22,16 @@
#endif #endif
#ifdef USEWINSDK #ifdef USEWINSDK
// clang-format off # include <dwmapi.h>
# include <ObjIdl.h>
# include <VersionHelpers.h> # include <VersionHelpers.h>
# include <Windows.h> # include <Windows.h>
# include <dwmapi.h>
# include <gdiplus.h>
# include <windowsx.h> # include <windowsx.h>
//#include <ShellScalingApi.h>
# pragma comment(lib, "Dwmapi.lib") # pragma comment(lib, "Dwmapi.lib")
# include <QHBoxLayout> # include <QHBoxLayout>
# include <QVBoxLayout>
# define WM_DPICHANGED 0x02E0 # define WM_DPICHANGED 0x02E0
// clang-format on
#endif #endif
#include "widgets/helper/TitlebarButton.hpp" #include "widgets/helper/TitlebarButton.hpp"

View file

@ -1,14 +1,13 @@
#include "FramelessEmbedWindow.hpp" #include "widgets/FramelessEmbedWindow.hpp"
#include "Application.hpp" #include "Application.hpp"
#include "common/Args.hpp"
#include "providers/twitch/TwitchIrcServer.hpp" #include "providers/twitch/TwitchIrcServer.hpp"
#include "QJsonDocument" #include "widgets/splits/Split.hpp"
#include "QMessageBox"
#include <QHBoxLayout> #include <QHBoxLayout>
//#include "widgets/helper/ChannelView.hpp" #include <QJsonDocument>
#include "common/Args.hpp" #include <QMessageBox>
#include "widgets/splits/Split.hpp"
#ifdef USEWINSDK #ifdef USEWINSDK
# include "Windows.h" # include "Windows.h"