[glom] Box_Data_Portal::get_portal(): const correctness.



commit 040c9df00d17d4df934a064d87827631aab3ded6
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Mar 18 15:17:29 2016 +0100

    Box_Data_Portal::get_portal(): const correctness.
    
    fix const

 glom/mode_data/box_data_portal.cc                |    7 ++++++-
 glom/mode_data/box_data_portal.h                 |    3 ++-
 tests/export/test_selfhosting_new_then_export.cc |    2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/glom/mode_data/box_data_portal.cc b/glom/mode_data/box_data_portal.cc
index 06356e9..494ffbb 100644
--- a/glom/mode_data/box_data_portal.cc
+++ b/glom/mode_data/box_data_portal.cc
@@ -159,7 +159,12 @@ bool Box_Data_Portal::refresh_data_from_database_with_foreign_key(const Gnome::G
   }
 }
 
-std::shared_ptr<LayoutItem_Portal> Box_Data_Portal::get_portal() const
+std::shared_ptr<LayoutItem_Portal> Box_Data_Portal::get_portal()
+{
+  return m_portal;
+}
+
+std::shared_ptr<const LayoutItem_Portal> Box_Data_Portal::get_portal() const
 {
   return m_portal;
 }
diff --git a/glom/mode_data/box_data_portal.h b/glom/mode_data/box_data_portal.h
index 4615858..dd73b70 100644
--- a/glom/mode_data/box_data_portal.h
+++ b/glom/mode_data/box_data_portal.h
@@ -58,7 +58,8 @@ public:
    */
   bool refresh_data_from_database_with_foreign_key(const Gnome::Gda::Value& foreign_key_value);
 
-  std::shared_ptr<LayoutItem_Portal> get_portal() const;
+  std::shared_ptr<LayoutItem_Portal> get_portal();
+  std::shared_ptr<const LayoutItem_Portal> get_portal() const;
   std::shared_ptr<const Field> get_key_field() const;
 
   sigc::signal<void, Gnome::Gda::Value> signal_record_added;
diff --git a/tests/export/test_selfhosting_new_then_export.cc 
b/tests/export/test_selfhosting_new_then_export.cc
index b103b3d..50b79a6 100644
--- a/tests/export/test_selfhosting_new_then_export.cc
+++ b/tests/export/test_selfhosting_new_then_export.cc
@@ -39,7 +39,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
   
   Glom::FoundSet found_set; //TODO: Test a where clause.
   found_set.m_table_name = "albums";
-  Glom::Document::type_list_layout_groups layout_groups;
+  Glom::Document::type_list_const_layout_groups layout_groups;
   auto group = std::make_shared<Glom::LayoutGroup>();
   layout_groups.emplace_back(group);
   auto field_name = std::make_shared<Glom::LayoutItem_Field>();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]