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

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);
break;
case QEvent::FocusOut:
if(focusEvent->reason() != Qt::PopupFocusReason) {
if(static_cast<QFocusEvent *>(event)->reason() != Qt::PopupFocusReason) {
emit compositeFocusChanged(false);
}
break;
......
Markdown is supported
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