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:
parent
7dbbe0a222
commit
f0a40991fa
@ -898,15 +898,9 @@ bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blocking
|
|||||||
*blockingWindow = m;
|
*blockingWindow = m;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
QWindow *p = m->parent();
|
m = m->parent(QWindow::IncludeTransients);
|
||||||
if (!p)
|
|
||||||
p = m->transientParent();
|
|
||||||
m = p;
|
|
||||||
} while (m);
|
} while (m);
|
||||||
QWindow *p = w->parent();
|
w = w->parent(QWindow::IncludeTransients);
|
||||||
if (!p)
|
|
||||||
p = w->transientParent();
|
|
||||||
w = p;
|
|
||||||
} while (w);
|
} while (w);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2225,15 +2225,9 @@ bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWin
|
|||||||
*blockingWindow = m;
|
*blockingWindow = m;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
QWindow *p = m->parent();
|
m = m->parent(QWindow::IncludeTransients);
|
||||||
if (!p)
|
|
||||||
p = m->transientParent();
|
|
||||||
m = p;
|
|
||||||
} while (m);
|
} while (m);
|
||||||
QWindow *p = w->parent();
|
w = w->parent(QWindow::IncludeTransients);
|
||||||
if (!p)
|
|
||||||
p = w->transientParent();
|
|
||||||
w = p;
|
|
||||||
} while (w);
|
} while (w);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user