[gnome-software/wip/mak/libas] trivial: Don't use deprecated API
- From: Matthias Klumpp <mak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/mak/libas] trivial: Don't use deprecated API
- Date: Sun, 10 Jan 2021 20:34:53 +0000 (UTC)
commit 006d024c70265958f6c3d4a98b8f8648c7ffc07b
Author: Matthias Klumpp <matthias tenstral net>
Date: Sun Jan 10 21:34:43 2021 +0100
trivial: Don't use deprecated API
lib/gs-plugin-loader.c | 4 ++--
plugins/core/gs-appstream.c | 4 ++--
src/gs-update-dialog.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 4c88404f..6178cd8f 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1441,8 +1441,8 @@ gs_plugin_loader_app_sort_prio_cb (GsApp *app1, GsApp *app2, gpointer user_data)
static gint
gs_plugin_loader_app_sort_version_cb (GsApp *app1, GsApp *app2, gpointer user_data)
{
- return as_utils_compare_versions (gs_app_get_version (app1),
- gs_app_get_version (app2));
+ return as_vercmp_simple (gs_app_get_version (app1),
+ gs_app_get_version (app2));
}
/******************************************************************************/
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 6d320c28..107414f9 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -690,8 +690,8 @@ gs_appstream_refine_app (GsPlugin *plugin,
"requires/id[@type='id']"
"[text()='org.gnome.Software.desktop']", NULL);
if (req != NULL) {
- gint rc = as_utils_compare_versions (xb_node_get_attr (req, "version"),
- PACKAGE_VERSION);
+ gint rc = as_vercmp_simple (xb_node_get_attr (req, "version"),
+ PACKAGE_VERSION);
if (rc > 0) {
g_set_error (error,
GS_PLUGIN_ERROR,
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index 8a2ab703..8dc38dcb 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -458,12 +458,12 @@ is_downgrade (const gchar *evr1,
* part of the semantic version */
/* check version */
- rc = as_utils_compare_versions (version1, version2);
+ rc = as_vercmp_simple (version1, version2);
if (rc != 0)
return rc > 0;
/* check release */
- rc = as_utils_compare_versions (release1, release2);
+ rc = as_vercmp_simple (release1, release2);
if (rc != 0)
return rc > 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]