Commit 69069193 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Optimize if condition by checking state first and then using qobject_cast

Suggested by cfeck
parent 89b91603
......@@ -3079,7 +3079,7 @@ namespace Breeze
const State& state( option->state );
// no focus indicator on selected list items
if (widget && widget->inherits("QAbstractItemView") && (state & State_Selected))
if ((state & State_Selected) && qobject_cast<const QAbstractItemView *>(widget))
{ return true; }
const QRect rect( option->rect.adjusted( 0, 0, 0, 1 ) );
......
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