diff options
author | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-09-12 16:29:38 +0200 |
---|---|---|
committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-09-12 23:39:11 +0200 |
commit | f0a40991fa5a77bb6e09976a3c041f93cbf44347 (patch) | |
tree | 36f0b0a79946346f81a158d023a966d5ab578dab /src/gui/kernel/qguiapplication.cpp | |
parent | 7dbbe0a22251085b00706c4eb997ac69148c4d70 (diff) | |
download | qtbase-f0a40991fa5a77bb6e09976a3c041f93cbf44347.tar.gz |
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>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 3dcb22c840..cc532401b4 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -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; } |