[gtkmm] Gtk::Assistant, etc.: Fix bugs noticed by clang++



commit b0c9b4617fb5dd770b98bb73011aa35e913c5b33
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri Aug 27 16:19:37 2021 +0200

    Gtk::Assistant, etc.: Fix bugs noticed by clang++
    
    * gtk/src/assistant.hg:
    * gtk/src/notebook.hg:
    * gtk/src/stack.hg: get_page() shall not be declared constversion.
    The const version is not identical to the non-const version.
    * gtk/src/mediacontrols.hg:
    * gtk/src/video.hg: set_media_stream() shall not be declared
    refreturn, constversion. It's not const. It does not return a value.
    * tools/m4/convert_gtk.m4: Declare some new _CONVERSION()s.

 gtk/src/assistant.hg     | 2 +-
 gtk/src/mediacontrols.hg | 2 +-
 gtk/src/notebook.hg      | 2 +-
 gtk/src/stack.hg         | 2 +-
 gtk/src/video.hg         | 2 +-
 tools/m4/convert_gtk.m4  | 2 ++
 6 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/src/assistant.hg b/gtk/src/assistant.hg
index 164482a8..1e88c0e7 100644
--- a/gtk/src/assistant.hg
+++ b/gtk/src/assistant.hg
@@ -87,7 +87,7 @@ public:
   _WRAP_METHOD(void commit(), gtk_assistant_commit)
 
   _WRAP_METHOD(Glib::RefPtr<AssistantPage> get_page(Widget& child), gtk_assistant_get_page, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const AssistantPage> get_page(const Widget& child) const, 
gtk_assistant_get_page, refreturn, constversion)
+  _WRAP_METHOD(Glib::RefPtr<const AssistantPage> get_page(const Widget& child) const, 
gtk_assistant_get_page, refreturn)
 
   _WRAP_METHOD(Glib::RefPtr<Gio::ListModel> get_pages(), gtk_assistant_get_pages)
   _WRAP_METHOD(Glib::RefPtr<const Gio::ListModel> get_pages() const, gtk_assistant_get_pages, constversion)
diff --git a/gtk/src/mediacontrols.hg b/gtk/src/mediacontrols.hg
index 513eeb92..0661318b 100644
--- a/gtk/src/mediacontrols.hg
+++ b/gtk/src/mediacontrols.hg
@@ -43,7 +43,7 @@ public:
 
   _WRAP_METHOD(Glib::RefPtr<MediaStream> get_media_stream(), gtk_media_controls_get_media_stream, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const MediaStream> get_media_stream() const, 
gtk_media_controls_get_media_stream, refreturn, constversion)
-  _WRAP_METHOD(void set_media_stream(const Glib::RefPtr<MediaStream>& stream), 
gtk_media_controls_set_media_stream, refreturn, constversion)
+  _WRAP_METHOD(void set_media_stream(const Glib::RefPtr<MediaStream>& stream), 
gtk_media_controls_set_media_stream)
 
   _WRAP_PROPERTY("media-stream", Glib::RefPtr<MediaStream>)
 
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index dcf3749c..b31b4679 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -135,7 +135,7 @@ public:
   _WRAP_METHOD(void set_action_widget(Widget* widget, PackType pack_type = PackType::START), 
gtk_notebook_set_action_widget)
 
   _WRAP_METHOD(Glib::RefPtr<NotebookPage> get_page(Widget& child), gtk_notebook_get_page, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const NotebookPage> get_page(const Widget& child) const, gtk_notebook_get_page, 
refreturn, constversion)
+  _WRAP_METHOD(Glib::RefPtr<const NotebookPage> get_page(const Widget& child) const, gtk_notebook_get_page, 
refreturn)
 
   _WRAP_METHOD(Glib::RefPtr<Gio::ListModel> get_pages(), gtk_notebook_get_pages)
   _WRAP_METHOD(Glib::RefPtr<const Gio::ListModel> get_pages() const, gtk_notebook_get_pages, constversion)
diff --git a/gtk/src/stack.hg b/gtk/src/stack.hg
index f56058af..b4bba4d1 100644
--- a/gtk/src/stack.hg
+++ b/gtk/src/stack.hg
@@ -58,7 +58,7 @@ public:
   _WRAP_METHOD(void remove(Widget& child), gtk_stack_remove)
 
   _WRAP_METHOD(Glib::RefPtr<StackPage> get_page(Widget& child), gtk_stack_get_page, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const StackPage> get_page(const Widget& child) const, gtk_stack_get_page, 
refreturn, constversion)
+  _WRAP_METHOD(Glib::RefPtr<const StackPage> get_page(const Widget& child) const, gtk_stack_get_page, 
refreturn)
 
   _WRAP_METHOD(void set_visible_child(Widget& child), gtk_stack_set_visible_child)
   _WRAP_METHOD(Widget* get_visible_child(), gtk_stack_get_visible_child)
diff --git a/gtk/src/video.hg b/gtk/src/video.hg
index 662a517a..53b3b85a 100644
--- a/gtk/src/video.hg
+++ b/gtk/src/video.hg
@@ -72,7 +72,7 @@ public:
 
   _WRAP_METHOD(Glib::RefPtr<MediaStream> get_media_stream(), gtk_video_get_media_stream, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const MediaStream> get_media_stream() const, gtk_video_get_media_stream, 
refreturn, constversion)
-  _WRAP_METHOD(void set_media_stream(const Glib::RefPtr<MediaStream>& stream), gtk_video_set_media_stream, 
refreturn, constversion)
+  _WRAP_METHOD(void set_media_stream(const Glib::RefPtr<MediaStream>& stream), gtk_video_set_media_stream)
 
   _WRAP_METHOD(Glib::RefPtr<Gio::File> get_file(), gtk_video_get_file, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gio::File> get_file() const, gtk_video_get_file, refreturn, constversion)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index d21fff45..daa1675a 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -181,7 +181,9 @@ _CONVERSION(`const CssLocation&',`const GtkCssLocation*',__FR2P)
 _CONVERSION(`const GtkCssLocation*',`CssLocation',`Glib::wrap($3)')
 
 _CONVERSION(`GtkAssistantPage*',`Glib::RefPtr<AssistantPage>',`Glib::wrap($3)')
+_CONVERSION(`GtkAssistantPage*',`Glib::RefPtr<const AssistantPage>',`Glib::wrap($3)')
 _CONVERSION(`GtkNotebookPage*',`Glib::RefPtr<NotebookPage>',`Glib::wrap($3)')
+_CONVERSION(`GtkNotebookPage*',`Glib::RefPtr<const NotebookPage>',`Glib::wrap($3)')
 
 _CONVERSION(`GtkCellArea*',`Glib::RefPtr<CellArea>',`Glib::wrap($3)')
 _CONVERSION(`GtkCellArea*',`Glib::RefPtr<const CellArea>',`Glib::wrap($3)')


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