forked from qt-creator/qt-creator
Remove some workarounds for Qt bugs that have been fixed.
Change-Id: I0e7112ee3f3790fba42fc882cb98e06ec6a2186d Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -419,27 +419,11 @@ void MenuActionContainer::removeMenu(QMenu *menu)
|
||||
m_menu->removeAction(menu->menuAction());
|
||||
}
|
||||
|
||||
static bool menuInMenuBar(const QMenu *menu)
|
||||
{
|
||||
foreach (const QWidget *widget, menu->menuAction()->associatedWidgets()) {
|
||||
if (qobject_cast<const QMenuBar *>(widget))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MenuActionContainer::updateInternal()
|
||||
{
|
||||
if (onAllDisabledBehavior() == Show)
|
||||
return true;
|
||||
|
||||
if (Utils::HostOsInfo::isMacHost()) {
|
||||
// work around QTBUG-25544 which makes menus in the menu bar stay at their enabled state at startup
|
||||
// (so menus that are disabled at startup would stay disabled)
|
||||
if (menuInMenuBar(m_menu))
|
||||
return true;
|
||||
}
|
||||
|
||||
bool hasitems = false;
|
||||
QList<QAction *> actions = m_menu->actions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user