summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 55459ac1ac..0d8e20ca0c 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -289,7 +289,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
#endif
{
if (!qApp) {
- qFatal("QWidget: Must construct a QApplication before a QPaintDevice");
+ qFatal("QWidget: Must construct a QApplication before a QWidget");
return;
}
@@ -6999,21 +6999,23 @@ void QWidget::setUpdatesEnabled(bool enable)
}
/*!
- Shows the widget and its child widgets. This function is
- equivalent to setVisible(true) in the normal case, and equivalent
- to showFullScreen() if the QStyleHints::showIsFullScreen() hint
- is true and the window is not a popup.
+ Shows the widget and its child widgets.
- \sa raise(), showEvent(), hide(), setVisible(), showMinimized(), showMaximized(),
- showNormal(), isVisible(), windowFlags()
+ This is equivalent to calling showFullScreen(), showMaximized(), or setVisible(true),
+ depending on the platform's default behavior for the window flags.
+
+ \sa raise(), showEvent(), hide(), setVisible(), showMinimized(), showMaximized(),
+ showNormal(), isVisible(), windowFlags(), flags()
*/
void QWidget::show()
{
- bool isPopup = data->window_flags & Qt::Popup & ~Qt::Window;
- if (isWindow() && !isPopup && qApp->styleHints()->showIsFullScreen())
+ Qt::WindowState defaultState = QGuiApplicationPrivate::platformIntegration()->defaultWindowState(data->window_flags);
+ if (defaultState == Qt::WindowFullScreen)
showFullScreen();
+ else if (defaultState == Qt::WindowMaximized)
+ showMaximized();
else
- setVisible(true);
+ setVisible(true); // FIXME: Why not showNormal(), like QWindow::show()?
}
/*! \internal