[glibmm] Glib::ObjectBase: Remove connect_property_changed_with_return()



commit 9a713f715648576a4ddb46eb6efee9601f936a46
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Wed Nov 30 15:33:50 2016 +0100

    Glib::ObjectBase: Remove connect_property_changed_with_return()
    
    and let connect_property_changed() return a sigc::connection.

 glib/glibmm/objectbase.cc |   17 ++---------------
 glib/glibmm/objectbase.h  |   23 ++---------------------
 2 files changed, 4 insertions(+), 36 deletions(-)
---
diff --git a/glib/glibmm/objectbase.cc b/glib/glibmm/objectbase.cc
index 9f05283..429d11d 100644
--- a/glib/glibmm/objectbase.cc
+++ b/glib/glibmm/objectbase.cc
@@ -341,21 +341,8 @@ ObjectBase::get_property_value(const Glib::ustring& property_name, Glib::ValueBa
   g_object_get_property(const_cast<GObject*>(gobj()), property_name.c_str(), value.gobj());
 }
 
-void
-ObjectBase::connect_property_changed(
-  const Glib::ustring& property_name, const sigc::slot<void()>& slot)
-{
-  connect_property_changed_with_return(property_name, slot);
-}
-
-void
-ObjectBase::connect_property_changed(const Glib::ustring& property_name, sigc::slot<void()>&& slot)
-{
-  connect_property_changed_with_return(property_name, std::move(slot));
-}
-
 sigc::connection
-ObjectBase::connect_property_changed_with_return(
+ObjectBase::connect_property_changed(
   const Glib::ustring& property_name, const sigc::slot<void()>& slot)
 {
   // Create a proxy to hold our connection info
@@ -368,7 +355,7 @@ ObjectBase::connect_property_changed_with_return(
 }
 
 sigc::connection
-ObjectBase::connect_property_changed_with_return(
+ObjectBase::connect_property_changed(
   const Glib::ustring& property_name, sigc::slot<void()>&& slot)
 {
   // Create a proxy to hold our connection info
diff --git a/glib/glibmm/objectbase.h b/glib/glibmm/objectbase.h
index ab95d6b..4dce060 100644
--- a/glib/glibmm/objectbase.h
+++ b/glib/glibmm/objectbase.h
@@ -121,34 +121,15 @@ public:
   template <class PropertyType>
   PropertyType get_property(const Glib::ustring& property_name) const;
 
-  // TODO: At the next ABI break, delete connect_property_changed_with_return()
-  // and let connect_property_changed() return sigc::connection.
   /** You can use the signal_changed() signal of the property proxy instead.
-   *
-   * See also connect_property_changed_with_return().
-   */
-  void connect_property_changed(const Glib::ustring& property_name, const sigc::slot<void()>& slot);
-
-  /** You can use the signal_changed() signal of the property proxy instead.
-   *
-   * @newin{2,48}
-   */
-  void connect_property_changed(const Glib::ustring& property_name, sigc::slot<void()>&& slot);
-
-  /** You can use the signal_changed() signal of the property proxy instead.
-   *
-   * This method was added because connect_property_changed() does not return a sigc::connection,
-   * and we could not break the ABI by changing that function.
    */
-  sigc::connection connect_property_changed_with_return(
-    const Glib::ustring& property_name, const sigc::slot<void()>& slot);
+  sigc::connection connect_property_changed(const Glib::ustring& property_name, const sigc::slot<void()>& 
slot);
 
   /** You can use the signal_changed() signal of the property proxy instead.
    *
    * @newin{2,48}
    */
-  sigc::connection connect_property_changed_with_return(
-    const Glib::ustring& property_name, sigc::slot<void()>&& slot);
+  sigc::connection connect_property_changed(const Glib::ustring& property_name, sigc::slot<void()>&& slot);
 
   /** Increases the freeze count on object. If the freeze count is non-zero, the
    * emission of "notify" signals on object is stopped. The signals are queued


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