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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
247 changed files with 658 additions and 566 deletions

View file

@ -13,7 +13,7 @@ concurrency:
jobs:
check:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

View file

@ -27,7 +27,28 @@ IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: true
IndentPPDirectives: AfterHash
IncludeBlocks: Preserve
SortIncludes: CaseInsensitive
IncludeBlocks: Regroup
IncludeCategories:
# Project includes
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
Priority: 1
# Third party library includes
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
Priority: 3
# Qt includes
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
Priority: 3
CaseSensitive: true
# LibCommuni includes
- Regex: '^<Irc[a-zA-Z]+>$'
Priority: 3
# Misc libraries
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
Priority: 3
# Standard library includes
- Regex: '^<[a-zA-Z_]+>$'
Priority: 4
NamespaceIndentation: Inner
PointerBindsToType: false
SpacesBeforeTrailingComments: 2

View file

@ -1,7 +1,5 @@
#include "Application.hpp"
#include <atomic>
#include "common/Args.hpp"
#include "common/QLogging.hpp"
#include "common/Version.hpp"
@ -40,11 +38,13 @@
#include "util/PostToThread.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "widgets/Notebook.hpp"
#include "widgets/Window.hpp"
#include "widgets/splits/Split.hpp"
#include "widgets/Window.hpp"
#include <QDesktopServices>
#include <atomic>
namespace chatterino {
static std::atomic<bool> isAppInitialized{false};

View file

@ -1,12 +1,13 @@
#pragma once
#include <QApplication>
#include <memory>
#include "common/SignalVector.hpp"
#include "common/Singleton.hpp"
#include "singletons/NativeMessaging.hpp"
#include <QApplication>
#include <memory>
namespace chatterino {
class TwitchIrcServer;

View file

@ -1,9 +1,9 @@
#include "BaseSettings.hpp"
#include <QDebug>
#include "util/Clamp.hpp"
#include <QDebug>
namespace chatterino {
std::vector<std::weak_ptr<pajlada::Settings::SettingData>> _settings;

View file

@ -3,9 +3,9 @@
#include "common/ChatterinoSetting.hpp"
#include <rapidjson/document.h>
#include <QString>
#include <pajlada/settings/settingdata.hpp>
#include <QString>
#include <rapidjson/document.h>
#include <memory>

View file

@ -1,10 +1,16 @@
#ifdef __cplusplus
# include <irccommand.h>
# include <ircconnection.h>
# include <rapidjson/document.h>
# include <rapidjson/error/en.h>
# include <rapidjson/error/error.h>
# include <boost/current_function.hpp>
# include <boost/foreach.hpp>
# include <boost/noncopyable.hpp>
# include <boost/optional.hpp>
# include <IrcCommand>
# include <IrcConnection>
# include <IrcMessage>
# include <pajlada/serialize.hpp>
# include <pajlada/settings/setting.hpp>
# include <pajlada/settings/settinglistener.hpp>
# include <pajlada/signals/connection.hpp>
# include <pajlada/signals/signal.hpp>
# include <QAbstractListModel>
# include <QAbstractNativeEventFilter>
# include <QAction>
@ -69,9 +75,9 @@
# include <QNetworkReply>
# include <QNetworkRequest>
# include <QObject>
# include <QPaintEvent>
# include <QPainter>
# include <QPainterPath>
# include <QPaintEvent>
# include <QPalette>
# include <QPixmap>
# include <QPoint>
@ -93,20 +99,13 @@
# include <QStyle>
# include <QStyleOption>
# include <QTabWidget>
# include <QtCore/QVariant>
# include <QTextEdit>
# include <QtGlobal>
# include <QThread>
# include <QThreadPool>
# include <QTime>
# include <QTimer>
# include <QUrl>
# include <QUuid>
# include <QVBoxLayout>
# include <QVariant>
# include <QVector>
# include <QWheelEvent>
# include <QWidget>
# include <QtCore/QVariant>
# include <QtGlobal>
# include <QtWidgets/QAction>
# include <QtWidgets/QApplication>
# include <QtWidgets/QButtonGroup>
@ -120,11 +119,18 @@
# include <QtWidgets/QPushButton>
# include <QtWidgets/QTabWidget>
# include <QtWidgets/QVBoxLayout>
# include <QUrl>
# include <QUuid>
# include <QVariant>
# include <QVBoxLayout>
# include <QVector>
# include <QWheelEvent>
# include <QWidget>
# include <rapidjson/document.h>
# include <rapidjson/error/en.h>
# include <rapidjson/error/error.h>
# include <algorithm>
# include <boost/current_function.hpp>
# include <boost/foreach.hpp>
# include <boost/noncopyable.hpp>
# include <boost/optional.hpp>
# include <cassert>
# include <chrono>
# include <cinttypes>
@ -138,11 +144,6 @@
# include <map>
# include <memory>
# include <mutex>
# include <pajlada/serialize.hpp>
# include <pajlada/settings/setting.hpp>
# include <pajlada/settings/settinglistener.hpp>
# include <pajlada/signals/connection.hpp>
# include <pajlada/signals/signal.hpp>
# include <random>
# include <set>
# include <string>

View file

@ -1,13 +1,5 @@
#include "RunGui.hpp"
#include <QApplication>
#include <QFile>
#include <QPalette>
#include <QStyleFactory>
#include <Qt>
#include <QtConcurrent>
#include <csignal>
#include "Application.hpp"
#include "common/Args.hpp"
#include "common/Modes.hpp"
@ -20,6 +12,15 @@
#include "util/CombinePath.hpp"
#include "widgets/dialogs/LastRunCrashDialog.hpp"
#include <QApplication>
#include <QFile>
#include <QPalette>
#include <QStyleFactory>
#include <Qt>
#include <QtConcurrent>
#include <csignal>
#ifdef USEWINSDK
# include "util/WindowsHelper.hpp"
#endif

View file

@ -2,6 +2,7 @@
#include <QHash>
#include <QString>
#include <functional>
#define QStringAlias(name) \

View file

@ -1,9 +1,10 @@
#pragma once
#include <QApplication>
#include <boost/optional.hpp>
#include "common/WindowDescriptors.hpp"
#include <boost/optional.hpp>
#include <QApplication>
namespace chatterino {
/// Command line arguments passed to Chatterino.

View file

@ -1,6 +1,7 @@
#pragma once
#include <boost/noncopyable.hpp>
#include <mutex>
namespace chatterino {

View file

@ -4,11 +4,11 @@
#include "common/FlagsEnum.hpp"
#include "messages/LimitedQueue.hpp"
#include <boost/optional.hpp>
#include <pajlada/signals/signal.hpp>
#include <QDate>
#include <QString>
#include <QTimer>
#include <boost/optional.hpp>
#include <pajlada/signals/signal.hpp>
#include <memory>

View file

@ -1,8 +1,9 @@
#include "common/ChatterSet.hpp"
#include <tuple>
#include "debug/Benchmark.hpp"
#include <tuple>
namespace chatterino {
ChatterSet::ChatterSet()

View file

@ -1,12 +1,14 @@
#pragma once
#include "util/QStringHash.hpp"
#include <lrucache/lrucache.hpp>
#include <QString>
#include <functional>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include "lrucache/lrucache.hpp"
#include "util/QStringHash.hpp"
namespace chatterino {

View file

@ -1,7 +1,7 @@
#pragma once
#include <QString>
#include <pajlada/settings.hpp>
#include <QString>
namespace chatterino {

View file

@ -1,16 +1,17 @@
#pragma once
#include <QString>
#include <QWidget>
#include <boost/optional.hpp>
#include <boost/preprocessor.hpp>
#include <memory>
#include <string>
#include "common/Aliases.hpp"
#include "common/Outcome.hpp"
#include "common/ProviderId.hpp"
#include <boost/optional.hpp>
#include <boost/preprocessor.hpp>
#include <QString>
#include <QWidget>
#include <memory>
#include <string>
namespace chatterino {
enum class HighlightState {

View file

@ -15,6 +15,7 @@
#include "util/QStringHash.hpp"
#include <QtAlgorithms>
#include <utility>
namespace chatterino {

View file

@ -16,8 +16,8 @@
# include "keychain.h"
# endif
#endif
#include <QSaveFile>
#include <boost/variant.hpp>
#include <QSaveFile>
#define FORMAT_NAME \
([&] { \

View file

@ -1,10 +1,10 @@
#pragma once
#include <QString>
#include <functional>
#include <vector>
#include <QString>
class QNetworkReply;
namespace chatterino {

View file

@ -3,6 +3,7 @@
#include "common/NetworkManager.hpp"
#include "common/NetworkResult.hpp"
#include "common/Outcome.hpp"
#include "common/QLogging.hpp"
#include "debug/AssertInGuiThread.hpp"
#include "singletons/Paths.hpp"
#include "util/DebugCount.hpp"
@ -12,7 +13,6 @@
#include <QFile>
#include <QNetworkReply>
#include <QtConcurrent>
#include "common/QLogging.hpp"
namespace chatterino {

View file

@ -6,6 +6,7 @@
#include <QHttpMultiPart>
#include <QNetworkRequest>
#include <QTimer>
#include <functional>
#include <memory>

View file

@ -2,6 +2,7 @@
#include "common/NetworkPrivate.hpp"
#include "common/Outcome.hpp"
#include "common/QLogging.hpp"
#include "common/Version.hpp"
#include "debug/AssertInGuiThread.hpp"
#include "providers/twitch/TwitchCommon.hpp"
@ -12,7 +13,6 @@
#include <QDebug>
#include <QFile>
#include <QtConcurrent>
#include "common/QLogging.hpp"
#include <cassert>

View file

@ -4,6 +4,7 @@
#include "common/NetworkResult.hpp"
#include <QHttpMultiPart>
#include <memory>
namespace chatterino {

View file

@ -1,9 +1,10 @@
#include "common/NetworkResult.hpp"
#include "common/QLogging.hpp"
#include <QJsonDocument>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#include <QJsonDocument>
#include "common/QLogging.hpp"
namespace chatterino {

View file

@ -1,8 +1,8 @@
#pragma once
#include <rapidjson/document.h>
#include <QJsonArray>
#include <QJsonObject>
#include <rapidjson/document.h>
namespace chatterino {

View file

@ -1,12 +1,13 @@
#pragma once
#include <QStandardItemModel>
#include <QTimer>
#include "debug/AssertInGuiThread.hpp"
#include <boost/noncopyable.hpp>
#include <pajlada/signals/signal.hpp>
#include <vector>
#include <QStandardItemModel>
#include <QTimer>
#include "debug/AssertInGuiThread.hpp"
#include <vector>
namespace chatterino {

View file

@ -2,12 +2,11 @@
#include "common/SignalVector.hpp"
#include <boost/optional.hpp>
#include <pajlada/signals/signalholder.hpp>
#include <QAbstractTableModel>
#include <QMimeData>
#include <QStandardItem>
#include <boost/optional.hpp>
#include <pajlada/signals/signalholder.hpp>
namespace chatterino {

View file

@ -8,6 +8,7 @@
#include <optional>
#include <variant>
#include <vector>
namespace chatterino {

View file

@ -1,12 +1,12 @@
#pragma once
#include <QObject>
#include "common/SignalVector.hpp"
#include "common/Singleton.hpp"
#include "providers/twitch/TwitchAccountManager.hpp"
#include "util/SharedPtrElementLess.hpp"
#include <QObject>
namespace chatterino {
class Account;

View file

@ -2,8 +2,8 @@
#include "util/RapidjsonHelpers.hpp"
#include <QString>
#include <pajlada/serialize.hpp>
#include <QString>
namespace chatterino {

View file

@ -5,19 +5,19 @@
#include "common/QLogging.hpp"
#include "common/SignalVector.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/commands/builtin/twitch/ChatSettings.hpp"
#include "controllers/commands/Command.hpp"
#include "controllers/commands/CommandModel.hpp"
#include "controllers/commands/builtin/twitch/ChatSettings.hpp"
#include "controllers/userdata/UserDataController.hpp"
#include "messages/Message.hpp"
#include "messages/MessageBuilder.hpp"
#include "messages/MessageElement.hpp"
#include "providers/irc/IrcChannel2.hpp"
#include "providers/irc/IrcServer.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "providers/twitch/TwitchCommon.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
#include "providers/twitch/TwitchMessageBuilder.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "singletons/Emotes.hpp"
#include "singletons/Paths.hpp"
#include "singletons/Settings.hpp"
@ -29,14 +29,14 @@
#include "util/Helpers.hpp"
#include "util/IncognitoBrowser.hpp"
#include "util/Qt.hpp"
#include "util/StreamLink.hpp"
#include "util/StreamerMode.hpp"
#include "util/StreamLink.hpp"
#include "util/Twitch.hpp"
#include "widgets/Window.hpp"
#include "widgets/dialogs/ReplyThreadPopup.hpp"
#include "widgets/dialogs/UserInfoPopup.hpp"
#include "widgets/splits/Split.hpp"
#include "widgets/splits/SplitContainer.hpp"
#include "widgets/Window.hpp"
#include <QApplication>
#include <QDesktopServices>

View file

@ -7,8 +7,8 @@
#include "controllers/commands/CommandContext.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include <QMap>
#include <pajlada/settings.hpp>
#include <QMap>
#include <memory>
#include <mutex>

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/commands/Command.hpp"
#include <QObject>
namespace chatterino {
class CommandController;

View file

@ -3,8 +3,8 @@
#include "Application.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "util/FormatTime.hpp"
#include "util/Helpers.hpp"

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/filters/FilterRecord.hpp"
#include <QObject>
namespace chatterino {
class FilterModel : public SignalVectorModel<FilterRecordPtr>

View file

@ -1,15 +1,14 @@
#pragma once
#include "util/RapidJsonSerializeQString.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "controllers/filters/parser/FilterParser.hpp"
#include "controllers/filters/parser/Types.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include <pajlada/serialize.hpp>
#include <QRegularExpression>
#include <QString>
#include <QUuid>
#include <pajlada/serialize.hpp>
#include <memory>

View file

@ -1,4 +1,5 @@
#include "controllers/filters/parser/Tokenizer.hpp"
#include "common/QLogging.hpp"
namespace filterparser {

View file

@ -1,11 +1,11 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/highlights/HighlightBadge.hpp"
#include "providers/twitch/TwitchBadges.hpp"
#include <QObject>
namespace chatterino {
class HighlightController;

View file

@ -1,12 +1,12 @@
#pragma once
#include "providers/twitch/TwitchBadge.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include <pajlada/serialize.hpp>
#include <QString>
#include <QUrl>
#include <pajlada/serialize.hpp>
namespace chatterino {
class HighlightBadge

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/highlights/HighlightBlacklistUser.hpp"
#include <QObject>
namespace chatterino {
class HighlightController;

View file

@ -1,11 +1,11 @@
#pragma once
#include "util/RapidJsonSerializeQString.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include <pajlada/serialize.hpp>
#include <QRegularExpression>
#include <QString>
#include <pajlada/serialize.hpp>
#include <memory>

View file

@ -7,9 +7,9 @@
#include "singletons/Paths.hpp"
#include "singletons/Settings.hpp"
#include <boost/optional.hpp>
#include <QColor>
#include <QUrl>
#include <boost/optional.hpp>
#include <functional>
#include <memory>

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/highlights/HighlightPhrase.hpp"
#include <QObject>
namespace chatterino {
class HighlightModel : public SignalVectorModel<HighlightPhrase>

View file

@ -1,14 +1,14 @@
#pragma once
#include "providers/colors/ColorProvider.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include <pajlada/serialize.hpp>
#include <QColor>
#include <QRegularExpression>
#include <QString>
#include <QUrl>
#include <pajlada/serialize.hpp>
#include <memory>

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/highlights/HighlightPhrase.hpp"
#include <QObject>
namespace chatterino {
class HighlightController;

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/ignores/IgnorePhrase.hpp"
#include <QObject>
namespace chatterino {
class IgnoreModel : public SignalVectorModel<IgnorePhrase>

View file

@ -3,13 +3,12 @@
#include "Application.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "singletons/Settings.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include <pajlada/serialize.hpp>
#include <QRegularExpression>
#include <QString>
#include <pajlada/serialize.hpp>
#include <memory>

View file

@ -1,10 +1,11 @@
#include "ModerationAction.hpp"
#include <QRegularExpression>
#include "Application.hpp"
#include "messages/Image.hpp"
#include "singletons/Resources.hpp"
#include <QRegularExpression>
namespace chatterino {
// ModerationAction::ModerationAction(Image *_image, const QString &_action)

View file

@ -1,10 +1,10 @@
#pragma once
#include <QString>
#include "util/RapidjsonHelpers.hpp"
#include <boost/optional.hpp>
#include <pajlada/serialize.hpp>
#include "util/RapidjsonHelpers.hpp"
#include <QString>
#include <memory>

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/moderationactions/ModerationAction.hpp"
#include <QObject>
namespace chatterino {
class ModerationActionModel : public SignalVectorModel<ModerationAction>

View file

@ -1,11 +1,11 @@
#pragma once
#include "controllers/accounts/AccountController.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include <QString>
#include <pajlada/serialize.hpp>
#include <QString>
#include <memory>

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/nicknames/Nickname.hpp"
#include <QObject>
namespace chatterino {
class NicknamesModel : public SignalVectorModel<Nickname>

View file

@ -5,9 +5,9 @@
#include "common/Outcome.hpp"
#include "common/QLogging.hpp"
#include "controllers/notifications/NotificationModel.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
#include "providers/twitch/TwitchMessageBuilder.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "singletons/Toasts.hpp"
#include "singletons/WindowManager.hpp"
#include "util/Helpers.hpp"
@ -21,6 +21,7 @@
#include <QDir>
#include <QMediaPlayer>
#include <QUrl>
#include <unordered_set>
namespace chatterino {

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/notifications/NotificationController.hpp"
#include <QObject>
namespace chatterino {
class NotificationController;

View file

@ -1,10 +1,10 @@
#pragma once
#include <QObject>
#include "common/SignalVectorModel.hpp"
#include "controllers/notifications/NotificationController.hpp"
#include <QObject>
namespace chatterino {
class MutedChannelController;

View file

@ -1,12 +1,12 @@
#pragma once
#include "util/RapidJsonSerializeQString.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include <QColor>
#include <QString>
#include <boost/optional.hpp>
#include <pajlada/serialize.hpp>
#include <QColor>
#include <QString>
namespace chatterino {

View file

@ -3,14 +3,14 @@
#include "common/Singleton.hpp"
#include "controllers/userdata/UserData.hpp"
#include "util/QStringHash.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "util/RapidJsonSerializeQString.hpp"
#include "util/serialize/Container.hpp"
#include <QColor>
#include <QString>
#include <boost/optional.hpp>
#include <pajlada/settings.hpp>
#include <QColor>
#include <QString>
#include <shared_mutex>
#include <unordered_map>

View file

@ -2,6 +2,7 @@
#include <QCoreApplication>
#include <QThread>
#include <cassert>
namespace chatterino {

View file

@ -1,4 +1,5 @@
#include "Benchmark.hpp"
#include "common/QLogging.hpp"
namespace chatterino {

View file

@ -1,8 +1,8 @@
#pragma once
#include <boost/noncopyable.hpp>
#include <QElapsedTimer>
#include <QString>
#include <boost/noncopyable.hpp>
namespace chatterino {

View file

@ -1,22 +1,23 @@
#include <QApplication>
#include <QCommandLineParser>
#include <QMessageBox>
#include <QStringList>
#include <memory>
#include "BrowserExtension.hpp"
#include "RunGui.hpp"
#include "common/Args.hpp"
#include "common/Modes.hpp"
#include "common/QLogging.hpp"
#include "common/Version.hpp"
#include "providers/IvrApi.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "RunGui.hpp"
#include "singletons/Paths.hpp"
#include "singletons/Settings.hpp"
#include "util/AttachToConsole.hpp"
#include "util/IncognitoBrowser.hpp"
#include <QApplication>
#include <QCommandLineParser>
#include <QMessageBox>
#include <QStringList>
#include <memory>
using namespace chatterino;
int main(int argc, char **argv)

View file

@ -5,6 +5,7 @@
#include "messages/ImageSet.hpp"
#include <boost/optional.hpp>
#include <functional>
#include <memory>
#include <unordered_map>

View file

@ -1,27 +1,28 @@
#include "messages/Image.hpp"
#include <QBuffer>
#include <QImageReader>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QTimer>
#include <boost/functional/hash.hpp>
#include <functional>
#include <queue>
#include <thread>
#include "Application.hpp"
#include "common/Common.hpp"
#include "common/NetworkRequest.hpp"
#include "common/QLogging.hpp"
#include "debug/AssertInGuiThread.hpp"
#include "debug/Benchmark.hpp"
#include <boost/functional/hash.hpp>
#include <QBuffer>
#include <QImageReader>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QTimer>
#include <functional>
#include <queue>
#include <thread>
#ifndef CHATTERINO_TEST
# include "singletons/Emotes.hpp"
#endif
#include "singletons/WindowManager.hpp"
#include "singletons/helper/GifTimer.hpp"
#include "singletons/WindowManager.hpp"
#include "util/DebugCount.hpp"
#include "util/PostToThread.hpp"

View file

@ -1,22 +1,23 @@
#pragma once
#include "common/Aliases.hpp"
#include "common/Common.hpp"
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
#include <boost/variant.hpp>
#include <pajlada/signals/signal.hpp>
#include <QPixmap>
#include <QString>
#include <QThread>
#include <QTimer>
#include <QVector>
#include <atomic>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
#include <boost/variant.hpp>
#include <chrono>
#include <map>
#include <memory>
#include <mutex>
#include <pajlada/signals/signal.hpp>
#include "common/Aliases.hpp"
#include "common/Common.hpp"
namespace chatterino {
namespace detail {

View file

@ -5,8 +5,9 @@
#include "util/QStringHash.hpp"
#include "widgets/helper/ScrollbarHighlight.hpp"
#include <QTime>
#include <boost/noncopyable.hpp>
#include <QTime>
#include <cinttypes>
#include <memory>
#include <vector>

View file

@ -3,6 +3,7 @@
#include "messages/MessageElement.hpp"
#include <QRegularExpression>
#include <ctime>
#include <utility>

View file

@ -6,13 +6,14 @@
#include "messages/MessageColor.hpp"
#include "singletons/Fonts.hpp"
#include <boost/noncopyable.hpp>
#include <pajlada/signals/signalholder.hpp>
#include <QRect>
#include <QString>
#include <QTime>
#include <boost/noncopyable.hpp>
#include <cstdint>
#include <memory>
#include <pajlada/signals/signalholder.hpp>
#include <vector>
namespace chatterino {

View file

@ -1,7 +1,6 @@
#include "messages/MessageBuilder.hpp"
#include "common/Aliases.hpp"
#include "common/Outcome.hpp"
#include "messages/MessageBuilder.hpp"
#include "messages/MessageColor.hpp"
#include "providers/twitch/TwitchBadge.hpp"

View file

@ -2,9 +2,9 @@
#include "Application.hpp"
#include "debug/Benchmark.hpp"
#include "messages/layouts/MessageLayoutContainer.hpp"
#include "messages/Message.hpp"
#include "messages/MessageElement.hpp"
#include "messages/layouts/MessageLayoutContainer.hpp"
#include "singletons/Emotes.hpp"
#include "singletons/Settings.hpp"
#include "singletons/Theme.hpp"
@ -15,8 +15,8 @@
#include <QApplication>
#include <QDebug>
#include <QPainter>
#include <QThread>
#include <QtGlobal>
#include <QThread>
#define MARGIN_LEFT (int)(8 * this->scale)
#define MARGIN_RIGHT (int)(8 * this->scale)

View file

@ -3,8 +3,9 @@
#include "common/Common.hpp"
#include "common/FlagsEnum.hpp"
#include <QPixmap>
#include <boost/noncopyable.hpp>
#include <QPixmap>
#include <cinttypes>
#include <memory>

View file

@ -1,10 +1,10 @@
#include "MessageLayoutContainer.hpp"
#include "Application.hpp"
#include "messages/layouts/MessageLayoutElement.hpp"
#include "messages/Message.hpp"
#include "messages/MessageElement.hpp"
#include "messages/Selection.hpp"
#include "messages/layouts/MessageLayoutElement.hpp"
#include "singletons/Fonts.hpp"
#include "singletons/Settings.hpp"
#include "singletons/Theme.hpp"

View file

@ -1,14 +1,15 @@
#pragma once
#include <QPoint>
#include <QRect>
#include <memory>
#include <vector>
#include "common/Common.hpp"
#include "common/FlagsEnum.hpp"
#include "messages/Selection.hpp"
#include "messages/layouts/MessageLayoutElement.hpp"
#include "messages/Selection.hpp"
#include <QPoint>
#include <QRect>
#include <memory>
#include <vector>
class QPainter;

View file

@ -5,12 +5,12 @@
#include "messages/MessageColor.hpp"
#include "messages/MessageElement.hpp"
#include <boost/noncopyable.hpp>
#include <pajlada/signals/signalholder.hpp>
#include <QPen>
#include <QPoint>
#include <QRect>
#include <QString>
#include <boost/noncopyable.hpp>
#include <pajlada/signals/signalholder.hpp>
#include <climits>
#include <cstdint>

View file

@ -1,7 +1,7 @@
#pragma once
#include "QRegularExpression"
#include "messages/search/MessagePredicate.hpp"
#include "QRegularExpression"
namespace chatterino {

View file

@ -1,11 +1,12 @@
#pragma once
#include <QString>
#include <functional>
#include "messages/Image.hpp"
#include "messages/Link.hpp"
#include <QString>
#include <functional>
namespace chatterino {
class LinkResolver

View file

@ -1,8 +1,5 @@
#include "providers/bttv/BttvEmotes.hpp"
#include <QJsonArray>
#include <QThread>
#include "common/Common.hpp"
#include "common/NetworkRequest.hpp"
#include "common/QLogging.hpp"
@ -13,6 +10,9 @@
#include "providers/twitch/TwitchChannel.hpp"
#include "singletons/Settings.hpp"
#include <QJsonArray>
#include <QThread>
namespace chatterino {
namespace {

View file

@ -1,11 +1,12 @@
#pragma once
#include <memory>
#include "boost/optional.hpp"
#include "common/Aliases.hpp"
#include "common/Atomic.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include <memory>
namespace chatterino {
struct Emote;

View file

@ -1,14 +1,15 @@
#include "LoadBttvChannelEmote.hpp"
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
#include <QThread>
#include "common/Common.hpp"
#include "common/NetworkRequest.hpp"
#include "common/UniqueAccess.hpp"
#include "messages/Emote.hpp"
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
#include <QThread>
namespace chatterino {
} // namespace chatterino

View file

@ -1,13 +1,14 @@
#include "ChatterinoBadges.hpp"
#include "common/NetworkRequest.hpp"
#include "common/Outcome.hpp"
#include "messages/Emote.hpp"
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
#include <QThread>
#include <QUrl>
#include "common/NetworkRequest.hpp"
#include "common/Outcome.hpp"
#include "messages/Emote.hpp"
namespace chatterino {
void ChatterinoBadges::initialize(Settings &settings, Paths &paths)

View file

@ -1,13 +1,15 @@
#pragma once
#include "common/Aliases.hpp"
#include "util/QStringHash.hpp"
#include <boost/optional.hpp>
#include <common/Singleton.hpp>
#include <memory>
#include <shared_mutex>
#include <unordered_map>
#include <vector>
#include "common/Aliases.hpp"
#include "util/QStringHash.hpp"
namespace chatterino {

View file

@ -1,10 +1,10 @@
#pragma once
#include <QColor>
#include <memory>
#include <unordered_map>
#include <QColor>
namespace chatterino {
enum class ColorType {

View file

@ -1,16 +1,17 @@
#include "providers/emoji/Emojis.hpp"
#include "Application.hpp"
#include "common/QLogging.hpp"
#include "messages/Emote.hpp"
#include "singletons/Settings.hpp"
#include <boost/variant.hpp>
#include <QFile>
#include <rapidjson/error/en.h>
#include <rapidjson/error/error.h>
#include <rapidjson/rapidjson.h>
#include <QFile>
#include <boost/variant.hpp>
#include <memory>
#include "common/QLogging.hpp"
namespace chatterino {
namespace {

View file

@ -2,9 +2,10 @@
#include "util/ConcurrentMap.hpp"
#include <boost/variant.hpp>
#include <QMap>
#include <QRegularExpression>
#include <boost/variant.hpp>
#include <map>
#include <set>
#include <vector>

View file

@ -1,15 +1,17 @@
#include "FfzBadges.hpp"
#include "common/NetworkRequest.hpp"
#include "common/Outcome.hpp"
#include "messages/Emote.hpp"
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
#include <QThread>
#include <QUrl>
#include <map>
#include <shared_mutex>
#include "common/NetworkRequest.hpp"
#include "common/Outcome.hpp"
#include "messages/Emote.hpp"
namespace chatterino {

View file

@ -4,9 +4,9 @@
#include "common/UniqueAccess.hpp"
#include "util/QStringHash.hpp"
#include <QColor>
#include <boost/optional.hpp>
#include <common/Singleton.hpp>
#include <QColor>
#include <map>
#include <memory>

View file

@ -1,7 +1,5 @@
#include "providers/ffz/FfzEmotes.hpp"
#include <QJsonArray>
#include "common/NetworkRequest.hpp"
#include "common/Outcome.hpp"
#include "common/QLogging.hpp"
@ -11,6 +9,8 @@
#include "providers/twitch/TwitchChannel.hpp"
#include "singletons/Settings.hpp"
#include <QJsonArray>
namespace chatterino {
namespace {

View file

@ -1,11 +1,12 @@
#pragma once
#include <memory>
#include "boost/optional.hpp"
#include "common/Aliases.hpp"
#include "common/Atomic.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include <memory>
namespace chatterino {
struct Emote;

View file

@ -1,15 +1,16 @@
#pragma once
#include <IrcMessage>
#include <functional>
#include <mutex>
#include <pajlada/signals/signal.hpp>
#include <pajlada/signals/signalholder.hpp>
#include "common/Common.hpp"
#include "providers/irc/IrcConnection2.hpp"
#include "util/RatelimitBucket.hpp"
#include <IrcMessage>
#include <pajlada/signals/signal.hpp>
#include <pajlada/signals/signalholder.hpp>
#include <functional>
#include <mutex>
namespace chatterino {
class Channel;

View file

@ -1,6 +1,5 @@
#include "Irc2.hpp"
#include <pajlada/serialize.hpp>
#include "common/Credentials.hpp"
#include "common/SignalVectorModel.hpp"
#include "singletons/Paths.hpp"
@ -8,6 +7,7 @@
#include "util/RapidjsonHelpers.hpp"
#include "util/StandardItemHelper.hpp"
#include <pajlada/serialize.hpp>
#include <QSaveFile>
#include <QtConcurrent>

View file

@ -1,11 +1,11 @@
#pragma once
#include <rapidjson/rapidjson.h>
#include <common/SignalVector.hpp>
#include "common/SignalVector.hpp"
#include "providers/irc/IrcChannel2.hpp"
#include "providers/irc/IrcServer.hpp"
#include <rapidjson/rapidjson.h>
class QAbstractTableModel;
namespace chatterino {

View file

@ -1,8 +1,9 @@
#pragma once
#include <QString>
#include "common/Outcome.hpp"
#include <QString>
namespace chatterino {
class IrcChannel;

View file

@ -2,9 +2,8 @@
#include "util/ExponentialBackoff.hpp"
#include <pajlada/signals/signal.hpp>
#include <IrcConnection>
#include <pajlada/signals/signal.hpp>
#include <QTimer>
namespace chatterino {

View file

@ -1,8 +1,5 @@
#include "IrcServer.hpp"
#include <cassert>
#include <cstdlib>
#include "common/QLogging.hpp"
#include "messages/Message.hpp"
#include "messages/MessageColor.hpp"
@ -17,6 +14,9 @@
#include <QMetaEnum>
#include <cassert>
#include <cstdlib>
namespace chatterino {
IrcServer::IrcServer(const IrcServerData &data)

View file

@ -1,16 +1,17 @@
#pragma once
#include <atomic>
#include <chrono>
#include <pajlada/signals/signal.hpp>
#include <unordered_set>
#include "common/QLogging.hpp"
#include "providers/liveupdates/BasicPubSubWebsocket.hpp"
#include "singletons/Settings.hpp"
#include "util/DebugCount.hpp"
#include "util/Helpers.hpp"
#include <pajlada/signals/signal.hpp>
#include <atomic>
#include <chrono>
#include <unordered_set>
namespace chatterino {
/**

View file

@ -8,9 +8,9 @@
#include "util/DebugCount.hpp"
#include "util/ExponentialBackoff.hpp"
#include <pajlada/signals/signal.hpp>
#include <QJsonObject>
#include <QString>
#include <pajlada/signals/signal.hpp>
#include <websocketpp/client.hpp>
#include <algorithm>

View file

@ -13,6 +13,7 @@
#include <QJsonArray>
#include <QJsonDocument>
#include <QThread>
#include <utility>
/**

View file

@ -4,6 +4,7 @@
#include "providers/seventv/eventapi/SeventvEventAPIMessage.hpp"
#include <QJsonArray>
#include <utility>
namespace chatterino {

View file

@ -1,9 +1,9 @@
#include <utility>
#include "providers/seventv/eventapi/SeventvEventAPIClient.hpp"
#include "providers/twitch/PubSubHelpers.hpp"
#include <utility>
namespace chatterino {
SeventvEventAPIClient::SeventvEventAPIClient(

View file

@ -1,7 +1,7 @@
#include <utility>
#include "providers/seventv/eventapi/SeventvEventAPIDispatch.hpp"
#include <utility>
namespace chatterino {
SeventvEventAPIDispatch::SeventvEventAPIDispatch(QJsonObject obj)

View file

@ -4,7 +4,6 @@
#include <boost/optional.hpp>
#include <magic_enum.hpp>
#include <QJsonDocument>
#include <QJsonObject>
#include <QString>

Some files were not shown because too many files have changed in this diff Show more