Sort and force grouping of includes (#4172)

This change enforces strict include grouping using IncludeCategories

In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:

    In ChatterSet.hpp, I changed lrucache to a <>include
    In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
    In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
    In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
    clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
This commit is contained in:
pajlada
2022-11-27 19:32:53 +01:00
committed by GitHub
parent f2b35fb7dc
commit 032f290767
247 changed files with 658 additions and 566 deletions
@@ -12,6 +12,7 @@
#include <QHeaderView>
#include <QTableView>
#include <QVBoxLayout>
#include <algorithm>
namespace chatterino {
+7 -7
View File
@@ -1,18 +1,18 @@
#include "CommandPage.hpp"
#include <QHeaderView>
#include <QLabel>
#include <QPushButton>
#include <QStandardItemModel>
#include <QTableView>
#include <QTextEdit>
#include "Application.hpp"
#include "controllers/commands/CommandController.hpp"
#include "controllers/commands/CommandModel.hpp"
#include "util/LayoutCreator.hpp"
#include "util/StandardItemHelper.hpp"
#include "widgets/helper/EditableModelView.hpp"
#include <QHeaderView>
#include <QLabel>
#include <QPushButton>
#include <QStandardItemModel>
#include <QTableView>
#include <QTextEdit>
//#include "widgets/helper/ComboBoxItemDelegate.hpp"
#include "util/CombinePath.hpp"
#include "util/Qt.hpp"
+2 -2
View File
@@ -1,10 +1,10 @@
#pragma once
#include "widgets/settingspages/SettingsPage.hpp"
#include <QTextEdit>
#include <QTimer>
#include "widgets/settingspages/SettingsPage.hpp"
namespace chatterino {
class CommandPage : public SettingsPage
+2 -3
View File
@@ -4,13 +4,12 @@
#include "singletons/Settings.hpp"
#include "singletons/WindowManager.hpp"
#include "util/LayoutCreator.hpp"
#include "widgets/Window.hpp"
#include "widgets/dialogs/ChannelFilterEditorDialog.hpp"
#include "widgets/helper/EditableModelView.hpp"
#include <QTableView>
#include "widgets/Window.hpp"
#include <QHeaderView>
#include <QTableView>
#define FILTERS_DOCUMENTATION "https://wiki.chatterino.com/Filters"
@@ -1,15 +1,15 @@
#pragma once
#include <QDebug>
#include <boost/variant.hpp>
#include <pajlada/signals/signalholder.hpp>
#include "Application.hpp"
#include "common/ChatterinoSetting.hpp"
#include "singletons/WindowManager.hpp"
#include "widgets/helper/SignalLabel.hpp"
#include <boost/variant.hpp>
#include <pajlada/signals/signalholder.hpp>
#include <QCheckBox>
#include <QComboBox>
#include <QDebug>
#include <QPushButton>
#include <QSpinBox>
@@ -17,8 +17,8 @@
#include <QListWidget>
#include <QPushButton>
#include <QStandardItemModel>
#include <QTabWidget>
#include <QTableView>
#include <QTabWidget>
#include <QTextEdit>
#define ENABLE_HIGHLIGHTS "Enable Highlighting"
+1 -1
View File
@@ -17,9 +17,9 @@
#include <QListView>
#include <QPushButton>
#include <QTableView>
#include <QtConcurrent/QtConcurrent>
#include <QTextEdit>
#include <QVBoxLayout>
#include <QtConcurrent/QtConcurrent>
namespace chatterino {
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#include <QTimer>
#include "widgets/settingspages/SettingsPage.hpp"
#include <QTimer>
class QTabWidget;
class QPushButton;
+2 -3
View File
@@ -4,12 +4,11 @@
#include "singletons/Settings.hpp"
#include "singletons/WindowManager.hpp"
#include "util/LayoutCreator.hpp"
#include "widgets/Window.hpp"
#include "widgets/helper/EditableModelView.hpp"
#include <QTableView>
#include "widgets/Window.hpp"
#include <QHeaderView>
#include <QTableView>
namespace chatterino {
+5 -6
View File
@@ -1,16 +1,15 @@
#pragma once
#include <QCheckBox>
#include <QComboBox>
#include <QLineEdit>
#include <QSpinBox>
#include <pajlada/signals/signal.hpp>
#include "singletons/Settings.hpp"
#include <pajlada/signals/signal.hpp>
#include <QCheckBox>
#include <QComboBox>
#include <QLabel>
#include <QLineEdit>
#include <QPainter>
#include <QPushButton>
#include <QSpinBox>
#define SETTINGS_PAGE_WIDGET_BOILERPLATE(type, parent) \
class type : public parent \