Android: Initialize mWindowState
Use the same variable in QAndroidPlatformWindow. Task-number: QTBUG-34764 Change-Id: Idf33707e81cf7306663196f3c17735d8dc1dde5d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
bcf5dbc8a0
commit
2828072d50
@ -48,7 +48,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QFbWindow::QFbWindow(QWindow *window)
|
||||
: QPlatformWindow(window), mBackingStore(0)
|
||||
: QPlatformWindow(window), mBackingStore(0), mWindowState(Qt::WindowNoState)
|
||||
{
|
||||
static QAtomicInt winIdGenerator(1);
|
||||
mWindowId = winIdGenerator.fetchAndAddRelaxed(1);
|
||||
|
@ -46,7 +46,6 @@
|
||||
|
||||
QAndroidPlatformWindow::QAndroidPlatformWindow(QWindow *window)
|
||||
: QFbWindow(window)
|
||||
, m_state(Qt::WindowNoState)
|
||||
{
|
||||
}
|
||||
|
||||
@ -65,9 +64,9 @@ void QAndroidPlatformWindow::updateStatusBarVisibility()
|
||||
Qt::WindowFlags flags = window()->flags();
|
||||
bool isNonRegularWindow = flags & (Qt::Popup | Qt::Dialog | Qt::Sheet) & ~Qt::Window;
|
||||
if (!isNonRegularWindow) {
|
||||
if (m_state & Qt::WindowFullScreen)
|
||||
if (mWindowState & Qt::WindowFullScreen)
|
||||
QtAndroid::hideStatusBar();
|
||||
else if (m_state & Qt::WindowMaximized)
|
||||
else if (mWindowState & Qt::WindowMaximized)
|
||||
QtAndroid::showStatusBar();
|
||||
}
|
||||
}
|
||||
@ -80,10 +79,9 @@ void QAndroidPlatformWindow::raise()
|
||||
|
||||
void QAndroidPlatformWindow::setWindowState(Qt::WindowState state)
|
||||
{
|
||||
if (m_state == state)
|
||||
if (mWindowState == state)
|
||||
return;
|
||||
|
||||
m_state = state;
|
||||
if (window()->isVisible())
|
||||
updateStatusBarVisibility();
|
||||
|
||||
|
@ -59,9 +59,6 @@ public:
|
||||
|
||||
public slots:
|
||||
void setGeometry(const QRect &rect);
|
||||
|
||||
private:
|
||||
Qt::WindowState m_state;
|
||||
};
|
||||
|
||||
#endif // ANDROIDPLATFORMWINDOW_H
|
||||
|
Loading…
Reference in New Issue
Block a user