Simplify obtaining of parent in isWindowBlocked
The new way is more readable as it uses an existing API Change-Id: Id253c9e6405d11f16bdb5f55288dcfcf4b1641c6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
7dbbe0a222
commit
f0a40991fa
|
|
@ -898,15 +898,9 @@ bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blocking
|
|||
*blockingWindow = m;
|
||||
return true;
|
||||
}
|
||||
QWindow *p = m->parent();
|
||||
if (!p)
|
||||
p = m->transientParent();
|
||||
m = p;
|
||||
m = m->parent(QWindow::IncludeTransients);
|
||||
} while (m);
|
||||
QWindow *p = w->parent();
|
||||
if (!p)
|
||||
p = w->transientParent();
|
||||
w = p;
|
||||
w = w->parent(QWindow::IncludeTransients);
|
||||
} while (w);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2225,15 +2225,9 @@ bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWin
|
|||
*blockingWindow = m;
|
||||
return true;
|
||||
}
|
||||
QWindow *p = m->parent();
|
||||
if (!p)
|
||||
p = m->transientParent();
|
||||
m = p;
|
||||
m = m->parent(QWindow::IncludeTransients);
|
||||
} while (m);
|
||||
QWindow *p = w->parent();
|
||||
if (!p)
|
||||
p = w->transientParent();
|
||||
w = p;
|
||||
w = w->parent(QWindow::IncludeTransients);
|
||||
} while (w);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue