aboutsummaryrefslogtreecommitdiffstats
path: root/docs/checks/README-install-event-filter.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/checks/README-install-event-filter.md')
-rw-r--r--docs/checks/README-install-event-filter.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/checks/README-install-event-filter.md b/docs/checks/README-install-event-filter.md
new file mode 100644
index 00000000..567e44ba
--- /dev/null
+++ b/docs/checks/README-install-event-filter.md
@@ -0,0 +1,7 @@
+# install-event-filter
+
+Warns on potential misuse of `QObject::installEventFilter()`.
+To install an event filter you should call `monitoredObject->installEventFilter(this)`, but sometimes
+you'll write `installEventFilter(filterObject)` by mistake, which compiles fine.
+
+In rare cases you might actually want to install the event filter on `this`, in which case this is a false-positive.