[gnome-builder] libide: fix ide_trace_function warning



commit 008ad39ff142fe8be67208bfbc9f0fbbe8b373b1
Author: Diego Escalante Urrelo <diegoe gnome org>
Date:   Mon Jun 22 18:10:05 2020 +0000

    libide: fix ide_trace_function warning
    
    ide_trace_function was being defined even when IDE_ENABLE_TRACE was
    FALSE, triggering a `no previous declaration` warning.

 meson.build                               | 4 ++--
 src/libide/core/ide-global.c              | 2 ++
 src/libide/projects/ide-recent-projects.c | 4 +---
 src/libide/webkit/ide-webkit-plugin.c     | 5 +++++
 4 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index d5837a116..53320d109 100644
--- a/meson.build
+++ b/meson.build
@@ -251,7 +251,7 @@ message('Linker supports --version-script: @0@'.format(ld_supports_version_scrip
 
 # Commonly used deps
 libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.37.0')
-libglib_dep = dependency('glib-2.0', version: '>= 2.61.2')
+libglib_dep = dependency('glib-2.0', version: '>= 2.65.0')
 libgio_dep = dependency('gio-2.0', version: '>= 2.61.2')
 libgiounix_dep = dependency('gio-unix-2.0')
 libgtk_dep = dependency('gtk+-3.0', version: '>= 3.22.26')
@@ -263,7 +263,7 @@ libpangoft2_dep = dependency('pangoft2', version: '>= 1.38.0')
 libpeas_dep = dependency('libpeas-1.0', version: '>= 1.22.0')
 libtemplate_glib_dep = dependency('template-glib-1.0', version: '>= 3.28.0')
 libvte_dep = dependency('vte-2.91', version: '>= 0.40.2')
-libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.22')
+libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.26')
 libxml2_dep = dependency('libxml-2.0', version: '>= 2.9.0')
 
 check_functions = [
diff --git a/src/libide/core/ide-global.c b/src/libide/core/ide-global.c
index bd47b1432..d32b351fb 100644
--- a/src/libide/core/ide-global.c
+++ b/src/libide/core/ide-global.c
@@ -266,6 +266,7 @@ _ide_trace_shutdown (void)
   memset (&trace_vtable, 0, sizeof trace_vtable);
 }
 
+#ifdef IDE_ENABLE_TRACE
 void
 ide_trace_function (const gchar *strfunc,
                     gint64       begin_time_usec,
@@ -278,6 +279,7 @@ ide_trace_function (const gchar *strfunc,
   if (trace_vtable.function)
     trace_vtable.function (strfunc, begin_time_usec, end_time_usec);
 }
+#endif
 
 void
 _ide_trace_log (GLogLevelFlags  log_level,
diff --git a/src/libide/projects/ide-recent-projects.c b/src/libide/projects/ide-recent-projects.c
index 990dc2ef1..6b44a51db 100644
--- a/src/libide/projects/ide-recent-projects.c
+++ b/src/libide/projects/ide-recent-projects.c
@@ -161,7 +161,6 @@ ide_recent_projects_load_recent (IdeRecentProjects *self)
       const gchar *build_system_name = NULL;
       const gchar *uri = uris[z];
       const gchar *diruri = NULL;
-      time_t modified;
       g_auto(GStrv) groups = NULL;
       gsize len;
 
@@ -187,8 +186,7 @@ ide_recent_projects_load_recent (IdeRecentProjects *self)
 
       name = g_bookmark_file_get_title (projects_file, uri, NULL);
       description = g_bookmark_file_get_description (projects_file, uri, NULL);
-      modified = g_bookmark_file_get_modified  (projects_file, uri, NULL);
-      last_modified_at = g_date_time_new_from_unix_local (modified);
+      last_modified_at = g_bookmark_file_get_modified_date_time (projects_file, uri, NULL);
 
       for (gsize i = 0; i < len; i++)
         {
diff --git a/src/libide/webkit/ide-webkit-plugin.c b/src/libide/webkit/ide-webkit-plugin.c
index 3892af24c..bbc84b7e0 100644
--- a/src/libide/webkit/ide-webkit-plugin.c
+++ b/src/libide/webkit/ide-webkit-plugin.c
@@ -31,6 +31,11 @@ _IDE_EXTERN void _ide_webkit_register_types (PeasObjectModule *module);
 void
 _ide_webkit_register_types (PeasObjectModule *module)
 {
+  WebKitWebContext *context;
+
   g_type_ensure (WEBKIT_TYPE_WEB_VIEW);
   g_irepository_require (NULL, "WebKit2", "4.0", 0, NULL);
+
+  context = webkit_web_context_get_default ();
+  webkit_web_context_set_sandbox_enabled (context, TRUE);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]