diff --git a/lib/twitch-eventsub-ws/include/twitch-eventsub-ws/chrono.hpp b/lib/twitch-eventsub-ws/include/twitch-eventsub-ws/chrono.hpp index 3f5e1344..30d3a6dc 100644 --- a/lib/twitch-eventsub-ws/include/twitch-eventsub-ws/chrono.hpp +++ b/lib/twitch-eventsub-ws/include/twitch-eventsub-ws/chrono.hpp @@ -3,6 +3,11 @@ #include #include +#include + +#if __cpp_lib_chrono < 201907L +# define CHATTERINO_USING_HOWARD_HINNANTS_DATE +#endif namespace chatterino::eventsub::lib { diff --git a/src/util/Expected.hpp b/src/util/Expected.hpp index 71dd11d8..5cd58948 100644 --- a/src/util/Expected.hpp +++ b/src/util/Expected.hpp @@ -5,6 +5,7 @@ #if __cpp_lib_expected >= 202202L # include #else +# define CHATTERINO_USING_NONSTD_EXPECTED # include #endif diff --git a/src/widgets/settingspages/AboutPage.cpp b/src/widgets/settingspages/AboutPage.cpp index b72a377b..2f7fb77b 100644 --- a/src/widgets/settingspages/AboutPage.cpp +++ b/src/widgets/settingspages/AboutPage.cpp @@ -3,10 +3,10 @@ #include "common/Common.hpp" #include "common/QLogging.hpp" #include "common/Version.hpp" +#include "util/Expected.hpp" // IWYU pragma: keep - this is being used to see if we're using the expected_lite library #include "util/LayoutCreator.hpp" #include "util/RemoveScrollAreaBackground.hpp" #include "widgets/BasePopup.hpp" -#include "widgets/buttons/SignalLabel.hpp" #include "widgets/layout/FlowLayout.hpp" #include @@ -17,6 +17,7 @@ #include #include #include +#include // IWYU pragma: keep - this is being used to see if we're using Howard Hinnant's date library namespace chatterino { @@ -127,15 +128,19 @@ AboutPage::AboutPage() addLicense(form.getElement(), "Fluent icons", "https://github.com/microsoft/fluentui-system-icons", ":/licenses/fluenticons.txt"); +#ifdef CHATTERINO_USING_NONSTD_EXPECTED addLicense(form.getElement(), "expected-lite", "https://github.com/martinmoene/expected-lite", ":/licenses/expected-lite.txt"); +#endif addLicense(form.getElement(), "certify", "https://github.com/djarek/certify", ":/licenses/certify.txt"); +#ifdef CHATTERINO_USING_HOWARD_HINNANTS_DATE addLicense(form.getElement(), "Howard Hinnant's date.h", "https://github.com/HowardHinnant/date", ":/licenses/howard-hinnant-date.txt"); +#endif addLicense(form.getElement(), "{fmt}", "https://fmt.dev", ":/licenses/fmtlib.txt"); addLicense(form.getElement(), "Unicode",