summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
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/widgets/kernel
parent7dbbe0a22251085b00706c4eb997ac69148c4d70 (diff)
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/widgets/kernel')
-rw-r--r--src/widgets/kernel/qapplication.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index af4de68701..a075182969 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -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;
}