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
+10 -11
View File
@@ -1,30 +1,29 @@
#include "AboutPage.hpp"
#include "widgets/settingspages/AboutPage.hpp"
#include "common/Common.hpp"
#include "common/Modes.hpp"
#include "common/QLogging.hpp"
#include "common/Version.hpp"
#include "util/LayoutCreator.hpp"
#include "util/RemoveScrollAreaBackground.hpp"
#include "widgets/BasePopup.hpp"
#include "widgets/helper/SignalLabel.hpp"
#include "widgets/layout/FlowLayout.hpp"
#include <QFile>
#include <QFormLayout>
#include <QGroupBox>
#include <QLabel>
#include <QStringBuilder>
#include <QTextEdit>
#include <QTextStream>
#include <QVBoxLayout>
#define PIXMAP_WIDTH 500
#define LINK_DONATE "https://streamelements.com/fourtf/tip"
#define LINK_CHATTERINO_FEATURES "https://chatterino.com/#features"
namespace chatterino {
constexpr int PIXMAP_WIDTH = 500;
constexpr QStringView LINK_CHATTERINO_FEATURES =
u"https://chatterino.com/#features";
AboutPage::AboutPage()
{
LayoutCreator<AboutPage> layoutCreator(this);
@@ -66,9 +65,9 @@ AboutPage::AboutPage()
auto l = aboutChatterino.emplace<QVBoxLayout>();
// clang-format off
l.emplace<QLabel>("Chatterino Wiki can be found <a href=\"" LINK_CHATTERINO_WIKI "\">here</a>")->setOpenExternalLinks(true);
l.emplace<QLabel>("All about Chatterino's <a href=\"" LINK_CHATTERINO_FEATURES "\">features</a>")->setOpenExternalLinks(true);
l.emplace<QLabel>("Join the official Chatterino <a href=\"" LINK_CHATTERINO_DISCORD "\">Discord</a>")->setOpenExternalLinks(true);
l.emplace<QLabel>("Chatterino Wiki can be found <a href=\"" % LINK_CHATTERINO_WIKI % "\">here</a>")->setOpenExternalLinks(true);
l.emplace<QLabel>("All about Chatterino's <a href=\"" % LINK_CHATTERINO_FEATURES % "\">features</a>")->setOpenExternalLinks(true);
l.emplace<QLabel>("Join the official Chatterino <a href=\"" % LINK_CHATTERINO_DISCORD % "\">Discord</a>")->setOpenExternalLinks(true);
// clang-format on
}