# HG changeset patch # User Paper # Date 1785003764 14400 # Node ID 02a670a8e1c4c7ed5e6a94ab28afc6b37e51336a # Parent eb554255ea5f0c54b7273f35e8eabd0d316541a5 *: fix build fails diff -r eb554255ea5f -r 02a670a8e1c4 dep/animone/src/a11y/atspi.cc --- a/dep/animone/src/a11y/atspi.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/dep/animone/src/a11y/atspi.cc Sat Jul 25 14:22:44 2026 -0400 @@ -66,7 +66,7 @@ gchar *title = atspi_accessible_get_name(application.get(), NULL); if (title) { web_browser_proc({WebBrowserInformationType::Title, title}); - ::g_free(title); + (::g_free)(title); } // TODO need to find address and tab? idk diff -r eb554255ea5f -r 02a670a8e1c4 src/core/strings.cc --- a/src/core/strings.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/core/strings.cc Sat Jul 25 14:22:44 2026 -0400 @@ -141,6 +141,10 @@ return ToUtf8String(session.config.locale.GetLocale().toLower(ToQString(string))); } +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif std::wstring ToWstring(const std::string &string) { static std::wstring_convert> converter("", L""); @@ -155,13 +159,6 @@ return wstr; } -std::wstring ToWstring(const QString &string) -{ - std::wstring arr(string.size(), L'\0'); - string.toWCharArray(&arr.front()); - return arr; -} - std::string ToUtf8String(const std::wstring &wstring) { static std::wstring_convert> converter("", L""); @@ -179,6 +176,16 @@ static std::wstring_convert, char32_t> converter; return converter.from_bytes(string); } +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + +std::wstring ToWstring(const QString &string) +{ + std::wstring arr(string.size(), L'\0'); + string.toWCharArray(&arr.front()); + return arr; +} std::string ToUtf8String(const QString &string) { @@ -231,9 +238,9 @@ bool ToBool(const std::string &str, bool def) { - std::istringstream s(Strings::ToLower(str)); - s >> std::boolalpha >> def; - return def; + std::string l = Strings::ToLower(str); + + return (l == "true") ? true : (l == "false") ? false : def; } template diff -r eb554255ea5f -r 02a670a8e1c4 src/gui/dialog/about.cc --- a/src/gui/dialog/about.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/gui/dialog/about.cc Sat Jul 25 14:22:44 2026 -0400 @@ -6,7 +6,7 @@ #include "gui/widgets/text.h" #include "utf8proc.h" -#include +#include #include #include diff -r eb554255ea5f -r 02a670a8e1c4 src/gui/dialog/licenses.cc --- a/src/gui/dialog/licenses.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/gui/dialog/licenses.cc Sat Jul 25 14:22:44 2026 -0400 @@ -4,7 +4,7 @@ #include "core/strings.h" #include "gui/widgets/text.h" -#include +#include #include #include diff -r eb554255ea5f -r 02a670a8e1c4 src/gui/translate/anime.cc --- a/src/gui/translate/anime.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/gui/translate/anime.cc Sat Jul 25 14:22:44 2026 -0400 @@ -6,7 +6,7 @@ #include -#include +#include namespace Translate { diff -r eb554255ea5f -r 02a670a8e1c4 src/services/anilist.cc --- a/src/services/anilist.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/services/anilist.cc Sat Jul 25 14:22:44 2026 -0400 @@ -21,7 +21,7 @@ #include #include -#include +#include #include diff -r eb554255ea5f -r 02a670a8e1c4 src/services/kitsu.cc --- a/src/services/kitsu.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/services/kitsu.cc Sat Jul 25 14:22:44 2026 -0400 @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff -r eb554255ea5f -r 02a670a8e1c4 src/services/services.cc --- a/src/services/services.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/services/services.cc Sat Jul 25 14:22:44 2026 -0400 @@ -5,7 +5,7 @@ #include "services/anilist.h" #include "services/kitsu.h" -#include +#include namespace Services { diff -r eb554255ea5f -r 02a670a8e1c4 src/sys/glib/dark_theme.cc --- a/src/sys/glib/dark_theme.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/sys/glib/dark_theme.cc Sat Jul 25 14:22:44 2026 -0400 @@ -3,10 +3,19 @@ #include #include -#include #include #include +#ifdef __GNUC__ +/* Shut up */ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wold-style-cast" +#endif +#include +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + namespace glib { /* deleters */ @@ -22,7 +31,7 @@ template struct g_malloc_del { - void operator()(T *p) const { ::g_free(p); }; + void operator()(T *p) const { (::g_free)(p); }; }; template diff -r eb554255ea5f -r 02a670a8e1c4 src/sys/x11/settings.cc --- a/src/sys/x11/settings.cc Thu Apr 02 01:09:09 2026 -0400 +++ b/src/sys/x11/settings.cc Sat Jul 25 14:22:44 2026 -0400 @@ -13,7 +13,7 @@ #include -#include "fmt/core.h" +#include "fmt/format.h" namespace x11 {