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 diff --git a/src/corelib/kernel/qsignalmapper.h b/src/corelib/kernel/qsignalmapper.h index 6c4cfa9627..0da1e8f87d 100644 --- a/src/corelib/kernel/qsignalmapper.h +++ b/src/corelib/kernel/qsignalmapper.h @@ -42,8 +42,6 @@ #include -#if QT_DEPRECATED_SINCE(5, 10) - QT_BEGIN_NAMESPACE class QSignalMapperPrivate; @@ -53,7 +51,7 @@ class Q_CORE_EXPORT QSignalMapper : public QObject Q_OBJECT Q_DECLARE_PRIVATE(QSignalMapper) public: - QT_DEPRECATED explicit QSignalMapper(QObject *parent = nullptr); + explicit QSignalMapper(QObject *parent = nullptr); ~QSignalMapper(); void setMapping(QObject *sender, int id); @@ -84,6 +82,4 @@ private: QT_END_NAMESPACE -#endif - #endif // QSIGNALMAPPER_H