diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-26 17:08:01 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-01 17:00:35 +0200 |
commit | b6688a4d4939b15713ffd8702253433032879fcb (patch) | |
tree | 13a0ccfdeab7e0c239b862325aa7a41a05a7d619 /src/corelib/kernel/qsignalmapper.cpp | |
parent | 4726f47b41e507a967c8995609e11947dde4c250 (diff) |
Un-deprecate QSignalMapper
From the comments on QTBUG-73407 and the last comments on
29bcbeab90210da80234529905d17280374f9684, it seems like there are still
use-cases when QSignalMapper is useful.
Change-Id: I8402286cb8a395a4601cda8a4cdda51f19aef073
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/kernel/qsignalmapper.cpp')
-rw-r--r-- | src/corelib/kernel/qsignalmapper.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/corelib/kernel/qsignalmapper.cpp b/src/corelib/kernel/qsignalmapper.cpp index 34fea861cd..24b174972f 100644 --- a/src/corelib/kernel/qsignalmapper.cpp +++ b/src/corelib/kernel/qsignalmapper.cpp @@ -38,7 +38,6 @@ ****************************************************************************/ #include "qglobal.h" -#if QT_DEPRECATED_SINCE(5, 10) #include "qsignalmapper.h" #include "qhash.h" @@ -64,7 +63,6 @@ public: /*! \class QSignalMapper \inmodule QtCore - \obsolete The recommended solution is connecting the signal to a lambda. \brief The QSignalMapper class bundles signals from identifiable senders. \ingroup objectmodel @@ -72,7 +70,9 @@ public: This class collects a set of parameterless signals, and re-emits them with integer, string or widget parameters corresponding to - the object that sent the signal. + the object that sent the signal. Note that in most cases you can + use lambdas for passing custom parameters to slots. This is less + costly and will simplify the code. The class supports the mapping of particular strings or integers with particular objects using setMapping(). The objects' signals @@ -314,5 +314,3 @@ void QSignalMapper::map(QObject *sender) QT_END_NAMESPACE #include "moc_qsignalmapper.cpp" - -#endif |