Skip to content

Commit 74fdc49

Browse files
committed
signal: Deprecate slots().
Because we don't use it in any tests or examples and probably nobody uses it. It has already been removed from libsigc++-3.0 (which installs in parallel): https://git.gnome.org/browse/libsigcplusplus/commit/?id=fb5d1a55ddd843a1ded635b0ebce4e5b5301fc36 Please tell us if you really need to use this.
1 parent b5d6e5b commit 74fdc49

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

sigc++/macros/signal.h.m4

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,7 @@ define([SIGNAL_N],[dnl
298298
* Be careful if you directly pass one signal into the connect()
299299
* method of another: a shallow copy of the signal is made and
300300
* the signal's slots are not disconnected until both the signal
301-
* and its clone are destroyed, which is probably not what you want!
302-
*
303-
* An STL-style list interface for the signal's list of slots
304-
* can be retrieved with slots(). This interface supports
305-
* iteration, insertion and removal of slots.
301+
* and its clone are destroyed, which is probably not what you want.
306302
*
307303
* The following template arguments are used:
308304
* - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).dnl
@@ -402,19 +398,25 @@ _DEPRECATE_IFDEF_END
402398
bound_const_mem_functor$1<LIST(result_type, signal$1, LOOP(type_trait_take_t<T_arg%1>, $1))> make_slot() const
403399
{ return bound_const_mem_functor$1<LIST(result_type, signal$1, LOOP(type_trait_take_t<T_arg%1>, $1))>(*this, &signal$1::emit); }
404400
401+
_DEPRECATE_IFDEF_START
405402
/** Creates an STL-style interface for the signal's list of slots.
406403
* This interface supports iteration, insertion and removal of slots.
407404
* @return An STL-style interface for the signal's list of slots.
405+
*
406+
* @deprecated This is apparently not useful, but please let us know if you need it.
408407
*/
409408
slot_list_type slots()
410409
{ return slot_list_type(impl()); }
411410
412411
/** Creates an STL-style interface for the signal's list of slots.
413412
* This interface supports iteration, insertion and removal of slots.
414413
* @return An STL-style interface for the signal's list of slots.
414+
*
415+
* @deprecated This is apparently not useful, but please let us know if you need it.
415416
*/
416417
const slot_list_type slots() const
417418
{ return slot_list_type(const_cast<signal$1*>(this)->impl()); }
419+
_DEPRECATE_IFDEF_END
418420
419421
signal$1() {}
420422
@@ -454,10 +456,6 @@ ifelse($1, $2,[dnl
454456
* the signal's slots are not disconnected until both the signal
455457
* and its clone are destroyed, which is probably not what you want!
456458
*
457-
* An STL-style list interface for the signal's list of slots
458-
* can be retrieved with slots(). This interface supports
459-
* iteration, insertion and removal of slots.
460-
*
461459
* The template arguments determine the function signature of
462460
* the emit() function:
463461
* - @e T_return The desired return type of the emit() function.dnl
@@ -847,8 +845,7 @@ struct slot_const_iterator
847845
/** STL-style list interface for sigc::signal#.
848846
* slot_list can be used to iterate over the list of slots that
849847
* is managed by a signal. Slots can be added or removed from
850-
* the list while existing iterators stay valid. A slot_list
851-
* object can be retrieved from the signal's slots() function.
848+
* the list while existing iterators stay valid.
852849
*
853850
* @ingroup signal
854851
*/

0 commit comments

Comments
 (0)