QObject: Make it clear we don't install duplicated event filters

Pick-to: 6.5 6.2 5.15
Change-Id: I3048b50700880dd2445a5a65823fef02b196ce7d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 43de84644292978f2b8bce209830cf14d5384904)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 31a94ee00dbe95217b3b5ec4267f2304ec2b5631)
This commit is contained in:
Jarek Kobus 2024-01-05 11:12:46 +01:00 committed by Qt Cherry-pick Bot
parent 9378db0f78
commit b06525ddbb

View File

@ -2288,6 +2288,9 @@ void QObjectPrivate::setParent_helper(QObject *o)
If multiple event filters are installed on a single object, the
filter that was installed last is activated first.
If \a filterObj has already been installed for this object,
this function moves it so it acts as if it was installed last.
Here's a \c KeyPressEater class that eats the key presses of its
monitored objects: