summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qabstractmenubarimpl_p.h3
-rw-r--r--src/gui/widgets/qmenubar.cpp5
-rw-r--r--src/gui/widgets/qmenubarimpl.cpp10
-rw-r--r--src/gui/widgets/qmenubarimpl_p.h2
4 files changed, 6 insertions, 14 deletions
diff --git a/src/gui/widgets/qabstractmenubarimpl_p.h b/src/gui/widgets/qabstractmenubarimpl_p.h
index 76eef28..25441df 100644
--- a/src/gui/widgets/qabstractmenubarimpl_p.h
+++ b/src/gui/widgets/qabstractmenubarimpl_p.h
@@ -77,8 +77,7 @@ public:
// QMenuBarPrivate::init()
virtual void init(QMenuBar *) = 0;
- // QMenuBar::setVisible()
- virtual bool allowSetVisible() const = 0;
+ virtual void setVisible(bool visible) = 0;
virtual void actionEvent(QActionEvent *) = 0;
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index ec19908..556c192 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -1055,10 +1055,7 @@ void QMenuBar::paintEvent(QPaintEvent *e)
void QMenuBar::setVisible(bool visible)
{
Q_D(QMenuBar);
- if (!d->impl->allowSetVisible()) {
- return;
- }
- QWidget::setVisible(visible);
+ d->impl->setVisible(visible);
}
/*!
diff --git a/src/gui/widgets/qmenubarimpl.cpp b/src/gui/widgets/qmenubarimpl.cpp
index 4844e4e..1ca2e11 100644
--- a/src/gui/widgets/qmenubarimpl.cpp
+++ b/src/gui/widgets/qmenubarimpl.cpp
@@ -90,20 +90,16 @@ void QMenuBarImpl::init(QMenuBar *_menuBar)
#endif
}
-bool QMenuBarImpl::allowSetVisible() const
+void QMenuBarImpl::setVisible(bool visible)
{
#if defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_WS_S60)
- // FIXME: Port this to a setVisible() method
- /*
if (isNativeMenuBar()) {
if (!visible)
- QWidget::setVisible(false);
+ menuBar->QWidget::setVisible(false);
return;
}
- */
- return !isNativeMenuBar();
#endif
- return true;
+ menuBar->QWidget::setVisible(visible);
}
void QMenuBarImpl::actionEvent(QActionEvent *e)
diff --git a/src/gui/widgets/qmenubarimpl_p.h b/src/gui/widgets/qmenubarimpl_p.h
index 0546eb2..e7a3bde 100644
--- a/src/gui/widgets/qmenubarimpl_p.h
+++ b/src/gui/widgets/qmenubarimpl_p.h
@@ -56,7 +56,7 @@ public:
virtual void init(QMenuBar *);
- virtual bool allowSetVisible() const;
+ virtual void setVisible(bool visible);
virtual void actionEvent(QActionEvent *e);