summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-12-01 15:53:59 (GMT)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:25:01 (GMT)
commit8242b1447998f51639d1e21417c31fe0d428a539 (patch)
tree9b165a882e2411c9c58653012ae6cdf4a8133ee9 /src/gui
parent02d69838948535e5c79a0883be3727c542f28fb2 (diff)
downloadQt-8242b1447998f51639d1e21417c31fe0d428a539.zip
Qt-8242b1447998f51639d1e21417c31fe0d428a539.tar.gz
Qt-8242b1447998f51639d1e21417c31fe0d428a539.tar.bz2
Fixed a problem with toolbars not relayouting
This could happen when dragging an extended toolbar from a mainwindow PAtch was provided on IRC by ravek (#dev) Task-number: QTBUG-10920 Reviewed-by: Trust-Me
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qtoolbarlayout.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp
index 98b1fc5..971fdda 100644
--- a/src/gui/widgets/qtoolbarlayout.cpp
+++ b/src/gui/widgets/qtoolbarlayout.cpp
@@ -647,15 +647,15 @@ QSize QToolBarLayout::expandedSize(const QSize &size) const
void QToolBarLayout::setExpanded(bool exp)
{
- if (exp == expanded)
+ QWidget *tb = qobject_cast<QToolBar*>(parentWidget());
+ if (!tb)
+ return;
+ if (exp == expanded && !tb->isWindow())
return;
expanded = exp;
extension->setChecked(expanded);
- QToolBar *tb = qobject_cast<QToolBar*>(parentWidget());
- if (!tb)
- return;
if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) {
#ifdef QT_NO_DOCKWIDGET
animating = false;