Make QWindow::type() reflect ForeignWindow status

The Qt::ForeignWindow flag is or’ed to d->windowFlags
by QWindow::flags(). Use this getter function instead
of accessing d->windowFlags() directly.

Change-Id: I6a82aa7e379ba51272954ffe7b87f108034da8c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Morten Johan Sørvig 2018-10-24 14:46:32 +02:00
parent 6881699d76
commit f4b77570e2

View File

@ -919,8 +919,7 @@ void QWindow::setFlag(Qt::WindowType flag, bool on)
*/
Qt::WindowType QWindow::type() const
{
Q_D(const QWindow);
return static_cast<Qt::WindowType>(int(d->windowFlags & Qt::WindowType_Mask));
return static_cast<Qt::WindowType>(int(flags() & Qt::WindowType_Mask));
}
/*!