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>
This commit is contained in:
Mikolaj Boc 2022-09-12 16:29:38 +02:00
parent 7dbbe0a222
commit f0a40991fa
2 changed files with 4 additions and 16 deletions

View File

@ -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;
}

View File

@ -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;
}