mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
fix build errors on Linux with Clang 20 and GTK warnings (#12507)
* guard -Wno-error=enum-constexpr-conversion behind compiler flag check * Fix: Suppress GTK critical warnings and prevent multiple URI scheme registrations in WebView
This commit is contained in:
@@ -2697,6 +2697,18 @@ bool GUI_App::on_init_inner()
|
||||
g_object_set (gtk_settings_get_default (), "gtk-menu-images", TRUE, NULL);
|
||||
#endif
|
||||
|
||||
#if defined(__WXGTK20__) || defined(__WXGTK3__)
|
||||
// Suppress harmless GTK critical warnings from the GTK3/wxWidgets interaction.
|
||||
// These include widget allocation on hidden widgets and events on unrealized widgets.
|
||||
g_log_set_handler("Gtk", G_LOG_LEVEL_CRITICAL,
|
||||
[](const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) {
|
||||
if (message && (strstr(message, "gtk_widget_set_allocation") ||
|
||||
strstr(message, "WIDGET_REALIZED_FOR_EVENT")))
|
||||
return;
|
||||
g_log_default_handler(log_domain, log_level, message, user_data);
|
||||
}, nullptr);
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
//BBS set crash log folder
|
||||
CBaseException::set_log_folder(data_dir());
|
||||
|
||||
Reference in New Issue
Block a user