[kcmkwin/tabbox] static_cast QKeyEvent

Fixes a defect reported by coverity.
This commit is contained in:
Martin Gräßlin 2015-03-25 08:18:12 +01:00
parent da5328953a
commit 2e2ea354b6

View file

@ -88,7 +88,7 @@ LayoutPreview::~LayoutPreview()
bool LayoutPreview::eventFilter(QObject *object, QEvent *event)
{
if (event->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = dynamic_cast<QKeyEvent*>(event);
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->key() == Qt::Key_Escape ||
keyEvent->key() == Qt::Key_Return ||
keyEvent->key() == Qt::Key_Enter ||