summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalev Lember <klember@redhat.com>2016-01-21 14:31:11 +0100
committerKalev Lember <klember@redhat.com>2016-01-21 14:31:11 +0100
commita6c7bf7dc59facde6b21ba1415d57d918a9ae8a4 (patch)
tree82fb1d29c228aaecceeb06306c2bc6773e30e5d2
parentb24b77b028093bef5ebaf1fbdfb6b545f823486d (diff)
downloadappstream-glib-a6c7bf7dc59facde6b21ba1415d57d918a9ae8a4.tar.gz
trivial: Use G_DEFINE_QUARK
-rw-r--r--libappstream-glib/as-app.c9
-rw-r--r--libappstream-glib/as-icon.c9
-rw-r--r--libappstream-glib/as-inf.c9
-rw-r--r--libappstream-glib/as-monitor.c9
-rw-r--r--libappstream-glib/as-node.c9
-rw-r--r--libappstream-glib/as-store.c9
-rw-r--r--libappstream-glib/as-utils.c9
7 files changed, 7 insertions, 56 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index a86902d..5d5b549 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -111,14 +111,7 @@ typedef struct {
*
* Since: 0.1.2
**/
-GQuark
-as_app_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("AsAppError");
- return quark;
-}
+G_DEFINE_QUARK (as-app-error-quark, as_app_error)
/**
* as_app_source_kind_from_string:
diff --git a/libappstream-glib/as-icon.c b/libappstream-glib/as-icon.c
index a23b6ca..0f6530c 100644
--- a/libappstream-glib/as-icon.c
+++ b/libappstream-glib/as-icon.c
@@ -64,14 +64,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (AsIcon, as_icon, G_TYPE_OBJECT)
*
* Since: 0.3.1
**/
-GQuark
-as_icon_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("AsIconError");
- return quark;
-}
+G_DEFINE_QUARK (as-icon-error-quark, as_icon_error)
/**
* as_icon_finalize:
diff --git a/libappstream-glib/as-inf.c b/libappstream-glib/as-inf.c
index 41e2a41..6f493a9 100644
--- a/libappstream-glib/as-inf.c
+++ b/libappstream-glib/as-inf.c
@@ -44,14 +44,7 @@
*
* Since: 0.3.7
**/
-GQuark
-as_inf_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("AsInfError");
- return quark;
-}
+G_DEFINE_QUARK (as-inf-error-quark, as_inf_error)
typedef struct {
GKeyFile *keyfile;
diff --git a/libappstream-glib/as-monitor.c b/libappstream-glib/as-monitor.c
index d7287f7..ba46d5e 100644
--- a/libappstream-glib/as-monitor.c
+++ b/libappstream-glib/as-monitor.c
@@ -64,14 +64,7 @@ static guint signals [SIGNAL_LAST] = { 0 };
*
* Since: 0.4.2
**/
-GQuark
-as_monitor_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("AsMonitorError");
- return quark;
-}
+G_DEFINE_QUARK (as-monitor-error-quark, as_monitor_error)
/**
* as_monitor_finalize:
diff --git a/libappstream-glib/as-node.c b/libappstream-glib/as-node.c
index 32aadfb..0666f8c 100644
--- a/libappstream-glib/as-node.c
+++ b/libappstream-glib/as-node.c
@@ -169,14 +169,7 @@ as_node_unref (AsNode *node)
*
* Since: 0.1.0
**/
-GQuark
-as_node_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("AsNodeError");
- return quark;
-}
+G_DEFINE_QUARK (as-node-error-quark, as_node_error)
/**
* as_node_string_replace:
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
index 9ee5daa..e7508ba 100644
--- a/libappstream-glib/as-store.c
+++ b/libappstream-glib/as-store.c
@@ -95,14 +95,7 @@ static guint signals [SIGNAL_LAST] = { 0 };
*
* Since: 0.1.2
**/
-GQuark
-as_store_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("AsStoreError");
- return quark;
-}
+G_DEFINE_QUARK (as-store-error-quark, as_store_error)
/**
* as_store_finalize:
diff --git a/libappstream-glib/as-utils.c b/libappstream-glib/as-utils.c
index 50b5a54..45a5b5f 100644
--- a/libappstream-glib/as-utils.c
+++ b/libappstream-glib/as-utils.c
@@ -55,14 +55,7 @@
*
* Since: 0.3.7
**/
-GQuark
-as_utils_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("AsUtilsError");
- return quark;
-}
+G_DEFINE_QUARK (as-utils-error-quark, as_utils_error)
/**
* as_markup_strsplit_words: