changeset 411:02a670a8e1c4

*: fix build fails
author Paper <paper@tflc.us>
date Sat, 25 Jul 2026 14:22:44 -0400
parents eb554255ea5f
children 05aed03e0111
files dep/animone/src/a11y/atspi.cc src/core/strings.cc src/gui/dialog/about.cc src/gui/dialog/licenses.cc src/gui/translate/anime.cc src/services/anilist.cc src/services/kitsu.cc src/services/services.cc src/sys/glib/dark_theme.cc src/sys/x11/settings.cc
diffstat 10 files changed, 36 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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<std::codecvt_utf8<wchar_t>> 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<std::codecvt_utf8<wchar_t>> converter("", L"");
@@ -179,6 +176,16 @@
 	static std::wstring_convert<std::codecvt_utf8_utf16<char32_t>, 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<typename T>
--- 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 <fmt/core.h>
+#include <fmt/format.h>
 #include <toml11/toml.hpp>
 
 #include <QCoreApplication>
--- 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 <fmt/core.h>
+#include <fmt/format.h>
 
 #include <QCoreApplication>
 #include <QFile>
--- 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 <unordered_map>
 
-#include <fmt/core.h>
+#include <fmt/format.h>
 
 namespace Translate {
 
--- 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 <exception>
 #include <string_view>
 
-#include <fmt/core.h>
+#include <fmt/format.h>
 
 #include <iostream>
 
--- 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 <exception>
 #include <string_view>
 
-#include <fmt/core.h>
+#include <fmt/format.h>
 
 #include <iostream>
 
--- 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 <fmt/core.h>
+#include <fmt/format.h>
 
 namespace Services {
 
--- 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 <array>
 #include <cstring>
-#include <gio/gio.h>
 #include <memory>
 #include <string_view>
 
+#ifdef __GNUC__
+/* Shut up */
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+#include <gio/gio.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#endif
+
 namespace glib {
 
 /* deleters */
@@ -22,7 +31,7 @@
 
 template<typename T>
 struct g_malloc_del {
-	void operator()(T *p) const { ::g_free(p); };
+	void operator()(T *p) const { (::g_free)(p); };
 };
 
 template<typename T>
--- 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 <xcb/xcb.h>
 
-#include "fmt/core.h"
+#include "fmt/format.h"
 
 namespace x11 {