summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-05-14 12:06:16 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-05-16 10:19:17 +0000
commit6779ec383d9609cd02a4aaf0dc82d6a9f958a07c (patch)
tree9c2ce600d0cc23d501f63c02440756645112bdd4 /src/widgets
parent9d85490ea2171f1fbad1e6a264db835fc0e9a702 (diff)
QMenuBar: honor the left widget size hint
expandedTo() returns the expanded size, so we must assign the return value (otherwise it's a no op). We were accidentally discarding it. Task-number: QTBUG-36010 Change-Id: Ic70c12648382a6b2ef7d70809bf25caa4cbe2f3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qmenubar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 4659d9cf6c..1ad99bed9c 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -1632,7 +1632,7 @@ QSize QMenuBar::sizeHint() const
if(d->leftWidget) {
QSize sz = d->leftWidget->sizeHint();
sz.rheight() += margin;
- ret.expandedTo(sz);
+ ret = ret.expandedTo(sz);
}
if(d->rightWidget) {
QSize sz = d->rightWidget->sizeHint();