mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 05:16:18 +01:00
GVariant: Add g_variant_parse_error_quark()
Most GErrors, such as GSomethingError, have a function to get their quark that looks like g_something_error_quark(), so bindings (such as gtkmm) would expect GVariantParseError to have g_variant_parse_error_quark(). Instead this had g_variant_parser_get_error_quark(). This deprecates the old function and adds the correct one, making life easier for gtkmm (and maybe others). https://bugzilla.gnome.org/show_bug.cgi?id=708212
This commit is contained in:
parent
864d960d75
commit
eeac91f866
@ -3232,6 +3232,7 @@ g_variant_new_parsed_va
|
|||||||
g_variant_new_parsed
|
g_variant_new_parsed
|
||||||
|
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
g_variant_parse_error_quark
|
||||||
g_variant_parser_get_error_quark
|
g_variant_parser_get_error_quark
|
||||||
g_variant_type_checked_
|
g_variant_type_checked_
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
@ -71,7 +71,16 @@
|
|||||||
*
|
*
|
||||||
* Error codes returned by parsing text-format GVariants.
|
* Error codes returned by parsing text-format GVariants.
|
||||||
**/
|
**/
|
||||||
G_DEFINE_QUARK (g-variant-parse-error-quark, g_variant_parser_get_error)
|
G_DEFINE_QUARK (g-variant-parse-error-quark, g_variant_parse_error)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deprecated: Use g_variant_parse_error_quark() instead.
|
||||||
|
*/
|
||||||
|
GQuark
|
||||||
|
g_variant_parser_get_error_quark (void)
|
||||||
|
{
|
||||||
|
return g_variant_parse_error_quark ();
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -323,10 +323,13 @@ typedef enum
|
|||||||
G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT,
|
G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT,
|
||||||
G_VARIANT_PARSE_ERROR_VALUE_EXPECTED
|
G_VARIANT_PARSE_ERROR_VALUE_EXPECTED
|
||||||
} GVariantParseError;
|
} GVariantParseError;
|
||||||
#define G_VARIANT_PARSE_ERROR (g_variant_parser_get_error_quark ())
|
#define G_VARIANT_PARSE_ERROR (g_variant_parse_error_quark ())
|
||||||
|
|
||||||
|
GLIB_DEPRECATED_IN_2_38_FOR(g_variant_parse_error_quark)
|
||||||
|
GQuark g_variant_parser_get_error_quark (void);
|
||||||
|
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
GQuark g_variant_parser_get_error_quark (void);
|
GQuark g_variant_parse_error_quark (void);
|
||||||
|
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
GVariantBuilder * g_variant_builder_new (const GVariantType *type);
|
GVariantBuilder * g_variant_builder_new (const GVariantType *type);
|
||||||
|
Loading…
Reference in New Issue
Block a user