diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-10-16 09:27:00 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-10-16 09:27:00 (GMT) |
commit | fa0b5ef33467868d895d925e34f539f28ddb2d8b (patch) | |
tree | eaa6a5de673891d79eab5974029f26676810ae38 /src/gui/widgets | |
parent | 77e78b8aa2b540bb7465b7ffde23eba4ef654028 (diff) | |
download | Qt-fa0b5ef33467868d895d925e34f539f28ddb2d8b.zip Qt-fa0b5ef33467868d895d925e34f539f28ddb2d8b.tar.gz Qt-fa0b5ef33467868d895d925e34f539f28ddb2d8b.tar.bz2 |
Revert "QWorkspace: fix hardcoded min size overwriting the real min size"
This reverts commit 9e378145294da33495d48b2c0742461ae6c2a3ba.
QWorkspace is obsolete. And it does not pass the tests.
TESTFUNCTION_FAIL tst_qaccessibility::workspaceTest (macx-g++_cocoa)
TESTFUNCTION_FAIL tst_qaccessibility::workspaceTest (macx-g++_cocoa_osx106)
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qworkspace.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gui/widgets/qworkspace.cpp b/src/gui/widgets/qworkspace.cpp index 3a9b30c..7180c4d 100644 --- a/src/gui/widgets/qworkspace.cpp +++ b/src/gui/widgets/qworkspace.cpp @@ -2551,6 +2551,7 @@ QWorkspaceChild::QWorkspaceChild(QWidget* window, QWorkspace *parent, Qt::Window this, SLOT(titleBarDoubleClicked())); } + setMinimumSize(128, 0); int fw = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, this); setContentsMargins(fw, fw, fw, fw); @@ -2701,15 +2702,11 @@ QSize QWorkspaceChild::sizeHint() const QSize QWorkspaceChild::minimumSizeHint() const { - QSize s; - if (!childWidget) { - s = QWidget::minimumSizeHint(); - } else { - s = childWidget->minimumSize(); - if (s.isEmpty()) - s = childWidget->minimumSizeHint(); - } - s = s.expandedTo(QSize(128, 0)); + if (!childWidget) + return QWidget::minimumSizeHint() + baseSize(); + QSize s = childWidget->minimumSize(); + if (s.isEmpty()) + s = childWidget->minimumSizeHint(); return s + baseSize(); } |