Reduce variable scope

Part of !209
wilder
Martin T. H. Sandsmark 6 years ago committed by Kurt Hindenburg
parent 914ac12087
commit 0087cc3325
  1. 3
      src/CompositeWidgetFocusWatcher.cpp

@ -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;

Loading…
Cancel
Save