summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2022-09-12 16:29:38 +0200
committerMikolaj Boc <mikolaj.boc@qt.io>2022-09-12 23:39:11 +0200
commitf0a40991fa5a77bb6e09976a3c041f93cbf44347 (patch)
tree36f0b0a79946346f81a158d023a966d5ab578dab /src/gui/kernel/qguiapplication.cpp
parent7dbbe0a22251085b00706c4eb997ac69148c4d70 (diff)
downloadqtbase-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.cpp10
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;
}