Commit 0087cc33 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark Committed by Kurt Hindenburg
Browse files

Reduce variable scope

Part of !209
parent 914ac120
......@@ -35,7 +35,6 @@ CompositeWidgetFocusWatcher::CompositeWidgetFocusWatcher(QWidget *compositeWidge
bool CompositeWidgetFocusWatcher::eventFilter(QObject *watched, QEvent *event)
auto *focusEvent = static_cast<QFocusEvent *>(event);
switch(event->type()) {
case QEvent::Close:
case QEvent::DeferredDelete:
......@@ -47,7 +46,7 @@ bool CompositeWidgetFocusWatcher::eventFilter(QObject *watched, QEvent *event)
emit compositeFocusChanged(true);
case QEvent::FocusOut:
if(focusEvent->reason() != Qt::PopupFocusReason) {
if(static_cast<QFocusEvent *>(event)->reason() != Qt::PopupFocusReason) {
emit compositeFocusChanged(false);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment