Minor cleanup

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2021-05-31 12:02:43 +08:00
parent 4139cf0ab2
commit 38a64e25b3
1 changed files with 1 additions and 4 deletions

View File

@ -121,10 +121,7 @@ QObject *Utilities::getNativeParent(const QObject *object)
QObject *parent = object->parent(); QObject *parent = object->parent();
while (parent) { while (parent) {
QObject *p = parent->parent(); QObject *p = parent->parent();
if (!p) { if (!p || p->isWindowType()) {
return parent;
}
if (p->isWindowType()) {
return parent; return parent;
} }
parent = p; parent = p;