[anjuta/sdb-core-trans] symbol-db: misc fixes.
- From: Massimo Cora' <mcora src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/sdb-core-trans] symbol-db: misc fixes.
- Date: Fri, 2 Jul 2010 22:53:17 +0000 (UTC)
commit c241a6233a04826b5217450d592db7b0a20aa18b
Author: Massimo Corà <mcora src gnome org>
Date: Fri Jul 2 23:25:12 2010 +0200
symbol-db: misc fixes.
plugins/symbol-db/symbol-db-engine-core.c | 29 +++++----------------------
plugins/symbol-db/symbol-db-engine-utils.c | 5 +--
2 files changed, 8 insertions(+), 26 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-engine-core.c b/plugins/symbol-db/symbol-db-engine-core.c
index 4be5d0e..6702f47 100644
--- a/plugins/symbol-db/symbol-db-engine-core.c
+++ b/plugins/symbol-db/symbol-db-engine-core.c
@@ -2758,12 +2758,6 @@ gboolean
symbol_db_engine_add_new_workspace (SymbolDBEngine * dbe,
const gchar * workspace_name)
{
-/*
-CREATE TABLE workspace (workspace_id integer PRIMARY KEY AUTOINCREMENT,
- workspace_name varchar (50) not null unique,
- analyse_time DATE
- );
-*/
const GdaSet *plist;
const GdaStatement *stmt;
GdaHolder *param;
@@ -3116,10 +3110,12 @@ sdb_engine_add_new_db_file (SymbolDBEngine * dbe, const gchar * project_name,
{
if (error)
{
- g_warning ("%s [%s]", error->message,
- gda_statement_to_sql_extended ((GdaStatement*)stmt, priv->db_connection,
- (GdaSet*)plist, 0, NULL, NULL));
+ gchar * sql_str = gda_statement_to_sql_extended ((GdaStatement*)stmt,
+ priv->db_connection, (GdaSet*)plist, 0, NULL, NULL);
+
+ g_warning ("%s [%s]", error->message, sql_str);
g_error_free (error);
+ g_free (sql_str);
}
MP_RESET_PLIST(plist);
@@ -3155,7 +3151,6 @@ sdb_engine_get_unique_scan_id (SymbolDBEngine * dbe)
return ret_id;
}
-/* !!!! FIXME: not yet tested !!!! */
gint
symbol_db_engine_add_new_files (SymbolDBEngine *dbe,
IAnjutaLanguage* lang_manager,
@@ -3684,12 +3679,6 @@ static void
sdb_engine_add_new_heritage (SymbolDBEngine * dbe, gint base_symbol_id,
gint derived_symbol_id)
{
-/*
- CREATE TABLE heritage (symbol_id_base integer REFERENCES symbol (symbol_id),
- symbol_id_derived integer REFERENCES symbol (symbol_id),
- PRIMARY KEY (symbol_id_base, symbol_id_derived)
- );
-*/
const GdaSet *plist;
const GdaStatement *stmt;
GdaHolder *param;
@@ -4087,7 +4076,6 @@ sdb_engine_second_pass_update_scope (SymbolDBEngine * dbe)
static void
sdb_engine_second_pass_update_heritage (SymbolDBEngine * dbe)
{
-#if 0
gint i;
SymbolDBEnginePriv *priv;
@@ -4254,7 +4242,6 @@ sdb_engine_second_pass_update_heritage (SymbolDBEngine * dbe)
g_strfreev (inherits_list);
}
-#endif
}
/**
@@ -5279,11 +5266,7 @@ symbol_db_engine_update_project_symbols (SymbolDBEngine *dbe,
/* remove one hour to the db_file_time. */
db_time = mktime (&filetm) - 3600;
-/*
- DEBUG_PRINT ("%s %d ## %d", file_abs_path, db_time,
- g_file_info_get_attribute_uint64 (gfile_info,
- G_FILE_ATTRIBUTE_TIME_MODIFIED));
-*/
+
guint64 modified_time = g_file_info_get_attribute_uint64 (gfile_info,
G_FILE_ATTRIBUTE_TIME_MODIFIED);
if (difftime (db_time, modified_time) < 0 ||
diff --git a/plugins/symbol-db/symbol-db-engine-utils.c b/plugins/symbol-db/symbol-db-engine-utils.c
index 538d149..ff4e6c2 100644
--- a/plugins/symbol-db/symbol-db-engine-utils.c
+++ b/plugins/symbol-db/symbol-db-engine-utils.c
@@ -84,7 +84,6 @@ symbol_db_util_get_file_db_path (SymbolDBEngine *dbe, const gchar* full_local_fi
GPtrArray *
symbol_db_util_get_files_with_zero_symbols (SymbolDBEngine *dbe)
{
- /*select * from file where file_id not in (select file_defined_id from symbol);*/
SymbolDBEnginePriv *priv;
GdaDataModel *data_model;
GPtrArray *files_to_scan;
@@ -93,10 +92,10 @@ symbol_db_util_get_files_with_zero_symbols (SymbolDBEngine *dbe)
g_return_val_if_fail (dbe != NULL, NULL);
priv = dbe->priv;
-
+
if (priv->mutex)
g_mutex_lock (priv->mutex);
-
+
if ((stmt = sdb_engine_get_statement_by_query_id (dbe,
PREP_QUERY_GET_ALL_FROM_FILE_WHERE_NOT_IN_SYMBOLS))
== NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]