Merge branch 'backport-various-to-glib-2-64' into 'glib-2-64'

Backport various patches from master to glib-2-64

See merge request GNOME/glib!1407
This commit is contained in:
Sebastian Dröge 2020-03-09 21:56:37 +00:00
commit 68e18c6ec8
5 changed files with 44 additions and 26 deletions

View File

@ -614,6 +614,8 @@ g_content_type_get_generic_icon_name (const gchar *type)
const gchar *xdg_icon_name;
gchar *icon_name;
g_return_val_if_fail (type != NULL, NULL);
G_LOCK (gio_xdgmime);
xdg_icon_name = xdg_mime_get_generic_icon (type);
G_UNLOCK (gio_xdgmime);

View File

@ -235,7 +235,9 @@ enum
PROP_CONN_SERVER_IDENTITY,
PROP_CONN_USE_SSL3,
PROP_CONN_ACCEPTED_CAS,
PROP_CONN_AUTHENTICATION_MODE
PROP_CONN_AUTHENTICATION_MODE,
PROP_CONN_ADVERTISED_PROTOCOLS,
PROP_CONN_NEGOTIATED_PROTOCOL,
};
static void g_dummy_tls_connection_initable_iface_init (GInitableIface *iface);
@ -301,6 +303,8 @@ g_dummy_tls_connection_class_init (GDummyTlsConnectionClass *connection_class)
g_object_class_override_property (gobject_class, PROP_CONN_USE_SSL3, "use-ssl3");
g_object_class_override_property (gobject_class, PROP_CONN_ACCEPTED_CAS, "accepted-cas");
g_object_class_override_property (gobject_class, PROP_CONN_AUTHENTICATION_MODE, "authentication-mode");
g_object_class_override_property (gobject_class, PROP_CONN_ADVERTISED_PROTOCOLS, "advertised-protocols");
g_object_class_override_property (gobject_class, PROP_CONN_NEGOTIATED_PROTOCOL, "negotiated-protocol");
}
static void

View File

@ -38,6 +38,12 @@ class TestLowMemoryMonitor(dbusmock.DBusTestCase):
klass.dbus_con = klass.get_dbus(True)
def setUp(self):
try:
Gio.MemoryMonitor
except AttributeError:
raise unittest.SkipTest('Low memory monitor not in '
'introspection data. Requires '
'GObject-Introspection ≥ 1.63.2')
try:
(self.p_mock, self.obj_lmm) = self.spawn_server_template(
'low_memory_monitor', {}, stdout=subprocess.PIPE)

View File

@ -40,6 +40,12 @@ class TestLowMemoryMonitorPortal(dbusmock.DBusTestCase):
klass.start_session_bus()
def setUp(self):
try:
Gio.MemoryMonitor
except AttributeError:
raise unittest.SkipTest('Low memory monitor not in '
'introspection data. Requires '
'GObject-Introspection ≥ 1.63.2')
try:
(self.p_mock, self.obj_lmm) = self.spawn_server_template(
'low_memory_monitor', {}, stdout=subprocess.PIPE)

View File

@ -521,7 +521,6 @@ if installed_tests_enabled
)
install_subdir('static-link', install_dir : installed_tests_execdir)
install_data('static-link.py', install_dir : installed_tests_execdir)
endif
memory_monitor_tests = [
'memory-monitor-dbus',
@ -547,6 +546,7 @@ foreach memory_monitor_test : memory_monitor_tests
configuration: cdata,
)
endforeach
endif
if not meson.is_cross_build() or meson.has_exe_wrapper()