Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 426:03fd6990ab52 alignment_view
Open to show/hide icons in menus
author | Chris Cannam |
---|---|
date | Fri, 21 Nov 2014 10:36:44 +0000 |
parents | f32a64149602 |
children | a67245dce0d4 |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Thu Nov 20 17:17:45 2014 +0000 +++ b/framework/MainWindowBase.cpp Fri Nov 21 10:36:44 2014 +0000 @@ -156,6 +156,7 @@ m_initialDarkBackground(false), m_defaultFfwdRwdStep(2, 0), m_statusLabel(0), + m_iconsVisibleInMenus(true), m_menuShortcutMapper(0) { Profiler profiler("MainWindowBase::MainWindowBase"); @@ -305,12 +306,12 @@ } void -MainWindowBase::finaliseMenu(QMenu * -#ifdef Q_OS_MAC - menu -#endif - ) +MainWindowBase::finaliseMenu(QMenu *menu) { + foreach (QAction *a, menu->actions()) { + a->setIconVisibleInMenu(m_iconsVisibleInMenus); + } + #ifdef Q_OS_MAC // See https://bugreports.qt-project.org/browse/QTBUG-38256 and // our issue #890 http://code.soundsoftware.ac.uk/issues/890 --