Commit 58a14951 authored by Murray Cumming's avatar Murray Cumming
Browse files

Use G_STRFUNC with std::cerr and std::cout.

* *.h/cc: Replace hard-coded copy/pastes of method names with
G_STRFUNC, with the help of regexxer.
parent f731186b
2010-06-21 Murray Cumming <murrayc@murrayc.com>
Use G_STRFUNC with std::cerr and std::cout.
* *.h/cc: Replace hard-coded copy/pastes of method names with
G_STRFUNC, with the help of regexxer.
2010-06-21 Murray Cumming <murrayc@murrayc.com>
 
Adapt use of Gda::ServerOperation.
......
......@@ -742,7 +742,7 @@ void Application::open_browsed_document(const EpcServiceInfo* server, const Glib
document_contents = (gchar*)epc_consumer_lookup(consumer, "document", &length, &error);
if(error)
{
std::cout << "Error when calling epc_consumer_lookup(): " << std::endl << " " << error->message << std::endl;
std::cout << "debug: " << G_STRFUNC << ": " << std::endl << " " << error->message << std::endl;
const int error_code = error->code;
g_clear_error(&error);
......@@ -902,7 +902,7 @@ void Application::new_instance(const Glib::ustring& uri) //Override
&gerror);
if(gerror)
{
std::cerr << "Application::new_instance(): error calling gdk_spawn_command_line_on_screen(): " << gerror->message << std::endl;
std::cerr << G_STRFUNC << ": " << gerror->message << std::endl;
}
}
......@@ -969,7 +969,7 @@ bool Application::check_document_hosting_mode_is_supported(Document* document)
default:
{
//on_document_load() should have checked for this already, informing the user.
std::cerr << "Glom: setup_connection_pool_from_document(): Unhandled hosting mode: " << document->get_hosting_mode() << std::endl;
std::cerr << G_STRFUNC << ": Unhandled hosting mode: " << document->get_hosting_mode() << std::endl;
g_assert_not_reached();
break;
}
......@@ -1163,11 +1163,11 @@ bool Application::on_document_load()
}
else
#endif // !GLOM_ENABLE_CLIENT_ONLY
std::cerr << "Application::on_document_load(): unexpected database_not_found error when opening example." << std::endl;
std::cerr << G_STRFUNC << ": unexpected database_not_found error when opening example." << std::endl;
}
else if(!test)
{
std::cerr << "Application::on_document_load(): unexpected error." << std::endl;
std::cerr << G_STRFUNC << ": unexpected error." << std::endl;
}
}
......@@ -1412,7 +1412,7 @@ bool Application::offer_new_or_existing()
#endif
case Dialog_ExistingOrNew::NONE:
default:
std::cerr << "Application::offer_new_or_existing(): Unhandled action: " << dialog->get_action() << std::endl;
std::cerr << G_STRFUNC << ": Unhandled action: " << dialog->get_action() << std::endl;
g_assert_not_reached();
break;
}
......@@ -1421,7 +1421,7 @@ bool Application::offer_new_or_existing()
Document* document = dynamic_cast<Document*>(get_document());
if(!document)
{
std::cerr << "Application::offer_new_or_existing(): document was NULL." << std::endl;
std::cerr << G_STRFUNC << ": document was NULL." << std::endl;
return false;
}
......@@ -1738,7 +1738,7 @@ void Application::fill_menu_tables()
}
catch(const Glib::Error& ex)
{
std::cerr << " Application::fill_menu_tables(): building menus failed: " << ex.what() << std::endl;
std::cerr << G_STRFUNC << ": building menus failed: " << ex.what() << std::endl;
std::cerr << " The ui_description was: " << ui_description << std::endl;
}
}
......@@ -1823,7 +1823,7 @@ void Application::fill_menu_reports(const Glib::ustring& table_name)
}
catch(const Glib::Error& ex)
{
std::cerr << " Application::fill_menu_reports(): building menus failed: " << ex.what();
std::cerr << G_STRFUNC << ": building menus failed: " << ex.what();
}
}
#endif //GLOM_ENABLE_MAEMO
......@@ -1921,7 +1921,7 @@ void Application::fill_menu_print_layouts(const Glib::ustring& table_name)
}
catch(const Glib::Error& ex)
{
std::cerr << " Application::fill_menu_reports(): building menus failed: " << ex.what();
std::cerr << G_STRFUNC << ": building menus failed: " << ex.what();
}
}
#endif //GLOM_ENABLE_MAEMO
......@@ -2206,7 +2206,7 @@ Glib::ustring Application::ui_file_select_save(const Glib::ustring& old_file_uri
}
catch(const Gio::Error& ex)
{
std::cerr << "Error during Gio::File::make_directory(): " << ex.what() << std::endl;
std::cerr << G_STRFUNC << ": " << ex.what() << std::endl;
}
//Add the filename (Note that the caller will add the extension if necessary, so we don't do it here.)
......
......@@ -247,7 +247,7 @@ void App_WithDoc_Gtk::init_menus_file_recentfiles(const Glib::ustring& path)
}
else
{
//std::cout << "debug: GlomBakery::App_WithDoc_Gtk::init_menus_file_recentfiles(): No recent files sub-menu added, because no MIME types are specified." << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": No recent files sub-menu added, because no MIME types are specified." << std::endl;
}
}
......
......@@ -394,12 +394,12 @@ Glib::RefPtr<Gnome::Gda::Connection> Base_DB::get_connection()
}
catch (const Glib::Error& error)
{
std::cerr << "Base_DB::get_connection(): " << error.what() << std::endl;
std::cerr << G_STRFUNC << ": " << error.what() << std::endl;
}
if(!sharedconnection)
{
std::cerr << "Base_DB::get_connection(): No connection yet." << std::endl;
std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
return Glib::RefPtr<Gnome::Gda::Connection>(0);
}
......@@ -603,7 +603,7 @@ void Base_DB::fill_full_field_details(const Glib::ustring& parent_table_name, sh
{
if(!layout_item)
{
std::cerr << "Base_DB::fill_full_field_details(): layout_item was null." << std::endl;
std::cerr << G_STRFUNC << ": layout_item was null." << std::endl;
}
const Glib::ustring table_name = layout_item->get_table_used(parent_table_name);
......@@ -611,7 +611,7 @@ void Base_DB::fill_full_field_details(const Glib::ustring& parent_table_name, sh
Document* document = get_document();
if(!document)
{
std::cerr << "Base_DB::fill_full_field_details(): document was null." << std::endl;
std::cerr << G_STRFUNC << ": document was null." << std::endl;
}
layout_item->set_full_field_details( get_document()->get_field(table_name, layout_item->get_name()) );
......@@ -692,7 +692,7 @@ sharedptr<Field> Base_DB::get_field_primary_key_for_table(const Glib::ustring& t
{
//TODO_Performance: Cache this result?
Document::type_vec_fields fields = document->get_table_fields(table_name);
//std::cout << "Base_DB::get_field_primary_key_for_table(): table=" << table_name << ", fields count=" << fields.size() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": table=" << table_name << ", fields count=" << fields.size() << std::endl;
for(Document::type_vec_fields::iterator iter = fields.begin(); iter != fields.end(); ++iter)
{
sharedptr<Field> field = *iter;
......@@ -743,7 +743,7 @@ void Base_DB::get_table_fields_to_show_for_sequence_add_group(const Glib::ustrin
}
else
{
std::cerr << "Base_DB::get_table_fields_to_show_for_sequence_add_group(): related field not found: field=" << item->get_layout_display_name() << std::endl;
std::cerr << G_STRFUNC << ": related field not found: field=" << item->get_layout_display_name() << std::endl;
}
}
else //It's a regular field in the table:
......@@ -756,7 +756,7 @@ void Base_DB::get_table_fields_to_show_for_sequence_add_group(const Glib::ustrin
sharedptr<LayoutItem_Field> layout_item = item_field;
layout_item->set_full_field_details(*iterFind); //Fill the LayoutItem with the full field information.
//std::cout << "get_table_fields_to_show_for_sequence_add_group(): name=" << layout_item->get_name() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": name=" << layout_item->get_name() << std::endl;
//Prevent editing of the field if the user may not edit this table:
layout_item->m_priv_view = table_privs.m_view;
......@@ -1082,7 +1082,7 @@ Base_DB::type_map_fields Base_DB::get_record_field_values_for_calculation(const
}
catch(const Glib::Exception& ex)
{
std::cerr << "Base_DB::get_record_field_values_for_calculation(): Exception while executing SQL: " << query << std::endl;
std::cerr << G_STRFUNC << ": Exception while executing SQL: " << query << std::endl;
handle_error(ex);
return field_values;
}
......@@ -1151,13 +1151,13 @@ bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& layoutfield
//row is invalid, and ignored, for Box_Data_Details.
if(!(field_in_record.m_field))
{
std::cerr << "Base_DB::set_field_value_in_database(): field_in_record.m_field is empty." << std::endl;
std::cerr << G_STRFUNC << ": field_in_record.m_field is empty." << std::endl;
return false;
}
if(!(field_in_record.m_key))
{
std::cerr << "Base_DB::set_field_value_in_database(): field_in_record.m_key is empty." << std::endl;
std::cerr << G_STRFUNC << ": field_in_record.m_key is empty." << std::endl;
return false;
}
......@@ -1177,7 +1177,7 @@ bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& layoutfield
const bool test = DbUtils::query_execute(builder); //TODO: Respond to failure.
if(!test)
{
std::cerr << "Box_Data::set_field_value_in_database(): UPDATE failed." << std::endl;
std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
return false; //failed.
}
}
......@@ -1219,13 +1219,13 @@ Gnome::Gda::Value Base_DB::get_field_value_in_database(const LayoutFieldInRecord
//row is invalid, and ignored, for Box_Data_Details.
if(!(field_in_record.m_field))
{
std::cerr << "Base_DB:gset_field_value_in_database(): field_in_record.m_field is empty." << std::endl;
std::cerr << G_STRFUNC << ": field_in_record.m_field is empty." << std::endl;
return result;
}
if(!(field_in_record.m_key))
{
std::cerr << "Base_DB::get_field_value_in_database(): field_in_record.m_key is empty." << std::endl;
std::cerr << G_STRFUNC << ": field_in_record.m_key is empty." << std::endl;
return result;
}
......@@ -1258,13 +1258,13 @@ Gnome::Gda::Value Base_DB::get_field_value_in_database(const sharedptr<Field>& f
//row is invalid, and ignored, for Box_Data_Details.
if(!field)
{
std::cerr << "Base_DB:gset_field_value_in_database(): field is empty." << std::endl;
std::cerr << G_STRFUNC << ": field is empty." << std::endl;
return result;
}
if(found_set.m_where_clause.empty())
{
std::cerr << "Base_DB::get_field_value_in_database(): where_clause is empty." << std::endl;
std::cerr << G_STRFUNC << ": where_clause is empty." << std::endl;
return result;
}
......@@ -1297,7 +1297,7 @@ Gnome::Gda::Value Base_DB::get_field_value_in_database(const sharedptr<Field>& f
void Base_DB::do_calculations(const LayoutFieldInRecord& field_changed, bool first_calc_field)
{
//std::cout << "debug: Base_DB::do_calcualtions(): field_changed=" << field_changed.m_field->get_name() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": field_changed=" << field_changed.m_field->get_name() << std::endl;
if(first_calc_field)
{
......@@ -1451,12 +1451,12 @@ void Base_DB::do_lookups(const LayoutFieldInRecord& field_in_record, const Gtk::
//TODO_performance: There is a LOT of iterating and copying here.
const Glib::ustring strFieldName = field_in_record.m_field->get_name();
const type_list_lookups lookups = get_lookup_fields(field_in_record.m_table_name, strFieldName);
//std::cout << "Base_DB::do_lookups(): lookups size=" << lookups.size() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": lookups size=" << lookups.size() << std::endl;
for(type_list_lookups::const_iterator iter = lookups.begin(); iter != lookups.end(); ++iter)
{
sharedptr<const LayoutItem_Field> layout_item = iter->first;
//std::cout << "Base_DB::do_lookups(): item=" << layout_item->get_name() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": item=" << layout_item->get_name() << std::endl;
sharedptr<const Relationship> relationship = iter->second;
const sharedptr<const Field> field_lookup = layout_item->get_full_field_details();
......@@ -1583,7 +1583,7 @@ bool Base_DB::get_field_value_is_unique(const Glib::ustring& table_name, const s
Glib::RefPtr<const Gnome::Gda::DataModel> data_model = DbUtils::query_execute_select(builder);
if(data_model)
{
//std::cout << "debug: Base_DB::get_field_value_is_unique(): table_name=" << table_name << ", field name=" << field->get_name() << ", value=" << value.to_string() << ", rows count=" << data_model->get_n_rows() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": table_name=" << table_name << ", field name=" << field->get_name() << ", value=" << value.to_string() << ", rows count=" << data_model->get_n_rows() << std::endl;
//The value is unique for this field, if the query returned no existing rows:
result = (data_model->get_n_rows() == 0);
......@@ -1609,7 +1609,7 @@ bool Base_DB::check_entered_value_for_uniqueness(const Glib::ustring& table_name
{
if(!get_field_value_is_unique(table_name, layout_field, field_value))
{
//std::cout << "debug Base_DB::check_entered_value_for_uniqueness(): field=" << layout_field->get_name() << ", value is not unique: " << field_value.to_string() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": field=" << layout_field->get_name() << ", value is not unique: " << field_value.to_string() << std::endl;
//Warn the user and revert the value:
if(parent_window)
......@@ -1763,7 +1763,7 @@ bool Base_DB::get_primary_key_is_in_foundset(const FoundSet& found_set, const Gn
sharedptr<const Field> primary_key = get_field_primary_key_for_table(found_set.m_table_name);
if(!primary_key)
{
std::cerr << "Base_DB::get_primary_key_is_in_foundset(): No primary key found for table: " << found_set.m_table_name << std::endl;
std::cerr << G_STRFUNC << ": No primary key found for table: " << found_set.m_table_name << std::endl;
return false;
}
......@@ -1812,7 +1812,7 @@ int Base_DB::count_rows_returned_by(const Glib::RefPtr<Gnome::Gda::SqlBuilder>&
{
if(!sql_query)
{
std::cerr << "Base_DB::count_rows_returned_by(): sql_query was null." << std::endl;
std::cerr << G_STRFUNC << ": sql_query was null." << std::endl;
return 0;
}
......@@ -1843,7 +1843,7 @@ int Base_DB::count_rows_returned_by(const Glib::RefPtr<Gnome::Gda::SqlBuilder>&
result = value.get_int();
}
//std::cout << "DEBUG: count_rows_returned_by(): Returning " << result << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": Returning " << result << std::endl;
return result;
}
......@@ -1918,7 +1918,7 @@ bool Base_DB::add_user(const Glib::ustring& user, const Glib::ustring& password,
bool test = DbUtils::query_execute_string(strQuery);
if(!test)
{
std::cerr << "Base_DB::add_user(): CREATE USER failed." << std::endl;
std::cerr << G_STRFUNC << ": CREATE USER failed." << std::endl;
return false;
}
......@@ -1927,7 +1927,7 @@ bool Base_DB::add_user(const Glib::ustring& user, const Glib::ustring& password,
test = DbUtils::query_execute_string(strQuery);
if(!test)
{
std::cerr << "Base_DB::add_user(): ALTER GROUP failed." << std::endl;
std::cerr << G_STRFUNC << ": ALTER GROUP failed." << std::endl;
return false;
}
......@@ -1943,7 +1943,7 @@ bool Base_DB::add_user(const Glib::ustring& user, const Glib::ustring& password,
const Glib::ustring strQuery = "REVOKE ALL PRIVILEGES ON \"" + (*iter)->get_name() + "\" FROM \"" + user + "\"";
const bool test = DbUtils::query_execute_string(strQuery);
if(!test)
std::cerr << "Base_DB::add_user(): REVOKE failed." << std::endl;
std::cerr << G_STRFUNC << ": REVOKE failed." << std::endl;
}
return true;
......@@ -1959,7 +1959,7 @@ bool Base_DB::remove_user(const Glib::ustring& user)
const bool test = DbUtils::query_execute_string(strQuery);
if(!test)
{
std::cerr << "Base_DB::remove_user(): DROP USER failed" << std::endl;
std::cerr << G_STRFUNC << ": DROP USER failed" << std::endl;
return false;
}
......@@ -1975,7 +1975,7 @@ bool Base_DB::remove_user_from_group(const Glib::ustring& user, const Glib::ustr
const bool test = DbUtils::query_execute_string(strQuery);
if(!test)
{
std::cerr << "Base_DB::remove_user_from_group(): ALTER GROUP failed." << std::endl;
std::cerr << G_STRFUNC << ": ALTER GROUP failed." << std::endl;
return false;
}
......@@ -1996,7 +1996,7 @@ bool Base_DB::set_database_owner_user(const Glib::ustring& user)
const bool test = DbUtils::query_execute_string(strQuery);
if(!test)
{
std::cerr << "Base_DB::set_database_owner_user(): ALTER DATABASE failed." << std::endl;
std::cerr << G_STRFUNC << ": ALTER DATABASE failed." << std::endl;
return false;
}
......@@ -2020,7 +2020,7 @@ bool Base_DB::disable_user(const Glib::ustring& user)
const bool test = DbUtils::query_execute_string(strQuery);
if(!test)
{
std::cerr << "Base_DB::remove_user(): DROP USER failed" << std::endl;
std::cerr << G_STRFUNC << ": DROP USER failed" << std::endl;
return false;
}
......
......@@ -208,7 +208,7 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
{
const bool test = DbUtils::query_execute(builder);
if(!test)
std::cerr << "Box_Data::record_new(): INSERT failed." << std::endl;
std::cerr << G_STRFUNC << ": INSERT failed." << std::endl;
else
{
Gtk::TreeModel::iterator row = get_row_selected(); //Null and ignored for details views.
......@@ -237,7 +237,7 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
}
}
else
std::cerr << "Base_DB_Table_Data::record_new(): Empty field names or values." << std::endl;
std::cerr << G_STRFUNC << ": Empty field names or values." << std::endl;
return false; //Failed.
}
......@@ -363,7 +363,7 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
const bool test = DbUtils::query_execute(builder);
if(!test)
{
std::cerr << "Base_DB_Table_Data::add_related_record_for_field(): INSERT failed." << std::endl;
std::cerr << G_STRFUNC << ": INSERT failed." << std::endl;
return false;
}
......@@ -380,7 +380,7 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
sharedptr<Field> field_from_key = get_fields_for_table_one_field(relationship->get_from_table(), relationship->get_from_field()); //TODO_Performance.
if(!field_from_key)
{
std::cerr << "Base_DB_Table_Data::add_related_record_for_field(): get_fields_for_table_one_field() failed." << std::endl;
std::cerr << G_STRFUNC << ": get_fields_for_table_one_field() failed." << std::endl;
return false;
}
......@@ -413,7 +413,7 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
const bool test = DbUtils::query_execute(builder);
if(!test)
{
std::cerr << "Base_DB_Table_Data::add_related_record_for_field(): UPDATE failed." << std::endl;
std::cerr << G_STRFUNC << ": UPDATE failed." << std::endl;
return false;
}
}
......@@ -499,12 +499,12 @@ void Base_DB_Table_Data::refresh_related_fields(const LayoutFieldInRecord& field
if(!fieldsToGet.empty())
{
Glib::RefPtr<Gnome::Gda::SqlBuilder> query = Utils::build_sql_select_with_key(field_in_record_changed.m_table_name, fieldsToGet, field_in_record_changed.m_key, field_in_record_changed.m_key_value);
//std::cout << "DEBUG: Base_DB_Table_Data::refresh_related_fields(): query=" << query << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": query=" << query << std::endl;
Glib::RefPtr<const Gnome::Gda::DataModel> result = DbUtils::query_execute_select(query);
if(!result)
{
std::cerr << "Base_DB_Table_Data::refresh_related_fields(): no result." << std::endl;
std::cerr << G_STRFUNC << ": no result." << std::endl;
handle_error();
}
else
......@@ -517,7 +517,7 @@ void Base_DB_Table_Data::refresh_related_fields(const LayoutFieldInRecord& field
const guint cols_count = result->get_n_columns();
if(cols_count <= 0)
{
std::cerr << "Base_DB_Table_Data::refresh_related_fields(): The result had 0 columns" << std::endl;
std::cerr << G_STRFUNC << ": The result had 0 columns" << std::endl;
}
for(guint uiCol = 0; uiCol < cols_count; ++uiCol)
......@@ -525,11 +525,11 @@ void Base_DB_Table_Data::refresh_related_fields(const LayoutFieldInRecord& field
const Gnome::Gda::Value value = result->get_value_at(uiCol, 0 /* row */);
sharedptr<LayoutItem_Field> layout_item = *iterFields;
if(!layout_item)
std::cerr << "Base_DB_Table_Data::refresh_related_fields(): The layout_item was null." << std::endl;
std::cerr << G_STRFUNC << ": The layout_item was null." << std::endl;
else
{
//std::cout << "DEBUG: Box_Data_List::refresh_related_fields(): field_name=" << layout_item->get_name() << std::endl;
//std::cout << " DEBUG: Box_Data_List::refresh_related_fields(): value_as_string=" << value.to_string() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": field_name=" << layout_item->get_name() << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": value_as_string=" << value.to_string() << std::endl;
//m_AddDel.set_value(row, layout_item, value);
set_entered_field_data(row, layout_item, value);
......@@ -540,7 +540,7 @@ void Base_DB_Table_Data::refresh_related_fields(const LayoutFieldInRecord& field
}
}
else
std::cerr << "Base_DB_Table_Data::refresh_related_fields(): no records found." << std::endl;
std::cerr << G_STRFUNC << ": no records found." << std::endl;
}
}
}
......
......@@ -79,7 +79,7 @@ sharedptr<SharedConnection> Dialog_Connection::connect_to_server_with_connection
if(!document)
return result;
//std::cout << "debug: Dialog_Connection::connect_to_server_with_connection_settings(): m_database_name=" << m_database_name << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": m_database_name=" << m_database_name << std::endl;
connection_pool->set_database(m_database_name);
#ifdef GLOM_ENABLE_POSTGRESQL
......
......@@ -270,7 +270,7 @@ Dialog_ExistingOrNew::Dialog_ExistingOrNew(BaseObjectType* cobject, const Glib::
#ifndef GLOM_ENABLE_CLIENT_ONLY
bool Dialog_ExistingOrNew::list_examples_at_path(const std::string& path)
{
//std::cout << "Debug: Dialog_ExistingOrNew::list_examples_at_path(): path=" << path << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": path=" << path << std::endl;
m_examples_dir = Gio::File::create_for_path(path);
......
......@@ -496,7 +496,7 @@ void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const G
}
default:
{
std::cout << "Frame_Glom::on_box_tables_selected(): Unexpected mode" << std::endl;
std::cout << "debug: " << G_STRFUNC << ": Unexpected mode" << std::endl;
strMode = _("Unknown");
break;
}
......@@ -683,7 +683,7 @@ void Frame_Glom::export_data_to_vector(Document::type_example_rows& the_vector,
if(fieldsSequence.empty())
{
std::cerr << "Glom: Frame_Glom::export_data_to_string(): No fields in sequence." << std::endl;
std::cerr << G_STRFUNC << ": No fields in sequence." << std::endl;
return;
}
......@@ -733,7 +733,7 @@ void Frame_Glom::export_data_to_string(Glib::ustring& the_string, const FoundSet
if(fieldsSequence.empty())
{
std::cerr << "Glom: Frame_Glom::export_data_to_string(): No fields in sequence." << std::endl;
std::cerr << G_STRFUNC << ": No fields in sequence." << std::endl;
return;
}
......@@ -785,7 +785,7 @@ void Frame_Glom::export_data_to_stream(std::ostream& the_stream, const FoundSet&
if(fieldsSequence.empty())
{
std::cerr << "Glom: Frame_Glom::export_data_to_stream(): No fields in sequence." << std::endl;
std::cerr << G_STRFUNC << ": No fields in sequence." << std::endl;
return;
}
......@@ -820,7 +820,7 @@ void Frame_Glom::export_data_to_stream(std::ostream& the_stream, const FoundSet&
sharedptr<const Field> field = layout_item->get_full_field_details();
if(!field)
{
std::cerr << "Glom: Frame_Glom::export_data_to_stream(): A field was null." << std::endl;
std::cerr << G_STRFUNC << ": A field was null." << std::endl;
return;
}
......@@ -931,7 +931,7 @@ void Frame_Glom::on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>
{
if(!action)
{
std::cerr << "Frame_Glom::on_menu_file_toggle_share(): action was null." << std::endl;
std::cerr << G_STRFUNC << ": action was null." << std::endl;
}
//Prevent this change if not in developer mode,
......@@ -1038,7 +1038,7 @@ void Frame_Glom::on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>
if(!reowned || !(removed || disabled))
{
std::cerr << "Frame_Glom::on_menu_file_toggle_share(): Failed to reown and remove/revoke default user." << std::endl;
std::cerr << G_STRFUNC << ": Failed to reown and remove/revoke default user." << std::endl;
shared = false;
change = false;
}
......@@ -1307,7 +1307,7 @@ void Frame_Glom::on_dialog_add_related_table_response(int response)
const bool result = DbUtils::create_table_with_default_fields(get_document(), table_name);
if(!result)
{
std::cerr << "Frame_Glom::on_menu_Tables_AddRelatedTable(): create_table_with_default_fields() failed." << std::endl;
std::cerr << G_STRFUNC << ": create_table_with_default_fields() failed." << std::endl;
return;
}
......@@ -1323,7 +1323,7 @@ void Frame_Glom::on_dialog_add_related_table_response(int response)
sharedptr<Field> related_primary_key = get_field_primary_key_for_table(table_name); //This field was created by create_table_with_default_fields().
if(!related_primary_key)
{
std::cerr << "Frame_Glom::on_menu_Tables_AddRelatedTable(): get_field_primary_key_for_table() failed." << std::endl;
std::cerr << G_STRFUNC << ": get_field_primary_key_for_table() failed." << std::endl;
return;
}
......@@ -1465,14 +1465,14 @@ void Frame_Glom::on_button_quickfind()
else
{
const Gnome::Gda::SqlExpr where_clause = Utils::get_find_where_clause_quick(get_document(), m_table_name, Gnome::Gda::Value(criteria));
//std::cout << "Frame_Glom::on_button_quickfind(): where_clause=" << where_clause << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": where_clause=" << where_clause << std::endl;
on_notebook_find_criteria(where_clause);
}
}
void Frame_Glom::on_notebook_find_criteria(const Gnome::Gda::SqlExpr& where_clause)
{
//std::cout << "Frame_Glom::on_notebook_find_criteria(): " << where_clause << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": " << where_clause << std::endl;
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
......@@ -1490,9 +1490,9 @@ void Frame_Glom::on_notebook_find_criteria(const Gnome::Gda::SqlExpr& where_clau
found_set.m_where_clause = where_clause;
records_found = m_Notebook_Data.init_db_details(found_set);
//std::cout << "Frame_Glom::on_notebook_find_criteria(): BEFORE m_Notebook_Data.select_page_for_find_results()" << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": BEFORE m_Notebook_Data.select_page_for_find_results()" << std::endl;
m_Notebook_Data.select_page_for_find_results();
//std::cout << "Frame_Glom::on_notebook_find_criteria(): AFTER m_Notebook_Data.select_page_for_find_results()" << std::endl;
//std::cout << "debug: " << G_STRFUNC << ": AFTER m_Notebook_Data.select_page_for_find_results()" << std::endl;
}
if(!records_found)
......@@ -2209,7 +2209,7 @@ bool Frame_Glom::connection_request_password_and_choose_new_database_name()
}
else
{
std::cout << "Frame_Glom::connection_request_password_and_choose_new_database_name(): unused database name successfully found: " << database_name_possible << std::endl;
std::cout << "debug: " << G_STRFUNC << ": unused database name successfully found: " << database_name_possible << std::endl;
//The connection to the server is OK, but the specified database does not exist.
//That's good - we were looking for an unused database name.
......@@ -2294,7 +2294,7 @@ bool Frame_Glom::handle_request_password_connection_error(bool asked_for_passwor
}
else
{
std::cerr << "Frame_Glom::connection_request_password_and_attempt(): Unexpected exception: " << ex.what() << std::endl;
std::cerr << G_STRFUNC << ": Unexpected exception: " << ex.what() << std::endl;
cleanup_connection();
return false;
}
......
......@@ -31,7 +31,7 @@ namespace Utils
Dialog_ProgressCreating* get_and_show_pulse_dialog(const Glib::ustring& message, Gtk::Window* parent_window)
{
if(!parent_window)
std::cerr << "debug: Glom: get_and_show_pulse_dialog(): parent_window is NULL" << std::endl;
std::cerr << G_STRFUNC << ": parent_window is NULL" << std::endl;
Dialog_ProgressCreating* dialog_progress = 0;
Utils::get_glade_widget_derived_with_warning(dialog_progress);
......
......@@ -107,14 +107,14 @@ const Glib::ustring& CsvParser::get_data(guint row, guint col)