Commit a0ee62e1 authored by Massimo Cora's avatar Massimo Cora

fixed #567060 – symbol search should ignore case. Added some macros to

	* plugins/symbol-db/plugin.c (goto_file_tag):
	* plugins/symbol-db/symbol-db-engine-core.c
	(sdb_engine_execute_unknown_sql), (sdb_engine_ctags_output_thread),
	(sdb_engine_set_defaults_db_parameters),
	(symbol_db_engine_file_exists), (sdb_engine_get_unique_scan_id),
	(sdb_engine_add_new_symbol), (sdb_engine_update_file),
	(on_scan_update_files_symbols_end),
	(symbol_db_engine_update_project_symbols),
	(symbol_db_engine_remove_file),
	(symbol_db_engine_set_db_case_sensitive):
	* plugins/symbol-db/symbol-db-engine-core.h:
	* plugins/symbol-db/symbol-db-engine-priv.h:
	* plugins/symbol-db/symbol-db-engine-queries.c
	(symbol_db_engine_get_class_parents_by_symbol_id),
	(symbol_db_engine_get_class_parents),
	(symbol_db_engine_get_global_members_filtered),
	(symbol_db_engine_get_scope_members_by_symbol_id_filtered),
	(symbol_db_engine_get_scope_members_by_symbol_id),
	(symbol_db_engine_get_scope_members),
	(symbol_db_engine_get_current_scope),
	(symbol_db_engine_get_file_symbols),
	(symbol_db_engine_get_symbol_info_by_id),
	(symbol_db_engine_find_symbol_by_name_pattern),
	(symbol_db_engine_get_parent_scope_id_by_symbol_id),
	(symbol_db_engine_find_symbol_by_name_pattern_filtered),
	(symbol_db_engine_get_files_for_project),
	(symbol_db_engine_get_languages_count),
	(symbol_db_engine_is_language_used):
	* plugins/symbol-db/symbol-db-engine-queries.h:
	* plugins/symbol-db/symbol-db-view-search.c
	(sdb_view_search_model_filter):
	fixed #567060 – symbol search should ignore case.
	Added some macros to manage mutex_lock ().

svn path=/trunk/; revision=4596
parent ababf213
2009-01-16 Massimo Cora' <mcora@svn.gnome.org>
* plugins/symbol-db/plugin.c (goto_file_tag):
* plugins/symbol-db/symbol-db-engine-core.c
(sdb_engine_execute_unknown_sql), (sdb_engine_ctags_output_thread),
(sdb_engine_set_defaults_db_parameters),
(symbol_db_engine_file_exists), (sdb_engine_get_unique_scan_id),
(sdb_engine_add_new_symbol), (sdb_engine_update_file),
(on_scan_update_files_symbols_end),
(symbol_db_engine_update_project_symbols),
(symbol_db_engine_remove_file),
(symbol_db_engine_set_db_case_sensitive):
* plugins/symbol-db/symbol-db-engine-core.h:
* plugins/symbol-db/symbol-db-engine-priv.h:
* plugins/symbol-db/symbol-db-engine-queries.c
(symbol_db_engine_get_class_parents_by_symbol_id),
(symbol_db_engine_get_class_parents),
(symbol_db_engine_get_global_members_filtered),
(symbol_db_engine_get_scope_members_by_symbol_id_filtered),
(symbol_db_engine_get_scope_members_by_symbol_id),
(symbol_db_engine_get_scope_members),
(symbol_db_engine_get_current_scope),
(symbol_db_engine_get_file_symbols),
(symbol_db_engine_get_symbol_info_by_id),
(symbol_db_engine_find_symbol_by_name_pattern),
(symbol_db_engine_get_parent_scope_id_by_symbol_id),
(symbol_db_engine_find_symbol_by_name_pattern_filtered),
(symbol_db_engine_get_files_for_project),
(symbol_db_engine_get_languages_count),
(symbol_db_engine_is_language_used):
* plugins/symbol-db/symbol-db-engine-queries.h:
* plugins/symbol-db/symbol-db-view-search.c
(sdb_view_search_model_filter):
fixed #567060 – symbol search should ignore case.
Added some macros to manage mutex_lock ().
2008-01-16 Adam Dingle <adam@medovina.org>
reviewed by: Sébastien Granjoux <seb.sfo@free.fr>
......@@ -160,6 +160,7 @@ goto_file_tag (SymbolDBPlugin *sdb_plugin, const gchar *word,
iterator = symbol_db_engine_find_symbol_by_name_pattern (sdb_plugin->sdbe_project,
word,
TRUE,
SYMINFO_SIMPLE |
SYMINFO_KIND |
SYMINFO_FILE_PATH);
......
This diff is collapsed.
......@@ -225,7 +225,12 @@ symbol_db_engine_update_buffer_symbols (SymbolDBEngine * dbe, const gchar * proj
const GPtrArray * text_buffers,
const GPtrArray * buffer_sizes);
/**
* Set the opened db case sensitive. The searches on this db will then be performed
* taking into consideration this SQLite's PRAGMA case_sensitive_like.
*/
void
symbol_db_engine_set_db_case_sensitive (SymbolDBEngine *dbe, gboolean case_sensitive);
G_END_DECLS
......
......@@ -107,6 +107,8 @@
} \
}
#define SDB_LOCK(priv) if (priv->mutex) g_mutex_lock (priv->mutex);
#define SDB_UNLOCK(priv) if (priv->mutex) g_mutex_unlock (priv->mutex);
typedef enum
{
......
......@@ -45,7 +45,9 @@
*/
SymbolDBEngineIterator *
symbol_db_engine_find_symbol_by_name_pattern (SymbolDBEngine *dbe,
const gchar *pattern, SymExtraInfo sym_info);
const gchar *pattern,
gboolean case_sensitive,
SymExtraInfo sym_info);
/**
* @param pattern Pattern you want to search for. If NULL it will use '%' and LIKE for query.
......
......@@ -106,7 +106,7 @@ sdb_view_search_model_filter (SymbolDBViewSearch * search,
pattern = g_strdup_printf ("%%%s%%", string);
iterator = symbol_db_engine_find_symbol_by_name_pattern (priv->sdbe,
pattern, SYMINFO_SIMPLE| SYMINFO_FILE_PATH |
pattern, FALSE, SYMINFO_SIMPLE| SYMINFO_FILE_PATH |
SYMINFO_ACCESS | SYMINFO_KIND);
g_free (pattern);
......
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