summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-07-08 12:48:52 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-07-08 12:49:32 (GMT)
commit0f34ed602bcb00b19b0e550d790ae6521de37aa6 (patch)
tree3d69343e99b206d6209bdbf4dd9eb27bb6aa705d
parentab2b51679c64fd1befad9e8a3442bff2bb104a19 (diff)
downloadQt-0f34ed602bcb00b19b0e550d790ae6521de37aa6.zip
Qt-0f34ed602bcb00b19b0e550d790ae6521de37aa6.tar.gz
Qt-0f34ed602bcb00b19b0e550d790ae6521de37aa6.tar.bz2
QMenuBar: the extension could be visible when it shouldn't
If you had invisible actions in the menubar, it would always show the extension button
-rw-r--r--src/gui/widgets/qmenubar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index caacc58..be6ed67 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -218,7 +218,7 @@ void QMenuBarPrivate::updateGeometries()
bool hasHiddenActions = false;
for (int i = 0; i < actions.count(); ++i) {
const QRect &rect = actionRects.at(i);
- if (!menuRect.contains(rect)) {
+ if (rect.isValid() && !menuRect.contains(rect)) {
hasHiddenActions = true;
break;
}
@@ -229,7 +229,7 @@ void QMenuBarPrivate::updateGeometries()
menuRect = this->menuRect(true);
for (int i = 0; i < actions.count(); ++i) {
const QRect &rect = actionRects.at(i);
- if (!menuRect.contains(rect)) {
+ if (rect.isValid() && !menuRect.contains(rect)) {
hiddenActions.append(actions.at(i));
}
}