[glom] Fixes for krazy2 warnings: Char literals instead of single-char string literals.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom] Fixes for krazy2 warnings: Char literals instead of single-char string literals.
- Date: Mon, 14 Dec 2009 15:48:33 +0000 (UTC)
commit 832bd569baa0562175274ca071a76315fce88a7e
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Dec 14 16:27:25 2009 +0100
Fixes for krazy2 warnings: Char literals instead of single-char string literals.
glom/application.cc | 2 +-
glom/bakery/app_withdoc.cc | 2 +-
glom/frame_glom.cc | 2 +-
glom/import_csv/dialog_import_csv.cc | 2 +-
glom/libglom/connectionpool.cc | 2 +-
glom/libglom/connectionpool_backends/postgres.cc | 4 +-
glom/libglom/connectionpool_backends/sqlite.cc | 14 +++++-----
.../layout/report_parts/layoutitem_fieldsummary.cc | 2 +-
.../layout/report_parts/layoutitem_groupby.cc | 2 +-
.../data_structure/layout/usesrelationship.cc | 2 +-
glom/libglom/data_structure/translatable_item.cc | 2 +-
glom/libglom/document/bakery/document.cc | 8 +++---
glom/libglom/utils.cc | 28 ++++++++++----------
glom/mode_data/box_data.cc | 2 +-
glom/mode_data/box_data_calendar_related.cc | 2 +-
glom/mode_design/dialog_add_related_table.cc | 2 +-
glom/mode_design/dialog_design.cc | 2 +-
glom/mode_design/iso_codes.cc | 2 +-
.../print_layouts/window_print_layout_edit.cc | 2 +-
.../mode_design/translation/window_translations.cc | 4 +-
glom/mode_find/box_data_details_find.cc | 2 +-
glom/python_embed/glom_python.cc | 2 +-
glom/report_builder.cc | 2 +-
glom/test_pyembed.cc | 2 +-
glom/utility_widgets/datawidget.cc | 2 +-
glom/utils_ui.cc | 2 +-
26 files changed, 50 insertions(+), 50 deletions(-)
---
diff --git a/glom/application.cc b/glom/application.cc
index d935334..eb08b2a 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -859,7 +859,7 @@ void App_Glom::new_instance(const Glib::ustring& uri) //Override
{
Glib::ustring command = "glom";
if(!uri.empty())
- command += " " + uri;
+ command += ' ' + uri;
GError* gerror = 0;
gdk_spawn_command_line_on_screen(Glib::unwrap(get_screen()),
diff --git a/glom/bakery/app_withdoc.cc b/glom/bakery/app_withdoc.cc
index 0930bbc..5833d8e 100644
--- a/glom/bakery/app_withdoc.cc
+++ b/glom/bakery/app_withdoc.cc
@@ -475,7 +475,7 @@ void App_WithDoc::after_successful_save()
Glib::ustring App_WithDoc::get_conf_fullkey(const Glib::ustring& key)
{
- return "/apps/" + m_strAppName + "/" + key;
+ return "/apps/" + m_strAppName + '/' + key;
}
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index d671589..3f05e20 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -759,7 +759,7 @@ void Frame_Glom::export_data_to_string(Glib::ustring& the_string, const FoundSet
//if(layout_item->m_field.get_glom_type() != Field::TYPE_IMAGE) //This is too much data.
//{
if(!row_string.empty())
- row_string += ",";
+ row_string += ',';
//Output data in canonical SQL format, ignoring the user's locale, and ignoring the layout formatting:
row_string += layout_item->get_full_field_details()->to_file_format(value);
diff --git a/glom/import_csv/dialog_import_csv.cc b/glom/import_csv/dialog_import_csv.cc
index 95c83c6..3f9241b 100644
--- a/glom/import_csv/dialog_import_csv.cc
+++ b/glom/import_csv/dialog_import_csv.cc
@@ -52,7 +52,7 @@ Glib::ustring encoding_display(const Glib::ustring& name, const Glib::ustring& c
if(charset.empty())
return name;
else
- return name + " (" + charset + ")";
+ return name + " (" + charset + ')';
}
} //anonymous namespace
diff --git a/glom/libglom/connectionpool.cc b/glom/libglom/connectionpool.cc
index 4a8f5db..949fac9 100644
--- a/glom/libglom/connectionpool.cc
+++ b/glom/libglom/connectionpool.cc
@@ -476,7 +476,7 @@ bool ConnectionPool::handle_error_cerr_only()
if(event && (event->get_event_type() == Gnome::Gda::CONNECTION_EVENT_ERROR))
{
if(!error_details.empty())
- error_details += "\n"; //Add newline after each error.
+ error_details += '\n'; //Add newline after each error.
error_details += (*iter)->get_description();
std::cerr << "Internal error (Database): " << error_details << std::endl;
diff --git a/glom/libglom/connectionpool_backends/postgres.cc b/glom/libglom/connectionpool_backends/postgres.cc
index 1373ee8..34e02ea 100644
--- a/glom/libglom/connectionpool_backends/postgres.cc
+++ b/glom/libglom/connectionpool_backends/postgres.cc
@@ -217,9 +217,9 @@ bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connec
"WHEN " + field_name_old_quoted + " IS NULL THEN false END)";
}
else if(old_field_type == Field::TYPE_TEXT)
- conversion_command = "(" + field_name_old_quoted + " !~~* \'false\')"; // !~~* means ! ILIKE
+ conversion_command = '(' + field_name_old_quoted + " !~~* \'false\')"; // !~~* means ! ILIKE
else // Dates and Times:
- conversion_command = "(" + field_name_old_quoted + " IS NOT NULL)";
+ conversion_command = '(' + field_name_old_quoted + " IS NOT NULL)";
break;
}
diff --git a/glom/libglom/connectionpool_backends/sqlite.cc b/glom/libglom/connectionpool_backends/sqlite.cc
index ab28b57..01df7bc 100644
--- a/glom/libglom/connectionpool_backends/sqlite.cc
+++ b/glom/libglom/connectionpool_backends/sqlite.cc
@@ -216,7 +216,7 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
#endif
if(!trans_fields.empty())
- trans_fields += ",";
+ trans_fields += ',';
const type_mapFieldChanges::const_iterator changed_iter = fields_changed.find(column->column_name);
if(changed_iter != fields_changed.end())
@@ -242,7 +242,7 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
"WHEN " + column->column_name + " != 0 THEN 1 "
"WHEN " + column->column_name + " IS NULL THEN 0 END)";
else if(column->gtype == GDA_TYPE_BLOB || column->gtype == G_TYPE_DATE || column->gtype == GDA_TYPE_TIME)
- trans_fields += "0";
+ trans_fields += '0';
else
trans_fields += Glib::ustring("CAST(") + column->column_name + " AS real)";
break;
@@ -264,13 +264,13 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
if(column->gtype == G_TYPE_BOOLEAN || column->gtype == GDA_TYPE_BLOB || column->gtype == G_TYPE_DOUBLE)
trans_fields += "NULL";
else
- trans_fields += Glib::ustring("date(") + column->column_name + ")";
+ trans_fields += Glib::ustring("date(") + column->column_name + ')';
break;
case Field::TYPE_TIME:
if(column->gtype == G_TYPE_BOOLEAN || column->gtype == GDA_TYPE_BLOB || column->gtype == G_TYPE_DOUBLE)
trans_fields += "NULL";
else
- trans_fields += Glib::ustring("time(") + column->column_name + ")";
+ trans_fields += Glib::ustring("time(") + column->column_name + ')';
break;
case Field::TYPE_IMAGE:
if(column->gtype == GDA_TYPE_BLOB)
@@ -305,7 +305,7 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
if(!add_column_to_server_operation(operation, field, i++, error))
return false;
if(!trans_fields.empty())
- trans_fields += ",";
+ trans_fields += ',';
Gnome::Gda::Value default_value = field->get_default_value();
if(default_value.get_value_type() != G_TYPE_NONE && !default_value.is_null())
trans_fields += field->sql(default_value, connection);
@@ -314,10 +314,10 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
switch(field->get_glom_type())
{
case Field::TYPE_NUMERIC:
- trans_fields += "0";
+ trans_fields += '0';
break;
case Field::TYPE_BOOLEAN:
- trans_fields += "0";
+ trans_fields += '0';
break;
case Field::TYPE_TEXT:
trans_fields += "''";
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.cc b/glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.cc
index 3523d5f..741efdc 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.cc
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.cc
@@ -125,7 +125,7 @@ Glib::ustring LayoutItem_FieldSummary::get_layout_display_name() const
if(m_summary_type == TYPE_INVALID)
result = _("No summary chosen");
else
- result = get_summary_type_name(m_summary_type) + "(" + result + ")";
+ result = get_summary_type_name(m_summary_type) + '(' + result + ')';
return result;
}
diff --git a/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.cc b/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.cc
index 01f80c6..6d1adfc 100644
--- a/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.cc
+++ b/glom/libglom/data_structure/layout/report_parts/layoutitem_groupby.cc
@@ -135,7 +135,7 @@ Glib::ustring LayoutItem_GroupBy::get_layout_display_name() const
sort_fields_names += iter->first->get_layout_display_name();
}
- result += sort_fields_names + ")";
+ result += sort_fields_names + ')';
}
return result;
diff --git a/glom/libglom/data_structure/layout/usesrelationship.cc b/glom/libglom/data_structure/layout/usesrelationship.cc
index f62a4cc..069079a 100644
--- a/glom/libglom/data_structure/layout/usesrelationship.cc
+++ b/glom/libglom/data_structure/layout/usesrelationship.cc
@@ -211,7 +211,7 @@ Glib::ustring UsesRelationship::get_sql_join_alias_name() const
if(get_has_related_relationship_name() && m_related_relationship->get_has_fields())
{
- result += ("_" + m_related_relationship->get_name());
+ result += ('_' + m_related_relationship->get_name());
}
}
diff --git a/glom/libglom/data_structure/translatable_item.cc b/glom/libglom/data_structure/translatable_item.cc
index 1f82981..7fe1bf9 100644
--- a/glom/libglom/data_structure/translatable_item.cc
+++ b/glom/libglom/data_structure/translatable_item.cc
@@ -211,7 +211,7 @@ Glib::ustring TranslatableItem::get_current_locale()
m_current_locale = Utils::locale_simplify(cLocale);
}
else
- m_current_locale = "C";
+ m_current_locale = 'C';
}
return m_current_locale;
diff --git a/glom/libglom/document/bakery/document.cc b/glom/libglom/document/bakery/document.cc
index f920f11..3a609ca 100644
--- a/glom/libglom/document/bakery/document.cc
+++ b/glom/libglom/document/bakery/document.cc
@@ -54,7 +54,7 @@ Glib::ustring Document::get_file_uri_with_extension(const Glib::ustring& uri)
if(!m_file_extension.empty()) //If there is an extension to enforce.
{
bool bAddExt = false;
- Glib::ustring strExt = "." + get_file_extension();
+ const Glib::ustring strExt = '.' + get_file_extension();
if(result.size() < strExt.size()) //It can't have the ext already if it's not long enough.
{
@@ -62,7 +62,7 @@ Glib::ustring Document::get_file_uri_with_extension(const Glib::ustring& uri)
}
else
{
- Glib::ustring strEnd = result.substr(result.size() - strExt.size());
+ const Glib::ustring strEnd = result.substr(result.size() - strExt.size());
if(strEnd != strExt) //If it doesn't already have the extension
bAddExt = true;
}
@@ -353,11 +353,11 @@ Glib::ustring Document::util_file_uri_get_name(const Glib::ustring& file_uri, co
//TODO: Maybe filename_display_basename() should do this.
if(!strResult.empty() && !file_extension.empty())
{
- const Glib::ustring strExt = "." + file_extension;
+ const Glib::ustring strExt = '.' + file_extension;
if(strResult.size() >= file_extension.size()) //It can't have the ext already if it's not long enough.
{
- Glib::ustring strEnd = strResult.substr(strResult.size() - strExt.size());
+ const Glib::ustring strEnd = strResult.substr(strResult.size() - strExt.size());
if(strEnd == strExt) //If it has the extension
{
strResult = strResult.substr(0, strResult.size() - strExt.size());
diff --git a/glom/libglom/utils.cc b/glom/libglom/utils.cc
index da80edf..1329b8a 100644
--- a/glom/libglom/utils.cc
+++ b/glom/libglom/utils.cc
@@ -276,13 +276,13 @@ Glib::ustring Utils::build_sql_select_fields_to_get(const Glib::ustring& table_n
//Add, for instance, "SUM(":
if(is_summary)
- one_sql_part += fieldsummary->get_summary_type_sql() + "(";
+ one_sql_part += fieldsummary->get_summary_type_sql() + '(';
one_sql_part += layout_item->get_sql_name(table_name);
//Close the summary bracket if necessary.
if(is_summary)
- one_sql_part += ")";
+ one_sql_part += ')';
//Append it to the big string of fields:
if(!one_sql_part.empty())
@@ -335,16 +335,16 @@ Glib::ustring Utils::build_sql_select_with_where_clause(const Glib::ustring& tab
//Build the whole SQL statement:
Glib::ustring result =
"SELECT " + sql_part_fields +
- " FROM \"" + table_name + "\"";
+ " FROM \"" + table_name + '\"';
if(!sql_part_from.empty())
- result += ("," + sql_part_from);
+ result += (',' + sql_part_from);
if(!extra_join.empty())
- sql_part_leftouterjoin += (" " + extra_join + " ");
+ sql_part_leftouterjoin += (' ' + extra_join + ' ');
if(!sql_part_leftouterjoin.empty())
- result += (" " + sql_part_leftouterjoin);
+ result += (' ' + sql_part_leftouterjoin);
//Add the WHERE clause:
@@ -354,7 +354,7 @@ Glib::ustring Utils::build_sql_select_with_where_clause(const Glib::ustring& tab
//Extra GROUP_BY clause for doubly-related records. This must be before the ORDER BY sort clause:
if(!extra_group_by.empty())
{
- result += (" " + extra_group_by + " ");
+ result += (' ' + extra_group_by + ' ');
}
//Sort clause:
@@ -402,7 +402,7 @@ Glib::ustring Utils::build_sql_select_with_key(const Glib::ustring& table_name,
if(!Conversions::value_is_empty(key_value)) //If there is a record to show:
{
//TODO: Use a SQL parameter instead of using sql():
- const Glib::ustring where_clause = "\"" + table_name + "\".\"" + key_field->get_name() + "\" = " + key_field->sql(key_value);
+ const Glib::ustring where_clause = '\"' + table_name + "\".\"" + key_field->get_name() + "\" = " + key_field->sql(key_value);
return Utils::build_sql_select_with_where_clause(table_name, fieldsToGet, where_clause);
}
@@ -430,14 +430,14 @@ Utils::type_list_values_with_second Utils::get_choice_values(const sharedptr<con
}
const bool with_second = !choice_second.empty();
- const Glib::ustring sql_second = "\"" + to_table + "\".\"" + choice_second + "\"";
+ const Glib::ustring sql_second = "\"" + to_table + "\".\"" + choice_second + '\"';
//Get possible values from database, sorted by the first column.
- Glib::ustring sql_query = "SELECT \"" + to_table + "\".\"" + choice_field + "\"";
+ Glib::ustring sql_query = "SELECT \"" + to_table + "\".\"" + choice_field + '\"';
if(with_second)
sql_query += ", " + sql_second;
- sql_query += " FROM \"" + choice_relationship->get_to_table() + "\" ORDER BY \"" + to_table + "\".\"" + choice_field + "\"";
+ sql_query += " FROM \"" + choice_relationship->get_to_table() + "\" ORDER BY \"" + to_table + "\".\"" + choice_field + '\"';
//std::cout << "debug: get_choice_values(): query: " << sql_query << std::endl;
//Connect to database:
@@ -522,14 +522,14 @@ Glib::ustring Utils::locale_simplify(const Glib::ustring& locale_id)
Glib::ustring result = locale_id;
//Get everything before the .:
- Glib::ustring::size_type posDot = locale_id.find(".");
+ Glib::ustring::size_type posDot = locale_id.find('.');
if(posDot != Glib::ustring::npos)
{
result = result.substr(0, posDot);
}
//Get everything before the @:
- const Glib::ustring::size_type posAt = locale_id.find("@");
+ const Glib::ustring::size_type posAt = locale_id.find('@');
if(posAt != Glib::ustring::npos)
{
result = result.substr(0, posAt);
@@ -542,7 +542,7 @@ Glib::ustring Utils::locale_language_id(const Glib::ustring& locale_id)
{
Glib::ustring result;
- const Glib::ustring::size_type posUnderscore = locale_id.find("_");
+ const Glib::ustring::size_type posUnderscore = locale_id.find('_');
if(posUnderscore != Glib::ustring::npos)
{
result = locale_id.substr(0, posUnderscore);
diff --git a/glom/mode_data/box_data.cc b/glom/mode_data/box_data.cc
index d9cdb73..b05962f 100644
--- a/glom/mode_data/box_data.cc
+++ b/glom/mode_data/box_data.cc
@@ -119,7 +119,7 @@ Glib::ustring Box_Data::get_find_where_clause() const
if(!strClause.empty())
strClause += "AND ";
- strClause += "(" + strClausePart + ") ";
+ strClause += '(' + strClausePart + ") ";
}
}
diff --git a/glom/mode_data/box_data_calendar_related.cc b/glom/mode_data/box_data_calendar_related.cc
index 00b8614..bf919c8 100644
--- a/glom/mode_data/box_data_calendar_related.cc
+++ b/glom/mode_data/box_data_calendar_related.cc
@@ -475,7 +475,7 @@ Glib::ustring Box_Data_Calendar_Related::on_calendar_details(guint year, guint m
if(!row_text.empty())
{
if(!result.empty())
- result += "\n";
+ result += '\n';
result += row_text;
}
diff --git a/glom/mode_design/dialog_add_related_table.cc b/glom/mode_design/dialog_add_related_table.cc
index c65ae9e..8b49253 100644
--- a/glom/mode_design/dialog_add_related_table.cc
+++ b/glom/mode_design/dialog_add_related_table.cc
@@ -123,7 +123,7 @@ void Dialog_AddRelatedTable::on_combo_field_name()
possible_table_name = Utils::string_remove_suffix(possible_table_name, "_id", false /* not case sensitive */);
//Add a "s" to the end, though this probably only makes sense in English. TODO: Don't do this?
- possible_table_name += "s";
+ possible_table_name += 's';
//Discover whether a table with this name exists already,
//and append a numerical prefix until we find one that doesn't exist:
diff --git a/glom/mode_design/dialog_design.cc b/glom/mode_design/dialog_design.cc
index e6cadf1..e1fda76 100644
--- a/glom/mode_design/dialog_design.cc
+++ b/glom/mode_design/dialog_design.cc
@@ -61,7 +61,7 @@ bool Dialog_Design::init_db_details(const Glib::ustring& table_name)
if(table_title.empty())
table_label = table_name;
else
- table_label = table_title + " (" + table_name + ")";
+ table_label = table_title + " (" + table_name + ')';
}
m_label_table->set_text(table_label);
diff --git a/glom/mode_design/iso_codes.cc b/glom/mode_design/iso_codes.cc
index 8353016..621d735 100644
--- a/glom/mode_design/iso_codes.cc
+++ b/glom/mode_design/iso_codes.cc
@@ -264,7 +264,7 @@ Glib::ustring get_locale_name(const Glib::ustring& locale_id)
{
type_map_country::iterator iterFindCountry = map_country.find(id_country);
if(iterFindCountry != map_country.end())
- name += " (" + iterFindCountry->second + ")";
+ name += " (" + iterFindCountry->second + ')';
else
name = Glib::ustring(); //Ignore locales with unnamed countries.
}
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index f229d63..92d8e98 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -497,7 +497,7 @@ bool Window_PrintLayout_Edit::init_db_details(const Glib::ustring& table_name)
if(table_title.empty())
table_label = table_name;
else
- table_label = table_title + " (" + table_name + ")";
+ table_label = table_title + " (" + table_name + ')';
if(m_label_table)
m_label_table->set_text(table_label);
diff --git a/glom/mode_design/translation/window_translations.cc b/glom/mode_design/translation/window_translations.cc
index 29cee59..1bc3a12 100644
--- a/glom/mode_design/translation/window_translations.cc
+++ b/glom/mode_design/translation/window_translations.cc
@@ -448,7 +448,7 @@ static void show_gettext_error(int severity, const char* filename, const gchar*
default:
{
- Glib::ustring msg = Glib::ustring(_("Gettext-Error: ")) + " " + msg_stream.str();
+ Glib::ustring msg = Glib::ustring(_("Gettext-Error: ")) + ' ' + msg_stream.str();
Gtk::MessageDialog dlg(msg, false, Gtk::MESSAGE_ERROR);
dlg.run();
break;
@@ -496,7 +496,7 @@ Glib::ustring Window_Translations::get_po_context_for_item(const sharedptr<Trans
{
// Note that this context string should use English rather than the translated strings,
// or the context would change depending on the locale of the user doing the export:
- return TranslatableItem::get_translatable_type_name_nontranslated(item->get_translatable_item_type()) + " (" + item->get_name() + ")";
+ return TranslatableItem::get_translatable_type_name_nontranslated(item->get_translatable_item_type()) + " (" + item->get_name() + ')';
}
void Window_Translations::on_button_export()
diff --git a/glom/mode_find/box_data_details_find.cc b/glom/mode_find/box_data_details_find.cc
index 033942e..53954cc 100644
--- a/glom/mode_find/box_data_details_find.cc
+++ b/glom/mode_find/box_data_details_find.cc
@@ -34,7 +34,7 @@ Box_Data_Details_Find::Box_Data_Details_Find()
m_hbox_buttons.pack_end(m_Button_Find, Gtk::PACK_SHRINK);
#endif
- g_object_set(m_Button_Find.gobj(), "can-default", tr, (gpointer)0); //TODO: Make this a real method in gtkmm?
+ g_object_set(m_Button_Find.gobj(), "can-default", TRUE, (gpointer)0); //TODO: Make this a real method in gtkmm?
#ifndef GLOM_ENABLE_CLIENT_ONLY
//Hide this because it is useless for Find mode:
diff --git a/glom/python_embed/glom_python.cc b/glom/python_embed/glom_python.cc
index c5317fb..3ac76d7 100644
--- a/glom/python_embed/glom_python.cc
+++ b/glom/python_embed/glom_python.cc
@@ -192,7 +192,7 @@ Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field
type_listStrings listStrings = ustring_tokenize(func_impl, "\n", -1);
for(type_listStrings::const_iterator iter = listStrings.begin(); iter != listStrings.end(); ++iter)
{
- func_def += " " + *iter + "\n";
+ func_def += " " + *iter + '\n';
}
diff --git a/glom/report_builder.cc b/glom/report_builder.cc
index 3621f9e..d1257fb 100644
--- a/glom/report_builder.cc
+++ b/glom/report_builder.cc
@@ -209,7 +209,7 @@ void ReportBuilder::report_build_groupby(const FoundSet& found_set_parent, xmlpp
//TODO: Use a SQL parameter instead of using sql().
Glib::ustring where_clause = "(\"" + group_field_table_name + "\".\"" + field_group_by->get_name() + "\" = " + field_group_by->get_full_field_details()->sql(group_value) + ")";
if(!found_set_parent.m_where_clause.empty())
- where_clause += " AND (" + found_set_parent.m_where_clause + ")";
+ where_clause += " AND (" + found_set_parent.m_where_clause + ')';
FoundSet found_set_records = found_set_parent;
found_set_records.m_where_clause = where_clause;
diff --git a/glom/test_pyembed.cc b/glom/test_pyembed.cc
index 89af06c..d7ab2ce 100644
--- a/glom/test_pyembed.cc
+++ b/glom/test_pyembed.cc
@@ -35,7 +35,7 @@ void evaluate_function_implementation(const Glib::ustring& func_impl)
type_listStrings listStrings = ustring_tokenize(func_impl, "\n", -1);
for(type_listStrings::const_iterator iter = listStrings.begin(); iter != listStrings.end(); ++iter)
{
- func_def += " " + *iter + "\n";
+ func_def += " " + *iter + '\n';
}
//Indent the function implementation (required by python syntax):
diff --git a/glom/utility_widgets/datawidget.cc b/glom/utility_widgets/datawidget.cc
index 11aede8..e416187 100644
--- a/glom/utility_widgets/datawidget.cc
+++ b/glom/utility_widgets/datawidget.cc
@@ -96,7 +96,7 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
{
//The GNOME HIG says that labels should have ":" at the end:
//http://library.gnome.org/devel/hig-book/stable/design-text-labels.html.en
- m_label.set_label(title + ":");
+ m_label.set_label(title + ':');
m_label.set_alignment(0);
m_label.show();
diff --git a/glom/utils_ui.cc b/glom/utils_ui.cc
index d15ea04..24c436c 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -145,7 +145,7 @@ void Utils::show_help(const Glib::ustring& id)
else
{
std::string uri = "ghelp:" + help_file;
- if(pId) { uri += "?"; uri += pId; }
+ if(pId) { uri += '?'; uri += pId; }
// g_app_info_launch_default_for_uri seems not to be wrapped by giomm
if(!g_app_info_launch_default_for_uri(uri.c_str(), 0, &err))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]