[glom] ReportBuilder: Handle -1 column/row counts from DataModel.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] ReportBuilder: Handle -1 column/row counts from DataModel.
- Date: Tue, 29 Mar 2016 17:39:36 +0000 (UTC)
commit 303418c6974c9168683ac7cbc7f31b6abbe9fe98
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Mar 29 14:45:04 2016 +0200
ReportBuilder: Handle -1 column/row counts from DataModel.
glom/libglom/report_builder.cc | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glom/libglom/report_builder.cc b/glom/libglom/report_builder.cc
index 657d292..b85f2fb 100644
--- a/glom/libglom/report_builder.cc
+++ b/glom/libglom/report_builder.cc
@@ -242,8 +242,8 @@ bool ReportBuilder::report_build_groupby(const FoundSet& found_set_parent, xmlpp
}
else
{
- const guint rows_count = datamodel->get_n_rows();
- for(guint row = 0; row < rows_count; ++row)
+ const auto rows_count = datamodel->get_n_rows(); // -1 means unknown.
+ for(int row = 0; row < rows_count; ++row)
{
const auto group_value = datamodel->get_value_at(0 /* col*/, row); //TODO: Catch exceptions.
@@ -390,9 +390,9 @@ bool ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Eleme
}
else
{
- const guint rows_count = datamodel->get_n_rows();
+ const auto rows_count = datamodel->get_n_rows();
- for(guint row = 0; row < rows_count; ++row)
+ for(int row = 0; row < rows_count; ++row)
{
auto nodeRow = parent_node.add_child_element("row");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]