[gtkmm] Gtk: Fix ref count for get_expression methods



commit 19813f0473c9b16804b3f6e4667ea9a85045b6b3
Author: Andreas Persson <andreasp56 outlook com>
Date:   Sun Sep 20 19:45:40 2020 +0200

    Gtk: Fix ref count for get_expression methods
    
    The get_expression method in DropDown, StringFilter and StringSorter
    must be declared as refreturn. Also make a const and a non-const version
    of each method.

 gtk/src/dropdown.hg     | 3 ++-
 gtk/src/stringfilter.hg | 3 ++-
 gtk/src/stringsorter.hg | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk/src/dropdown.hg b/gtk/src/dropdown.hg
index 9a26314b..9a679c6b 100644
--- a/gtk/src/dropdown.hg
+++ b/gtk/src/dropdown.hg
@@ -86,7 +86,8 @@ public:
   _WRAP_METHOD(Glib::RefPtr<ListItemFactory> get_list_factory(), gtk_drop_down_get_list_factory, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const ListItemFactory> get_list_factory() const, gtk_drop_down_get_list_factory, 
refreturn, constversion)
   _WRAP_METHOD(void set_expression(const Glib::RefPtr<Expression<Glib::ustring>>& expression), 
gtk_drop_down_set_expression)
-  _WRAP_METHOD(Glib::RefPtr<Expression<Glib::ustring>> get_expression() const, gtk_drop_down_get_expression)
+  _WRAP_METHOD(Glib::RefPtr<Expression<Glib::ustring>> get_expression(), gtk_drop_down_get_expression, 
refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Expression<Glib::ustring>> get_expression() const, 
gtk_drop_down_get_expression, refreturn)
 
   _WRAP_METHOD(void set_enable_search(bool enable_search = true), gtk_drop_down_set_enable_search)
   _WRAP_METHOD(bool get_enable_search() const, gtk_drop_down_get_enable_search)
diff --git a/gtk/src/stringfilter.hg b/gtk/src/stringfilter.hg
index 90dc5700..ddfec899 100644
--- a/gtk/src/stringfilter.hg
+++ b/gtk/src/stringfilter.hg
@@ -49,7 +49,8 @@ public:
 
   _WRAP_METHOD(Glib::ustring get_search() const, gtk_string_filter_get_search)
   _WRAP_METHOD(void set_search(const Glib::ustring& search), gtk_string_filter_set_search)
-  _WRAP_METHOD(Glib::RefPtr<Expression<Glib::ustring>> get_expression() const, 
gtk_string_filter_get_expression)
+  _WRAP_METHOD(Glib::RefPtr<Expression<Glib::ustring>> get_expression(), gtk_string_filter_get_expression, 
refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Expression<Glib::ustring>> get_expression() const, 
gtk_string_filter_get_expression, refreturn)
   _WRAP_METHOD(void set_expression(const Glib::RefPtr<Expression<Glib::ustring>>& expression), 
gtk_string_filter_set_expression)
   _WRAP_METHOD(bool get_ignore_case() const, gtk_string_filter_get_ignore_case)
   _WRAP_METHOD(void set_ignore_case(bool ignore_case = true), gtk_string_filter_set_ignore_case)
diff --git a/gtk/src/stringsorter.hg b/gtk/src/stringsorter.hg
index c3e5ee9c..ae13e741 100644
--- a/gtk/src/stringsorter.hg
+++ b/gtk/src/stringsorter.hg
@@ -46,7 +46,8 @@ protected:
 public:
   _WRAP_CREATE(const Glib::RefPtr<Expression<Glib::ustring>>& expression)
 
-  _WRAP_METHOD(Glib::RefPtr<Expression<Glib::ustring>> get_expression() const, 
gtk_string_sorter_get_expression)
+  _WRAP_METHOD(Glib::RefPtr<Expression<Glib::ustring>> get_expression(), gtk_string_sorter_get_expression, 
refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Expression<Glib::ustring>> get_expression() const, 
gtk_string_sorter_get_expression, refreturn)
   _WRAP_METHOD(void set_expression(const Glib::RefPtr<Expression<Glib::ustring>>& expression), 
gtk_string_sorter_set_expression)
   _WRAP_METHOD(bool get_ignore_case() const, gtk_string_sorter_get_ignore_case)
   _WRAP_METHOD(void set_ignore_case(bool ignore_case = true), gtk_string_sorter_set_ignore_case)


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