summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-01-05 11:12:46 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-01-11 20:39:30 +0100
commit43de84644292978f2b8bce209830cf14d5384904 (patch)
tree3a509e9d301838cbeb4f936dbc2c12535288d9fd /src/corelib/kernel/qobject.cpp
parentf83ec0c76b13bc4273468e9b4c4571dab30c6f4f (diff)
QObject: Make it clear we don't install duplicated event filters
Pick-to: 6.7 6.6 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>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 293f133eff..8d4e47afb5 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -2311,6 +2311,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: