[gtkmm] Gtk::Object: Add dont_allow_use_in_glib_refptr_ .
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::Object: Add dont_allow_use_in_glib_refptr_ .
- Date: Wed, 16 Sep 2015 09:06:52 +0000 (UTC)
commit ae7bf5bb51423c2c1e16397da7e00c4e6c17f34b
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Sep 16 10:35:36 2015 +0200
Gtk::Object: Add dont_allow_use_in_glib_refptr_ .
To deprecate the use of RefPtr with widgets and other Gtk::Object-derived
classes. We could just prevent this regardless of deprecation, but
deprecating it seems kinder in case someone has managed to do it so far.
Bug #755048
gtk/gtkmm/object.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmm/object.h b/gtk/gtkmm/object.h
index 044c4a5..8d20b3c 100644
--- a/gtk/gtkmm/object.h
+++ b/gtk/gtkmm/object.h
@@ -63,6 +63,14 @@ class GTKMM_API Object : public Glib::Object
typedef GObjectClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+#ifdef GTKMM_DISABLE_DEPRECATED
+ /** This prevents use of Gtk::Object-derived classes with RefPtr.
+ * RefPtr should only be used with classes that have create() methods
+ * that return RefPtr.
+ */
+ typedef int dont_allow_use_in_glib_refptr_;
+#endif
+
Object(Object&& src) noexcept;
Object& operator=(Object&& src) noexcept;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]