Commit 008ad39f authored by Diego Escalante Urrelo's avatar Diego Escalante Urrelo 🍄 Committed by Christian Hergert

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.
parent 4e8ff5d3
......@@ -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 = [
......
......@@ -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,
......
......@@ -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++)
{
......
......@@ -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);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment