aboutsummaryrefslogtreecommitdiffstats
path: root/src/checks/level0/README-wrong-qevent-cast.md
blob: 9624423120589253bdbcbfa78fdcc5b8b76a4634 (plain)
1
2
3
4
5
6
7
8
9
10
11
# 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);
}

Currently only casts inside switches are verified.