Mercurial > hg > svapp
comparison 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 |
comparison
equal
deleted
inserted
replaced
425:5882462fa747 | 426:03fd6990ab52 |
---|---|
154 m_labeller(0), | 154 m_labeller(0), |
155 m_lastPlayStatusSec(0), | 155 m_lastPlayStatusSec(0), |
156 m_initialDarkBackground(false), | 156 m_initialDarkBackground(false), |
157 m_defaultFfwdRwdStep(2, 0), | 157 m_defaultFfwdRwdStep(2, 0), |
158 m_statusLabel(0), | 158 m_statusLabel(0), |
159 m_iconsVisibleInMenus(true), | |
159 m_menuShortcutMapper(0) | 160 m_menuShortcutMapper(0) |
160 { | 161 { |
161 Profiler profiler("MainWindowBase::MainWindowBase"); | 162 Profiler profiler("MainWindowBase::MainWindowBase"); |
162 | 163 |
163 #ifdef Q_WS_X11 | 164 #ifdef Q_WS_X11 |
303 if (menu) finaliseMenu(menu); | 304 if (menu) finaliseMenu(menu); |
304 } | 305 } |
305 } | 306 } |
306 | 307 |
307 void | 308 void |
308 MainWindowBase::finaliseMenu(QMenu * | 309 MainWindowBase::finaliseMenu(QMenu *menu) |
309 #ifdef Q_OS_MAC | 310 { |
310 menu | 311 foreach (QAction *a, menu->actions()) { |
311 #endif | 312 a->setIconVisibleInMenu(m_iconsVisibleInMenus); |
312 ) | 313 } |
313 { | 314 |
314 #ifdef Q_OS_MAC | 315 #ifdef Q_OS_MAC |
315 // See https://bugreports.qt-project.org/browse/QTBUG-38256 and | 316 // See https://bugreports.qt-project.org/browse/QTBUG-38256 and |
316 // our issue #890 http://code.soundsoftware.ac.uk/issues/890 -- | 317 // our issue #890 http://code.soundsoftware.ac.uk/issues/890 -- |
317 // single-key shortcuts that are associated only with a menu | 318 // single-key shortcuts that are associated only with a menu |
318 // action (and not with a toolbar button) do not work with Qt 5.x | 319 // action (and not with a toolbar button) do not work with Qt 5.x |