fix: replace defines with constexpr/const and use more absolute paths for includes (#5527)

bye bye nuuls
This commit is contained in:
nerix
2024-08-03 12:00:58 +02:00
committed by GitHub
parent 5ee5abf5b2
commit aed55ac1ba
83 changed files with 386 additions and 380 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#include "Button.hpp"
#include "widgets/helper/Button.hpp"
#include "singletons/Theme.hpp"
#include "util/FunctionEventFilter.hpp"
+2 -4
View File
@@ -68,12 +68,10 @@
#include <functional>
#include <memory>
#define SELECTION_RESUME_SCROLLING_MSG_THRESHOLD 3
#define CHAT_HOVER_PAUSE_DURATION 1000
#define TOOLTIP_EMOTE_ENTRIES_LIMIT 7
namespace {
constexpr size_t TOOLTIP_EMOTE_ENTRIES_LIMIT = 7;
using namespace chatterino;
constexpr int SCROLLBAR_PADDING = 8;
+1 -1
View File
@@ -1,4 +1,4 @@
#include "ComboBoxItemDelegate.hpp"
#include "widgets/helper/ComboBoxItemDelegate.hpp"
#include <QComboBox>
+15 -6
View File
@@ -1,8 +1,17 @@
#pragma once
#define OPEN_IN_BROWSER "Open stream in browser"
#define OPEN_PLAYER_IN_BROWSER "Open player in browser"
#define OPEN_MOD_VIEW_IN_BROWSER "Open mod view in browser"
#define OPEN_IN_STREAMLINK "Open in streamlink"
#define DONT_OPEN "Don't open"
#define OPEN_WHISPERS_IN_BROWSER "Open whispers in browser"
#include <QString>
namespace chatterino {
inline const QString OPEN_IN_BROWSER = QStringLiteral("Open stream in browser");
inline const QString OPEN_PLAYER_IN_BROWSER =
QStringLiteral("Open player in browser");
inline const QString OPEN_MOD_VIEW_IN_BROWSER =
QStringLiteral("Open mod view in browser");
inline const QString OPEN_IN_STREAMLINK = QStringLiteral("Open in streamlink");
inline const QString DONT_OPEN = QStringLiteral("Don't open");
inline const QString OPEN_WHISPERS_IN_BROWSER =
QStringLiteral("Open whispers in browser");
} // namespace chatterino
+1 -1
View File
@@ -1,4 +1,4 @@
#include "EditableModelView.hpp"
#include "widgets/helper/EditableModelView.hpp"
#include "widgets/helper/RegExpItemDelegate.hpp"
#include "widgets/helper/TableStyles.hpp"
-2
View File
@@ -14,8 +14,6 @@
#include <QPainterPath>
#include <QRadialGradient>
#define nuuls nullptr
namespace chatterino {
NotebookButton::NotebookButton(Notebook *parent)
+1 -1
View File
@@ -11,7 +11,7 @@
namespace chatterino {
#define NOTEBOOK_TAB_HEIGHT 28
constexpr int NOTEBOOK_TAB_HEIGHT = 28;
class SplitContainer;
+1 -1
View File
@@ -1,4 +1,4 @@
#include "SearchPopup.hpp"
#include "widgets/helper/SearchPopup.hpp"
#include "Application.hpp"
#include "common/Channel.hpp"
+1 -1
View File
@@ -1,4 +1,4 @@
#include "TitlebarButton.hpp"
#include "widgets/helper/TitlebarButton.hpp"
#include "singletons/Theme.hpp"