windowflags: Improve compound states handling

Change-Id: Iab5df40b69cf9c0e11f0e495a6b27af9c05fbd94
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Tor Arne Vestbø 2017-02-17 15:22:47 +01:00
parent 9965e92e4f
commit 5f80a7956e

View File

@ -191,12 +191,12 @@ static bool isTopLevel(const QObject *o)
return false;
}
static Qt::WindowState windowState(const QObject *o)
static Qt::WindowStates windowState(const QObject *o)
{
if (o->isWidgetType()) {
Qt::WindowStates states = static_cast<const QWidget *>(o)->windowState();
states &= ~Qt::WindowActive;
return static_cast<Qt::WindowState>(int(states));
return states;
}
#if QT_VERSION >= 0x050000
if (o->isWindowType())