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 ...@@ -35,7 +35,6 @@ CompositeWidgetFocusWatcher::CompositeWidgetFocusWatcher(QWidget *compositeWidge
bool CompositeWidgetFocusWatcher::eventFilter(QObject *watched, QEvent *event) bool CompositeWidgetFocusWatcher::eventFilter(QObject *watched, QEvent *event)
{ {
auto *focusEvent = static_cast<QFocusEvent *>(event);
switch(event->type()) { switch(event->type()) {
case QEvent::Close: case QEvent::Close:
case QEvent::DeferredDelete: case QEvent::DeferredDelete:
...@@ -47,7 +46,7 @@ bool CompositeWidgetFocusWatcher::eventFilter(QObject *watched, QEvent *event) ...@@ -47,7 +46,7 @@ bool CompositeWidgetFocusWatcher::eventFilter(QObject *watched, QEvent *event)
emit compositeFocusChanged(true); emit compositeFocusChanged(true);
break; break;
case QEvent::FocusOut: case QEvent::FocusOut:
if(focusEvent->reason() != Qt::PopupFocusReason) { if(static_cast<QFocusEvent *>(event)->reason() != Qt::PopupFocusReason) {
emit compositeFocusChanged(false); emit compositeFocusChanged(false);
} }
break; 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