diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-07-15 08:18:02 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-07-15 08:23:00 (GMT) |
commit | 511985fa173daa9b8462dbb72c45a74626e8cba4 (patch) | |
tree | 8e07d760e3d0883caacff5571e706241d6a0050e /src/gui/kernel/qwidget_mac.mm | |
parent | 9f8b09ad70845fa5e9bc232d9e0de1274e732895 (diff) | |
download | Qt-511985fa173daa9b8462dbb72c45a74626e8cba4.zip Qt-511985fa173daa9b8462dbb72c45a74626e8cba4.tar.gz Qt-511985fa173daa9b8462dbb72c45a74626e8cba4.tar.bz2 |
Fix for tst_qmdisubwindow::fixedMinMaxSize failure on Cocoa
We need to respect the size restrictions for all QWidgets. Previously
this was only applied to top levels.
Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index e57ec77..c788711 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -4389,6 +4389,13 @@ void QWidgetPrivate::setGeometry_sys_helper(int x, int y, int w, int h, bool isM data.window_state = data.window_state & ~Qt::WindowMaximized; const bool visible = q->isVisible(); + // Apply size restrictions, applicable for Windows & Widgets. + if (QWExtra *extra = extraData()) { + w = qMin(w, extra->maxw); + h = qMin(h, extra->maxh); + w = qMax(w, extra->minw); + h = qMax(h, extra->minh); + } data.crect = QRect(x, y, w, h); if (realWindow) { |