[glom] Revert "SQLite: Avoid a warning about int types for summary fields."
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Revert "SQLite: Avoid a warning about int types for summary fields."
- Date: Mon, 28 Nov 2011 09:27:49 +0000 (UTC)
commit ea7ad28ebc127a319152a62141a505a937352509
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Nov 28 10:27:27 2011 +0100
Revert "SQLite: Avoid a warning about int types for summary fields."
This reverts commit 803e2eb5225f7d8d0907e8320296e44deb970027
because it makes make check fail.
ChangeLog | 8 --------
glom/libglom/data_structure/glomconversions.cc | 5 +----
glom/libglom/report_builder.cc | 2 +-
3 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6c5f503..a7e4289 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,14 +13,6 @@
2011-11-25 Murray Cumming <murrayc murrayc com>
- SQLite: Avoid a warning about int types for summary fields.
-
- * glom/libglom/data_structure/glomconversions.cc:
- get_text_for_gda_value(): An int is normal for aggregate fields for
- SQLite.
-
-2011-11-25 Murray Cumming <murrayc murrayc com>
-
Avoid an uninteresting stdcerr warning.
* glom/libglom/connectionpool.cc: It is OK to not know
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index de07d0e..62dcd26 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -420,10 +420,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
}
else if(glom_type == Field::TYPE_NUMERIC)
{
- const GType value_type = value.get_value_type();
- if(value_type != GDA_TYPE_NUMERIC
- && value_type != G_TYPE_DOUBLE
- && value_type != G_TYPE_INT) //SQLite uses int for summary field results.
+ if(value.get_value_type() != GDA_TYPE_NUMERIC && value.get_value_type() != G_TYPE_DOUBLE)
{
std::cerr << G_STRFUNC << ": glom field type is NUMERIC but GdaValue type is: " << g_type_name(value.get_value_type()) << std::endl;
return value.to_string();
diff --git a/glom/libglom/report_builder.cc b/glom/libglom/report_builder.cc
index 27de092..e6bbff9 100644
--- a/glom/libglom/report_builder.cc
+++ b/glom/libglom/report_builder.cc
@@ -418,7 +418,7 @@ void ReportBuilder::report_build_records_field(const FoundSet& found_set, xmlpp:
if(text_value.empty() && sharedptr<const LayoutItem_FieldSummary>::cast_dynamic(field) && (field_type == Field::TYPE_NUMERIC))
{
//Use get_text_for_gda_value() instead of "0" so we get the correct numerical formatting:
- const Gnome::Gda::Value value = Conversions::parse_value(0);
+ Gnome::Gda::Value value = Conversions::parse_value(0);
text_value = Conversions::get_text_for_gda_value(field_type, value, field->get_formatting_used().m_numeric_format);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]