QPlatformWindow: fix isAncestorOf not breaking recursion
The current implementation got stuck always asking for the parent of the same child This patch will make sure we actually walk up the parent chain. Pick-to: 6.2 6.2.0 6.1 5.15 Change-Id: I9f67f6305e0143526f53952a563d496e760ac2e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
73753ee3af
commit
f06f39779c
|
|
@ -229,7 +229,7 @@ bool QPlatformWindow::isActive() const
|
|||
*/
|
||||
bool QPlatformWindow::isAncestorOf(const QPlatformWindow *child) const
|
||||
{
|
||||
for (const QPlatformWindow *parent = child->parent(); parent; parent = child->parent()) {
|
||||
for (const QPlatformWindow *parent = child->parent(); parent; parent = parent->parent()) {
|
||||
if (parent == this)
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue