Qt::Popup is a mask, so we cannot use the `&` operator to test the window type. We need to use QFlags::testFlag() for that purpose instead.
mentioned in commit 491930c4