aboutsummaryrefslogtreecommitdiffstats
path: root/docs/checks/README-wrong-qevent-cast.md
blob: 3779bc8238d5e739161e7215dee0355533a76ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# wrong-qevent-cast

Warns when a `QEvent` is possibly cast to the wrong derived class via `static_cast`.

Example:
```
switch (ev->type()) {
    case QEvent::MouseMove:
        auto e = static_cast<QKeyEvent*>(ev);
}
```
Only casts inside switch statements are verified.