Commit 4303d743 authored by Martyn Russell's avatar Martyn Russell

all: Remove use of g_type_init() now it's deprecated in GLib since 2.35.x

parent 8dd089b9
......@@ -30,9 +30,6 @@ int main (int argc, char **argv)
const gchar *query_str;
time_t now;
/* Initialize GLib type system */
g_type_init ();
/* Create builder */
builder = <function><link linkend="tracker-sparql-builder-new-update">tracker_sparql_builder_new_update</link></function> ();
......@@ -130,9 +127,6 @@ int main (int argc, const char **argv)
<type><link linkend="TrackerSparqlCursor-struct">TrackerSparqlCursor</link></type> *cursor;
const gchar *query = "SELECT nie:url(?u) WHERE { ?u a nfo:FileDataObject }";
/* Initialize GLib type system */
g_type_init ();
/* As we know only read-only queries will be done, it's enough
* to use a connection with only direct-access setup. The NULL
* represents a possible GCancellable.
......@@ -234,9 +228,6 @@ int main (int argc, const char **argv)
"FILTER (!bound(?tag)) "
"}";
/* Initialize GLib type system */
g_type_init ();
/* Do NOT get a direct connection if you're going to do some write
* operation in the Store. The NULL represents a possible
* GCancellable.
......@@ -330,9 +321,6 @@ int main (int argc, const char **argv)
const gchar *query =
"INSERT { _:foo a nie:InformationElement } WHERE { ?x a rdfs:Class }";
/* Initialize GLib type system */
g_type_init ();
/* Do NOT get a direct connection if you're going to do some write
* operation in the Store. The NULL represents a possible
* GCancellable.
......
......@@ -635,8 +635,6 @@ main (int argc, char *argv[])
FILE *f = NULL;
GFile *dir;
g_type_init ();
/* Translators: this messagge will apper immediately after the */
/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
context = g_option_context_new ("- Generates graphviz for a TTL file");
......
......@@ -61,8 +61,6 @@ main (gint argc, gchar **argv)
FILE *f = NULL;
FILE *fts = NULL;
g_type_init ();
/* Translators: this messagge will apper immediately after the */
/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
context = g_option_context_new ("- Generates HTML doc for a TTL file");
......
......@@ -193,8 +193,6 @@ main (int argc, char *argv[])
TrackerMiner *miner;
GMainLoop *main_loop;
g_type_init ();
main_loop = g_main_loop_new (NULL, FALSE);
miner = tracker_miner_test_new ("test");
......
......@@ -148,8 +148,6 @@ main (gint argc, gchar *argv[])
{
MyData *md;
g_type_init ();
md = g_new0 (MyData, 1);
md->loop = g_main_loop_new (NULL, FALSE);
md->timer = g_timer_new ();
......
......@@ -85,7 +85,6 @@ main (gint argc, gchar *argv[])
GDBusConnection *connection;
guint signal_id;
g_type_init ();
loop = g_main_loop_new (NULL, FALSE);
con = tracker_sparql_connection_get (NULL, &error);
connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
......
......@@ -859,7 +859,6 @@ main (gint argc, gchar *argv[])
gboolean store_available;
main_loop = NULL;
g_type_init ();
setlocale (LC_ALL, "");
......
......@@ -60,8 +60,6 @@ main (int argc, char **argv)
GError *error = NULL;
const gchar *error_message;
g_type_init ();
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
......
......@@ -66,8 +66,6 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
g_type_init ();
/* Translators: this messagge will apper immediately after the */
/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
context = g_option_context_new (_(" - Manage Tracker processes and data"));
......
......@@ -219,8 +219,6 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
gchar *filename;
DviContext *context;
g_type_init ();
metadata = tracker_extract_info_get_metadata_builder (info);
file = tracker_extract_info_get_file (info);
filename = g_file_get_path (file);
......
......@@ -575,8 +575,6 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
gsize len;
struct stat st;
g_type_init ();
metadata = tracker_extract_info_get_metadata_builder (info);
preupdate = tracker_extract_info_get_preupdate_builder (info);
graph = tracker_extract_info_get_graph (info);
......
......@@ -34,8 +34,6 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
gchar *filename;
GError *error = NULL;
g_type_init ();
metadata = tracker_extract_info_get_metadata_builder (info);
file = tracker_extract_info_get_file (info);
xps_file = gxps_file_new (file, &error);
......
......@@ -372,8 +372,6 @@ main (int argc, char *argv[])
initialize_signal_handler ();
g_type_init ();
g_set_application_name ("tracker-extract");
setlocale (LC_ALL, "");
......
......@@ -102,8 +102,6 @@ main (int argc, char **argv)
g_option_context_free (context);
g_type_init ();
connection = tracker_sparql_connection_get (NULL, &error);
if (!connection) {
......
......@@ -376,8 +376,6 @@ main (int argc, char **argv)
g_option_context_free (context);
g_type_init ();
connection = tracker_sparql_connection_get (NULL, &error);
if (!connection) {
......
......@@ -1601,9 +1601,6 @@ main (int argc, char **argv)
disable_snippets = TRUE;
}
g_type_init ();
#if HAVE_TRACKER_FTS
/* Only check stopwords if FTS is enabled */
if (terms) {
......
......@@ -472,8 +472,6 @@ main (int argc, char **argv)
g_option_context_free (context);
g_type_init ();
connection = tracker_sparql_connection_get (NULL, &error);
if (!connection) {
......
......@@ -79,8 +79,6 @@ main (int argc, char **argv)
g_option_context_free (context);
g_type_init ();
connection = tracker_sparql_connection_get (NULL, &error);
if (!connection) {
......
......@@ -931,8 +931,6 @@ main (int argc, char **argv)
g_option_context_free (context);
g_type_init ();
connection = tracker_sparql_connection_get (NULL, &error);
if (!connection) {
......
......@@ -85,8 +85,6 @@ main (int argc,
gchar *log_filename;
guint shutdown_timeout;
g_type_init ();
/* Set up locale */
setlocale (LC_ALL, "");
......
......@@ -220,8 +220,6 @@ main (gint argc, gchar **argv)
{
GTimer *array_t, *update_t;
g_type_init ();
connection = tracker_sparql_connection_get (NULL, NULL);
g_print ("First run (first update then array)\n");
......
......@@ -234,8 +234,6 @@ test_gvdb_corrupted_file ()
gint
main (gint argc, gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/gvdb/ref_unref", test_gvdb_ref_unref);
......
......@@ -36,7 +36,6 @@ test_crc32_calculate ()
gint
main (gint argc, gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-common/crc32/calculate",
......
......@@ -223,7 +223,6 @@ test_date_time_get_local_time ()
gint
main (gint argc, gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-common/date-time/date_to_string",
......
......@@ -288,7 +288,6 @@ main (int argc, char **argv) {
gint result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
/*
......
......@@ -470,7 +470,6 @@ main (int argc, char **argv)
{
int result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
tracker_locale_init ();
......
......@@ -161,7 +161,6 @@ test_albumart_location_path (void)
gint
main (gint argc, gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-common/albumart/stripping",
......
......@@ -53,7 +53,6 @@ test_sched_set_and_get (void)
gint
main (gint argc, gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-common/sched/set_and_get",
......
......@@ -397,7 +397,6 @@ main (int argc, char **argv)
{
gint result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-common/tracker-type-utils/boolean_as_text_to_number",
......
......@@ -137,7 +137,6 @@ main (int argc, char **argv)
{
gboolean ret;
g_type_init ();
g_test_init (&argc, &argv, NULL);
tracker_locale_init ();
......
......@@ -217,8 +217,6 @@ main (int argc, char **argv)
gint result;
gchar *current_dir;
g_type_init ();
g_test_init (&argc, &argv, NULL);
current_dir = g_get_current_dir ();
......
......@@ -365,7 +365,6 @@ main (int argc, char **argv)
gchar *path;
int result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
#ifndef DISABLE_JOURNAL
......
......@@ -312,8 +312,6 @@ main (int argc, char **argv)
gint result;
gchar *data_dir;
g_type_init ();
g_test_init (&argc, &argv, NULL);
data_dir = g_build_filename (g_get_current_dir (), "test-cache", NULL);
......
......@@ -276,8 +276,6 @@ main (int argc, char **argv)
gint i;
gchar *data_dir;
g_type_init ();
g_test_init (&argc, &argv, NULL);
data_dir = g_build_filename (g_get_current_dir (), "test-cache", NULL);
......
......@@ -125,8 +125,6 @@ main (int argc, char **argv)
gint result;
gchar *current_dir;
g_type_init ();
g_test_init (&argc, &argv, NULL);
current_dir = g_get_current_dir ();
......
......@@ -324,8 +324,6 @@ main (int argc, char **argv)
gint i;
gchar *current_dir;
g_type_init ();
g_test_init (&argc, &argv, NULL);
setlocale (LC_COLLATE, "en_US.utf8");
......
......@@ -66,7 +66,6 @@ test_encoding_can_guess (void)
int
main (int argc, char **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
tracker_locale_init ();
......
......@@ -85,7 +85,6 @@ test_exif_parse_empty (void)
int
main (int argc, char **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-extract/exif/parse",
......
......@@ -70,7 +70,6 @@ test_extract_info_empty_objects (void)
int
main (int argc, char **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-extract/extract-info/empty_objects",
......
......@@ -143,7 +143,6 @@ test_guarantee_date (void)
int
main (int argc, char** argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-extract/guarantee/title",
......
......@@ -153,7 +153,6 @@ test_iptc_extraction (void)
int
main (int argc, char **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-extract/iptc/extraction",
......
......@@ -270,7 +270,6 @@ main (int argc, char **argv)
{
gint result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-extract/tracker-utils/guess_date",
......
......@@ -597,7 +597,6 @@ main (int argc,
{
gint result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_message ("Testing XMP");
......
......@@ -181,8 +181,6 @@ main (int argc, char **argv)
gchar *current_dir;
gchar *path;
g_type_init ();
g_test_init (&argc, &argv, NULL);
current_dir = g_get_current_dir ();
......
......@@ -348,7 +348,6 @@ main (int argc, char **argv)
{
gint i;
g_type_init ();
g_test_init (&argc, &argv, NULL);
/* We want the tests to properly find the stopwords dictionaries, so we
......
......@@ -220,8 +220,6 @@ run_parsing (void)
int
main (int argc, char **argv)
{
g_type_init ();
/* Setup locale */
setlocale (LC_ALL, "");
......
......@@ -319,7 +319,6 @@ int
main (int argc,
char **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_message ("Testing filesystem crawler");
......
......@@ -742,7 +742,6 @@ gint
main (gint argc,
gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_message ("Testing file notifier");
......
......@@ -235,7 +235,6 @@ gint
main (gint argc,
gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_message ("Testing file system abstraction");
......
......@@ -947,7 +947,6 @@ gint
main (gint argc,
gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_message ("Testing indexing tree");
......
......@@ -137,7 +137,6 @@ main (int argc,
{
gint result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_message ("Testing miner manager");
......
......@@ -1874,7 +1874,6 @@ gint
main (gint argc,
gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_message ("Testing filesystem monitor");
......
......@@ -105,8 +105,6 @@ main (int argc, char **argv)
const gchar *current_dir;
gint retval;
g_type_init ();
g_test_init (&argc, &argv, NULL);
/* Set test environment up */
......
......@@ -225,7 +225,6 @@ int
main (int argc,
char **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-miner/tracker-priority-queue/emptiness",
......
......@@ -168,7 +168,6 @@ test_task_pool_foreach (void)
gint
main (gint argc, gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/libtracker-miner/tracker-task-pool/limit_set",
......
......@@ -132,7 +132,6 @@ int
main (int argc,
char **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_message ("Testing thumbnailer");
......
......@@ -357,7 +357,6 @@ main (gint argc, gchar **argv)
{
int result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
#if HAVE_TRACKER_FTS
......
......@@ -662,7 +662,6 @@ test_tracker_sparql_update_blank_async (void)
gint
main (gint argc, gchar **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
/* test D-Bus backend */
......
......@@ -529,9 +529,6 @@ check_duplicates (void)
int main (int argc, char **argv)
{
/* Initialize stuff */
g_type_init ();
/* Initialize locale support! */
setlocale (LC_ALL, "");
......
......@@ -82,8 +82,6 @@ main (int argc, char **argv)
TotemPlParserResult result;
GError *error = NULL;
g_type_init ();
context = g_option_context_new ("- Parse a playlist and show info");
g_option_context_add_main_entries (context, entries, NULL);
......
......@@ -163,8 +163,6 @@ main (gint argc, gchar **argv)
TrackerTurtleReader *reader;
GError *error = NULL;
g_type_init ();
/* Translators: this messagge will apper immediately after the */
/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
context = g_option_context_new ("- Validate a turtle file against the ontology");
......
......@@ -276,9 +276,6 @@ main (gint argc, gchar **argv)
GOptionContext *context;
GList *it;
g_type_init ();
/* Translators: this messagge will apper immediately after the */
/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
context = g_option_context_new ("- Validate the ontology consistency");
......
......@@ -146,7 +146,6 @@ main (int argc, char **argv)
{
int result;
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/html_generator/qname/qname_to_shortname",
......
......@@ -50,8 +50,6 @@ main (gint argc, gchar **argv)
gchar *dirname = NULL;
FILE *f = NULL;
g_type_init ();
/* Translators: this messagge will apper immediately after the */
/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
context = g_option_context_new ("- Generates graphviz for a TTL file");
......
......@@ -91,8 +91,6 @@ main (int argc, char **argv)
g_option_context_free (context);
g_type_init ();
if (file) {
gchar *path_in_utf8;
gsize size;
......
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