mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
schema source: avoid introspection confusion
Any method that has its prefix'd argument as its first parameter will be interpreted by introspection as a method. We don't want this, so we need to swap the first two parameters.
This commit is contained in:
parent
bef773408c
commit
6339b5fe2d
@ -95,8 +95,8 @@ g_settings_schema_source_unref (GSettingsSchemaSource *source)
|
||||
}
|
||||
|
||||
GSettingsSchemaSource *
|
||||
g_settings_schema_source_new_from_directory (GSettingsSchemaSource *parent,
|
||||
const gchar *directory,
|
||||
g_settings_schema_source_new_from_directory (const gchar *directory,
|
||||
GSettingsSchemaSource *parent,
|
||||
gboolean trusted,
|
||||
GError **error)
|
||||
{
|
||||
|
@ -33,8 +33,8 @@ GSettingsSchemaSource * g_settings_schema_source_get_default (void);
|
||||
GSettingsSchemaSource * g_settings_schema_source_ref (GSettingsSchemaSource *source);
|
||||
void g_settings_schema_source_unref (GSettingsSchemaSource *source);
|
||||
|
||||
GSettingsSchemaSource * g_settings_schema_source_new_from_directory (GSettingsSchemaSource *parent,
|
||||
const gchar *directory,
|
||||
GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory,
|
||||
GSettingsSchemaSource *parent,
|
||||
gboolean trusted,
|
||||
GError **error);
|
||||
|
||||
|
@ -1903,12 +1903,12 @@ test_schema_source (void)
|
||||
|
||||
/* make sure it fails properly */
|
||||
parent = g_settings_schema_source_get_default ();
|
||||
source = g_settings_schema_source_new_from_directory (parent, "/path/that/does/not/exist", TRUE, &error);
|
||||
source = g_settings_schema_source_new_from_directory ("/path/that/does/not/exist", parent, TRUE, &error);
|
||||
g_assert (source == NULL);
|
||||
g_clear_error (&error);
|
||||
|
||||
/* create a source with the parent */
|
||||
source = g_settings_schema_source_new_from_directory (parent, "schema-source", TRUE, &error);
|
||||
source = g_settings_schema_source_new_from_directory ("schema-source", parent, TRUE, &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert (source != NULL);
|
||||
|
||||
@ -1949,7 +1949,7 @@ test_schema_source (void)
|
||||
g_settings_schema_source_unref (source);
|
||||
|
||||
/* try again, but with no parent */
|
||||
source = g_settings_schema_source_new_from_directory (NULL, "schema-source", FALSE, NULL);
|
||||
source = g_settings_schema_source_new_from_directory ("schema-source", NULL, FALSE, NULL);
|
||||
g_assert (source != NULL);
|
||||
|
||||
/* should not find it this time, even if recursive... */
|
||||
|
Loading…
Reference in New Issue
Block a user