summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-07-22 12:33:19 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-22 12:40:23 (GMT)
commit1223a21a737e9fded46f2c761532bf535fb943b1 (patch)
tree10b439fe3157b9ce153998498a6b7feee962e1d8 /src/gui/widgets
parent6f9d5e9435b2c518df62278cc6fc1ab0fdf23ffe (diff)
downloadQt-1223a21a737e9fded46f2c761532bf535fb943b1.zip
Qt-1223a21a737e9fded46f2c761532bf535fb943b1.tar.gz
Qt-1223a21a737e9fded46f2c761532bf535fb943b1.tar.bz2
Fix memory leak.
The signal could be connected a huge number of times This is already fixed in master with Qt:UniqueConnection Task-number: 258381
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qtoolbarlayout.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp
index 0d1a4b3..e55b754 100644
--- a/src/gui/widgets/qtoolbarlayout.cpp
+++ b/src/gui/widgets/qtoolbarlayout.cpp
@@ -127,6 +127,8 @@ void QToolBarLayout::setUsePopupMenu(bool set)
if (!dirty && ((popupMenu == 0) == set))
invalidate();
if (!set) {
+ QObject::disconnect(extension, SIGNAL(clicked(bool)),
+ this, SLOT(setExpanded(bool)));
QObject::connect(extension, SIGNAL(clicked(bool)),
this, SLOT(setExpanded(bool)));
extension->setPopupMode(QToolButton::DelayedPopup);