[glom/gtkmm4v4: 36/37] gtkmm4: Treemodels: Use const_iterator for some vfunc parameters.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/gtkmm4v4: 36/37] gtkmm4: Treemodels: Use const_iterator for some vfunc parameters.
- Date: Wed, 15 Mar 2017 14:56:59 +0000 (UTC)
commit d1ac5d9b03d19ec5b26cd2f05b22197d649630c2
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Mar 15 15:43:52 2017 +0100
gtkmm4: Treemodels: Use const_iterator for some vfunc parameters.
To match changed API in gtkmm4.
glom/mode_data/datawidget/treemodel_db.cc | 10 +++++-----
glom/mode_data/datawidget/treemodel_db.h | 10 +++++-----
.../datawidget/treemodel_db_withextratext.cc | 2 +-
.../datawidget/treemodel_db_withextratext.h | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/glom/mode_data/datawidget/treemodel_db.cc b/glom/mode_data/datawidget/treemodel_db.cc
index b924e69..f9096b4 100644
--- a/glom/mode_data/datawidget/treemodel_db.cc
+++ b/glom/mode_data/datawidget/treemodel_db.cc
@@ -420,7 +420,7 @@ GType DbTreeModel::get_column_type_vfunc(int index) const
return 0;
}
-void DbTreeModel::get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBase& value) const
+void DbTreeModel::get_value_vfunc(const TreeModel::const_iterator& iter, int column, Glib::ValueBase& value)
const
{
//std::cout << "debug: " << G_STRFUNC << ": column=" << column << std::endl;
@@ -547,12 +547,12 @@ bool DbTreeModel::iter_children_vfunc(const iterator& parent, iterator& iter) co
return iter_nth_child_vfunc(parent, 0, iter);
}
-bool DbTreeModel::iter_has_child_vfunc(const iterator& /* iter */) const
+bool DbTreeModel::iter_has_child_vfunc(const const_iterator& /* iter */) const
{
return false;
}
-int DbTreeModel::iter_n_children_vfunc(const iterator& iter) const
+int DbTreeModel::iter_n_children_vfunc(const const_iterator& iter) const
{
if(!check_treeiter_validity(iter))
return iter_n_root_children_vfunc();
@@ -629,7 +629,7 @@ bool DbTreeModel::iter_parent_vfunc(const iterator& child, iterator& iter) const
return false; //There are no children, so no parents.
}
-Gtk::TreeModel::Path DbTreeModel::get_path_vfunc(const iterator& iter) const
+Gtk::TreeModel::Path DbTreeModel::get_path_vfunc(const const_iterator& iter) const
{
const auto datamodel_row = get_datamodel_row_index_from_tree_row_iter(iter);
@@ -720,7 +720,7 @@ bool DbTreeModel::check_treeiter_validity(const const_iterator& iter) const
return m_stamp == iter.get_stamp();
}
-bool DbTreeModel::iter_is_valid(const iterator& iter) const
+bool DbTreeModel::iter_is_valid(const const_iterator& iter) const
{
return check_treeiter_validity(iter);
}
diff --git a/glom/mode_data/datawidget/treemodel_db.h b/glom/mode_data/datawidget/treemodel_db.h
index 09a1f9e..e4c443f 100644
--- a/glom/mode_data/datawidget/treemodel_db.h
+++ b/glom/mode_data/datawidget/treemodel_db.h
@@ -164,23 +164,23 @@ protected:
Gtk::TreeModelFlags get_flags_vfunc() const override;
int get_n_columns_vfunc() const override;
GType get_column_type_vfunc(int index) const override;
- void get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBase& value) const override;
+ void get_value_vfunc(const TreeModel::const_iterator& iter, int column, Glib::ValueBase& value) const
override;
bool iter_next_vfunc(const iterator& iter, iterator& iter_next) const override;
//TODO: Make sure that we make all of these const when we have made them all const in the TreeModel:
bool iter_children_vfunc(const iterator& parent, iterator& iter) const override;
- bool iter_has_child_vfunc(const iterator& iter) const override;
- int iter_n_children_vfunc(const iterator& iter) const override;
+ bool iter_has_child_vfunc(const const_iterator& iter) const override;
+ int iter_n_children_vfunc(const const_iterator& iter) const override;
int iter_n_root_children_vfunc() const override;
bool iter_nth_child_vfunc(const iterator& parent, int n, iterator& iter) const override;
bool iter_nth_root_child_vfunc(int n, iterator& iter) const override;
bool iter_parent_vfunc(const iterator& child, iterator& iter) const override;
- Path get_path_vfunc(const iterator& iter) const override;
+ Path get_path_vfunc(const const_iterator& iter) const override;
bool get_iter_vfunc(const Path& path, iterator& iter) const override;
private:
- bool iter_is_valid(const iterator& iter) const;
+ bool iter_is_valid(const const_iterator& iter) const;
void set_value_impl(const iterator& row, int column, const Glib::ValueBase& value) override;
diff --git a/glom/mode_data/datawidget/treemodel_db_withextratext.cc
b/glom/mode_data/datawidget/treemodel_db_withextratext.cc
index 4ad88d2..8eb4621 100644
--- a/glom/mode_data/datawidget/treemodel_db_withextratext.cc
+++ b/glom/mode_data/datawidget/treemodel_db_withextratext.cc
@@ -90,7 +90,7 @@ GType DbTreeModelWithExtraText::get_column_type_vfunc(int index) const
return DbTreeModel::get_column_type_vfunc(index);
}
-void DbTreeModelWithExtraText::get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBase&
value) const
+void DbTreeModelWithExtraText::get_value_vfunc(const TreeModel::const_iterator& iter, int column,
Glib::ValueBase& value) const
{
//std::cout << G_STRFUNC << ": Debug: column=" << column << std::endl;
if(column == get_text_column())
diff --git a/glom/mode_data/datawidget/treemodel_db_withextratext.h
b/glom/mode_data/datawidget/treemodel_db_withextratext.h
index 92aa7af..0696693 100644
--- a/glom/mode_data/datawidget/treemodel_db_withextratext.h
+++ b/glom/mode_data/datawidget/treemodel_db_withextratext.h
@@ -59,7 +59,7 @@ public:
private:
int get_n_columns_vfunc() const override;
GType get_column_type_vfunc(int index) const override;
- void get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBase& value) const override;
+ void get_value_vfunc(const TreeModel::const_iterator& iter, int column, Glib::ValueBase& value) const
override;
int m_column_index_first; //The index of the first field in the TreeModel.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]